Skip to content

Conversation

@ben-chain
Copy link
Collaborator

Description

Solves YAS-163 adding support for libraries.

Questions

Instead of doing a significant overhaul of TranspilerImpl so that it can take in hex strings, and ignore that library placeholders have non-hex elements, I temporarily replace the placeholders that are invalid hex strings with valid ones. This is definitely fine--a 20-byte partial hash collision is significantly secure--but perhaps in the future there's a cleaner way to do this in transpile()?

Metadata

Fixes

  • Fixes YAS 163
  • Improves edge case for transpiler error handling

Blockers

  • N/A

Contributing Agreement

@ben-chain ben-chain mentioned this pull request Mar 2, 2020
1 task
Copy link

@willmeister willmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments in #27

@ben-chain
Copy link
Collaborator Author

Closing as @willmeister reviewed both with #27

@ben-chain ben-chain closed this Mar 4, 2020
@ben-chain ben-chain deleted the feat/YAS-163/library-support branch March 4, 2020 20:19
snario pushed a commit that referenced this pull request Apr 14, 2021
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
protolambda pushed a commit to protolambda/optimism that referenced this pull request May 1, 2022
- update the progress bars
- update naming of components to be consistent
- add roadmap to readme
@mslipper mslipper mentioned this pull request May 16, 2022
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 13, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 13, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 13, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 15, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 15, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 15, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 16, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 16, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 16, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 16, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 16, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 16, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 16, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
tuxcanfly added a commit to tuxcanfly/optimism that referenced this pull request Jun 16, 2022
This PR depends on ethereum-optimism#26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After ethereum-optimism#26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
mergify bot pushed a commit that referenced this pull request Jun 16, 2022
This PR depends on #26 on reference-optimistic-geth:

ethereum-optimism/reference-optimistic-geth#26

A new test TestFees is added, which runs a simple transaction and tests
that the L2 fee is redirected to the configured fee recipient and that
the L1 availability fee is calculated based the RLP encoded transaction
size and also redirected to the configured fee recipient.

TestFees is skipped, but can be enabled the above PR is merged into
reference-optimistic-geth.

NOTE: After #26 reference-optimistic-geth is merged, L2 genesis
configuration needs to be updated for OptimismConfig to enable special
fee handling and to find L1Block, GasPriceOracle contract addresses.
max-sanchez referenced this pull request in hemilabs/optimism Apr 16, 2024
88047e707 Add tbcd, a small bitcoin daemon that participates on bitcoin p2p (ethereum-optimism#50)
1146a08b5 localnet reorg fix (ethereum-optimism#76)
87f18a191 build(deps): bump github.com/docker/docker (ethereum-optimism#64)
9073baeaf localnet (ethereum-optimism#37)
1588cbf04 Add common user-specific files to gitignore (ethereum-optimism#51)
210aabe7a Update popm.go, fix typo (ethereum-optimism#40)
a5e689493 make: automate copyright headers (#31)
1c3bfc9bc Use `maps.Clone(m)` to copy returned map in `APICommands()` (#33)
1be4df2a3 Use 'errors.Is' to compare errors (#32)
3f6bc5f8e e2e: sync ElectrumX environment variables with infra (ethereum-optimism#36)
c5b0fea01 electrumx: add connection reuse and pooling (#26)
cfc1293e9 Update README.md (#29)
8896259f0 retry mine keystone on failure (#18)
a10e3bb29 Use '%w' verb in fmt.Errorf to wrap errors (fixes #13) (#27)
6cd677611 deps: update google.golang.org/protobuf to v1.33.0 (#28)
ed7eb8e97 ci: fix concurrency cancel-in-progress for pull requests (#16)
ac3b7eacb docker: update golang image to v1.22.1 (#25)
d6b0ac8af returning response errors if they exist from bfg -> popm (#24)
d450b787a Network test start height + no panic (#22)
b390805c5 allowing BTC Block and L2 Keystone generation rates to be configurable in local network (#19)
bfd3b1dc0 make: add -local flag to goimports (#9)
e0e8964fc Move internal error into protocol package (#10)
7875a897c l2 keystone mining fixes (#3)

git-subtree-dir: heminetwork
git-subtree-split: 88047e707e2db8522e2ad77c5f849e55bc94cd10
ClaytonNorthey92 referenced this pull request in hemilabs/optimism Apr 17, 2024
88047e707 Add tbcd, a small bitcoin daemon that participates on bitcoin p2p (ethereum-optimism#50)
1146a08b5 localnet reorg fix (ethereum-optimism#76)
87f18a191 build(deps): bump github.com/docker/docker (ethereum-optimism#64)
9073baeaf localnet (ethereum-optimism#37)
1588cbf04 Add common user-specific files to gitignore (ethereum-optimism#51)
210aabe7a Update popm.go, fix typo (ethereum-optimism#40)
a5e689493 make: automate copyright headers (#31)
1c3bfc9bc Use `maps.Clone(m)` to copy returned map in `APICommands()` (#33)
1be4df2a3 Use 'errors.Is' to compare errors (#32)
3f6bc5f8e e2e: sync ElectrumX environment variables with infra (ethereum-optimism#36)
c5b0fea01 electrumx: add connection reuse and pooling (#26)
cfc1293e9 Update README.md (#29)
8896259f0 retry mine keystone on failure (#18)
a10e3bb29 Use '%w' verb in fmt.Errorf to wrap errors (fixes #13) (#27)
6cd677611 deps: update google.golang.org/protobuf to v1.33.0 (#28)
ed7eb8e97 ci: fix concurrency cancel-in-progress for pull requests (#16)
ac3b7eacb docker: update golang image to v1.22.1 (#25)
d6b0ac8af returning response errors if they exist from bfg -> popm (#24)
d450b787a Network test start height + no panic (#22)
b390805c5 allowing BTC Block and L2 Keystone generation rates to be configurable in local network (#19)
bfd3b1dc0 make: add -local flag to goimports (#9)
e0e8964fc Move internal error into protocol package (#10)
7875a897c l2 keystone mining fixes (#3)

git-subtree-dir: heminetwork
git-subtree-split: 88047e707e2db8522e2ad77c5f849e55bc94cd10
blockchaindevsh pushed a commit to blockchaindevsh/optimism that referenced this pull request Jun 24, 2024
Copy FaultDisputeGame2.sol and FaultDisputGame2.t.sol and FaultDisputeActors2.sol
bap2pecs pushed a commit to babylonlabs-io/optimism that referenced this pull request Jul 31, 2024
github-merge-queue bot pushed a commit that referenced this pull request Sep 18, 2024
* chore: configure medusa with basic supERC20 self-bridging (#19)

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

fix: delete dead code
test: give the fuzzer a head start
docs: fix properties order
test: document & implement assertions 22, 23  and 24
fix: fixes from self-review
test: guide the fuzzer a little bit less
  previously: initial mint, bound on transfer amount: 146625 calls in 200s
  now: no initial mint, no bound on transfer amount: 176835 calls in 200s
  it doesn't seem to slow the fuzzer down
fix: fixes after lovely feedback by disco
docs: merge both documents and categorized properties by their milestone
fix: fixes from parti's review
fix: feedback from disco
fix: feedback from doc
refactor: separate state transitions from pure properties
docs: update tested properties
refactor: move all assertions into properties contract
fix: move function without assertions back into handler
test: only use assertion mode
fix: improve justfile recipie for medusa

* feat: halmos symbolic tests (#21)

* feat: introduce OptimismSuperchainERC20

* fix: contract fixes

* feat: add snapshots and semver

* test: add supports interface tests

* test: add invariant test

* feat: add parameters to the RelayERC20 event

* fix: typo

* fix: from param description

* fix: event signature and interface pragma

* feat: add initializer

* feat: use unstructured storage and OZ v5

* feat: update superchain erc20 interfaces

* fix: adapt storage to ERC7201

* test: add initializable OZ v5 test

* fix: invariant docs

* fix: ERC165 implementation

* test: improve superc20 invariant (#11)

* fix: gas snapshot

* chore: configure medusa with basic supERC20 self-bridging

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

* fix: delete dead code

* test: give the fuzzer a head start

* feat: create suite for sybolic tests with halmos

* test: setup and 3 properties with symbolic tests

* chore: remove todo comment

* docs: fix properties order

* test: document & implement assertions 22, 23  and 24

* fix: fixes from self-review

* test: guide the fuzzer a little bit less

previously: initial mint, bound on transfer amount: 146625 calls in 200s
now: no initial mint, no bound on transfer amount: 176835 calls in 200s

it doesn't seem to slow the fuzzer down

* feat: add property for burn

* refactor: remove symbolic address on mint property

* refactor: order the tests based on the property id

* feat: checkpoint

* chore: set xdomain sender on failing test

* chore: enhance mocks

* Revert "Merge branch 'chore/setup-medusa' into feat/halmos-symbolic-tests"

This reverts commit 945d6b6, reversing
changes made to 5dcb3a8.

* refactor: remove symbolic addresses to make all of the test work

* chore: remove console logs

* feat: add properties file

* chore: polish

* refactor: enhance test on property 7 using direct try catch (now works)

* fix: review comments

* refactor: add symbolic addresses on test functions

* feat: create halmos toml

* chore: polish test contract and mock

* chore: update property

* refactor: move symbolic folder into properties one

* feat: create advanced tests helper contract

* refactor: enhance tests using symbolic addresses instead of concrete ones

* chore: remove 0 property natspec

* feat: add halmos profile and just script

* chore: rename symbolic folder to halmos

* feat: add halmos commands to justfile

* chore: reorder assertions on one test

* refactor: complete test property seven

* chore: mark properties as completed

* chore: add halmos-cheatcodes dependency

* chore: rename advancedtest->halmosbase

* chore: minimize mocked messenger

* chore: delete empty halmos file

* chore: revert changes to medusa.json

* docs: update changes to PROPERTIES.md from base branch

* test: sendERC20 destination fix

* chore: natspec fixes

---------

Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>
Co-authored-by: teddy <[email protected]>

* test: remaining protocol properties (#26)

* test: cross-user fuzzed bridges + actor setup

* test: fuzz properties 8 and 9

* test: properties 7 and 25

* fix: implement doc's feedback

* test: superc20 tob properties (#27)

* chore: add crytic/properties dependency

* test: extend protocol properties so it also covers ToB erc20 properties

* chore: small linter fixes

* docs: update property list

* test: handlers for remaining superc20 state transitions

* fix: disable ToB properties we are not using and guide the fuzzer a bit more

* fix: disable another ToB property not implemented by solady

* chore: remove zero-initializations

* fix: feedback from disco

* chore: separate fuzz campaign tests in guided vs unguided

* test: dont revert on successful unguided relay

* test: add fuzzed calls to burn and mint

* docs: document the separation of fuzz test functions

* chore: move the properties file to its own directory

* chore: consistently use fuzz_ and property_ + camelcase

* chore: fix typo

* chore: camelcase for handlers as well

* fix: revert change that broke halmos campaign compile :D

* test: fuzz non atomic bridging (#31)

* test: changed mocked messenger ABI for message sending but kept assertions the same

* docs: add new properties 26&27

* test: queue cross-chain messages and test related properties

* test: relay random messages from queue and check associated invariants

* chore: rename bridge->senderc20 method for consistency with relayerc20

* test: not-yet-deployed supertokens can get funds sent to them

* chore: medusa runs forever by default

doable since it also handles SIGINTs gracefully

* chore: document the reason behind relay zero and send zero inconsistencies

* fix: feedback from doc

* fix: walk around possible medusa issue

I'm getting an 'unknown opcode 0x4e' in ProtocolAtomic constructor when
calling the MockL2ToL2CrossDomainMessenger for the first time

* test: unguided handler for sendERC20

* fix: feedback from disco

* chore: remove halmos testsuite

* chore: foundry migration (#40)

* chore: track assertion failures

this is so foundry's invariant contract can check that an assertion
returned false in the handler, while still allowing `fail_on_revert =
false` so we can still take full advantage of medusa's fuzzer & coverage
reports

* fix: explicitly skip duplicate supertoken deployments

* chore: remove duplicated PROPERTIES.md file

* chore: expose data to foundry's external invariant checker

* test: run medusa fuzzing campaign from within foundry

* fix: eagerly check for duplicate deployments

* fix: feedback from doc

* chore: shoehorn medusa campaign into foundry dir structure

* chore: remove PROPERTIES.md file

* chore: delete medusa config

* docs: limited support for subdirectories in test/invariant

* chore: rename contracts to be more sneaky about medusa

* docs: rewrite invariant docs in a way compliant with autogen scripts

* chore: fixes from rebase

* fix: cleanup superc20 invariants (#46)

* chore: revert modifications from medusa campaign

* docs: extra docs on why ForTest contract is required

* doc: add list of all supertoken properties

* chore: run forge fmt

* ci: allow for testfiles to be deleted

* fix: run doc autogen script after rebase

---------

Co-authored-by: Disco <[email protected]>
Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
…11776)

* chore: configure medusa with basic supERC20 self-bridging (ethereum-optimism#19)

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

fix: delete dead code
test: give the fuzzer a head start
docs: fix properties order
test: document & implement assertions 22, 23  and 24
fix: fixes from self-review
test: guide the fuzzer a little bit less
  previously: initial mint, bound on transfer amount: 146625 calls in 200s
  now: no initial mint, no bound on transfer amount: 176835 calls in 200s
  it doesn't seem to slow the fuzzer down
fix: fixes after lovely feedback by disco
docs: merge both documents and categorized properties by their milestone
fix: fixes from parti's review
fix: feedback from disco
fix: feedback from doc
refactor: separate state transitions from pure properties
docs: update tested properties
refactor: move all assertions into properties contract
fix: move function without assertions back into handler
test: only use assertion mode
fix: improve justfile recipie for medusa

* feat: halmos symbolic tests (ethereum-optimism#21)

* feat: introduce OptimismSuperchainERC20

* fix: contract fixes

* feat: add snapshots and semver

* test: add supports interface tests

* test: add invariant test

* feat: add parameters to the RelayERC20 event

* fix: typo

* fix: from param description

* fix: event signature and interface pragma

* feat: add initializer

* feat: use unstructured storage and OZ v5

* feat: update superchain erc20 interfaces

* fix: adapt storage to ERC7201

* test: add initializable OZ v5 test

* fix: invariant docs

* fix: ERC165 implementation

* test: improve superc20 invariant (ethereum-optimism#11)

* fix: gas snapshot

* chore: configure medusa with basic supERC20 self-bridging

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

* fix: delete dead code

* test: give the fuzzer a head start

* feat: create suite for sybolic tests with halmos

* test: setup and 3 properties with symbolic tests

* chore: remove todo comment

* docs: fix properties order

* test: document & implement assertions 22, 23  and 24

* fix: fixes from self-review

* test: guide the fuzzer a little bit less

previously: initial mint, bound on transfer amount: 146625 calls in 200s
now: no initial mint, no bound on transfer amount: 176835 calls in 200s

it doesn't seem to slow the fuzzer down

* feat: add property for burn

* refactor: remove symbolic address on mint property

* refactor: order the tests based on the property id

* feat: checkpoint

* chore: set xdomain sender on failing test

* chore: enhance mocks

* Revert "Merge branch 'chore/setup-medusa' into feat/halmos-symbolic-tests"

This reverts commit 945d6b6, reversing
changes made to 5dcb3a8.

* refactor: remove symbolic addresses to make all of the test work

* chore: remove console logs

* feat: add properties file

* chore: polish

* refactor: enhance test on property 7 using direct try catch (now works)

* fix: review comments

* refactor: add symbolic addresses on test functions

* feat: create halmos toml

* chore: polish test contract and mock

* chore: update property

* refactor: move symbolic folder into properties one

* feat: create advanced tests helper contract

* refactor: enhance tests using symbolic addresses instead of concrete ones

* chore: remove 0 property natspec

* feat: add halmos profile and just script

* chore: rename symbolic folder to halmos

* feat: add halmos commands to justfile

* chore: reorder assertions on one test

* refactor: complete test property seven

* chore: mark properties as completed

* chore: add halmos-cheatcodes dependency

* chore: rename advancedtest->halmosbase

* chore: minimize mocked messenger

* chore: delete empty halmos file

* chore: revert changes to medusa.json

* docs: update changes to PROPERTIES.md from base branch

* test: sendERC20 destination fix

* chore: natspec fixes

---------

Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>
Co-authored-by: teddy <[email protected]>

* test: remaining protocol properties (ethereum-optimism#26)

* test: cross-user fuzzed bridges + actor setup

* test: fuzz properties 8 and 9

* test: properties 7 and 25

* fix: implement doc's feedback

* test: superc20 tob properties (ethereum-optimism#27)

* chore: add crytic/properties dependency

* test: extend protocol properties so it also covers ToB erc20 properties

* chore: small linter fixes

* docs: update property list

* test: handlers for remaining superc20 state transitions

* fix: disable ToB properties we are not using and guide the fuzzer a bit more

* fix: disable another ToB property not implemented by solady

* chore: remove zero-initializations

* fix: feedback from disco

* chore: separate fuzz campaign tests in guided vs unguided

* test: dont revert on successful unguided relay

* test: add fuzzed calls to burn and mint

* docs: document the separation of fuzz test functions

* chore: move the properties file to its own directory

* chore: consistently use fuzz_ and property_ + camelcase

* chore: fix typo

* chore: camelcase for handlers as well

* fix: revert change that broke halmos campaign compile :D

* test: fuzz non atomic bridging (ethereum-optimism#31)

* test: changed mocked messenger ABI for message sending but kept assertions the same

* docs: add new properties 26&27

* test: queue cross-chain messages and test related properties

* test: relay random messages from queue and check associated invariants

* chore: rename bridge->senderc20 method for consistency with relayerc20

* test: not-yet-deployed supertokens can get funds sent to them

* chore: medusa runs forever by default

doable since it also handles SIGINTs gracefully

* chore: document the reason behind relay zero and send zero inconsistencies

* fix: feedback from doc

* fix: walk around possible medusa issue

I'm getting an 'unknown opcode 0x4e' in ProtocolAtomic constructor when
calling the MockL2ToL2CrossDomainMessenger for the first time

* test: unguided handler for sendERC20

* fix: feedback from disco

* chore: remove halmos testsuite

* chore: foundry migration (ethereum-optimism#40)

* chore: track assertion failures

this is so foundry's invariant contract can check that an assertion
returned false in the handler, while still allowing `fail_on_revert =
false` so we can still take full advantage of medusa's fuzzer & coverage
reports

* fix: explicitly skip duplicate supertoken deployments

* chore: remove duplicated PROPERTIES.md file

* chore: expose data to foundry's external invariant checker

* test: run medusa fuzzing campaign from within foundry

* fix: eagerly check for duplicate deployments

* fix: feedback from doc

* chore: shoehorn medusa campaign into foundry dir structure

* chore: remove PROPERTIES.md file

* chore: delete medusa config

* docs: limited support for subdirectories in test/invariant

* chore: rename contracts to be more sneaky about medusa

* docs: rewrite invariant docs in a way compliant with autogen scripts

* chore: fixes from rebase

* fix: cleanup superc20 invariants (ethereum-optimism#46)

* chore: revert modifications from medusa campaign

* docs: extra docs on why ForTest contract is required

* doc: add list of all supertoken properties

* chore: run forge fmt

* ci: allow for testfiles to be deleted

* fix: run doc autogen script after rebase

---------

Co-authored-by: Disco <[email protected]>
Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>
ClaytonNorthey92 referenced this pull request in hemilabs/optimism Apr 4, 2025
88047e707 Add tbcd, a small bitcoin daemon that participates on bitcoin p2p (ethereum-optimism#50)
1146a08b5 localnet reorg fix (ethereum-optimism#76)
87f18a191 build(deps): bump github.com/docker/docker (ethereum-optimism#64)
9073baeaf localnet (ethereum-optimism#37)
1588cbf04 Add common user-specific files to gitignore (ethereum-optimism#51)
210aabe7a Update popm.go, fix typo (ethereum-optimism#40)
a5e689493 make: automate copyright headers (#31)
1c3bfc9bc Use `maps.Clone(m)` to copy returned map in `APICommands()` (#33)
1be4df2a3 Use 'errors.Is' to compare errors (#32)
3f6bc5f8e e2e: sync ElectrumX environment variables with infra (ethereum-optimism#36)
c5b0fea01 electrumx: add connection reuse and pooling (#26)
cfc1293e9 Update README.md (#29)
8896259f0 retry mine keystone on failure (#18)
a10e3bb29 Use '%w' verb in fmt.Errorf to wrap errors (fixes #13) (#27)
6cd677611 deps: update google.golang.org/protobuf to v1.33.0 (#28)
ed7eb8e97 ci: fix concurrency cancel-in-progress for pull requests (#16)
ac3b7eacb docker: update golang image to v1.22.1 (#25)
d6b0ac8af returning response errors if they exist from bfg -> popm (#24)
d450b787a Network test start height + no panic (#22)
b390805c5 allowing BTC Block and L2 Keystone generation rates to be configurable in local network (#19)
bfd3b1dc0 make: add -local flag to goimports (#9)
e0e8964fc Move internal error into protocol package (#10)
7875a897c l2 keystone mining fixes (#3)

git-subtree-dir: heminetwork
git-subtree-split: 88047e707e2db8522e2ad77c5f849e55bc94cd10
ClaytonNorthey92 referenced this pull request in hemilabs/optimism Apr 7, 2025
88047e707 Add tbcd, a small bitcoin daemon that participates on bitcoin p2p (ethereum-optimism#50)
1146a08b5 localnet reorg fix (ethereum-optimism#76)
87f18a191 build(deps): bump github.com/docker/docker (ethereum-optimism#64)
9073baeaf localnet (ethereum-optimism#37)
1588cbf04 Add common user-specific files to gitignore (ethereum-optimism#51)
210aabe7a Update popm.go, fix typo (ethereum-optimism#40)
a5e689493 make: automate copyright headers (#31)
1c3bfc9bc Use `maps.Clone(m)` to copy returned map in `APICommands()` (#33)
1be4df2a3 Use 'errors.Is' to compare errors (#32)
3f6bc5f8e e2e: sync ElectrumX environment variables with infra (ethereum-optimism#36)
c5b0fea01 electrumx: add connection reuse and pooling (#26)
cfc1293e9 Update README.md (#29)
8896259f0 retry mine keystone on failure (#18)
a10e3bb29 Use '%w' verb in fmt.Errorf to wrap errors (fixes #13) (#27)
6cd677611 deps: update google.golang.org/protobuf to v1.33.0 (#28)
ed7eb8e97 ci: fix concurrency cancel-in-progress for pull requests (#16)
ac3b7eacb docker: update golang image to v1.22.1 (#25)
d6b0ac8af returning response errors if they exist from bfg -> popm (#24)
d450b787a Network test start height + no panic (#22)
b390805c5 allowing BTC Block and L2 Keystone generation rates to be configurable in local network (#19)
bfd3b1dc0 make: add -local flag to goimports (#9)
e0e8964fc Move internal error into protocol package (#10)
7875a897c l2 keystone mining fixes (#3)

git-subtree-dir: heminetwork
git-subtree-split: 88047e707e2db8522e2ad77c5f849e55bc94cd10
theochap pushed a commit that referenced this pull request Dec 10, 2025
theochap pushed a commit that referenced this pull request Jan 15, 2026
theochap pushed a commit that referenced this pull request Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants