1. 12 Sep, 2024 22 commits
    • smartcontracts's avatar
      fix: do not delete test data directory (#11869) · 0260adb1
      smartcontracts authored
      Our "just clean" command was deleting the entirety of .testdata
      which gets in several scripts now. We don't actually want to
      delete the entirety of .testdata, we want to delete anything
      inside of it (except for the gitkeep file).
      0260adb1
    • AgusDuha's avatar
      feat: introduce OptimismSuperchainERC20Factory (#11617) · 232c54d4
      AgusDuha authored
      * test: add L2 standard bridge interop unit tests (#13)
      
      * test: add L2 standard bridge interop unit tests
      
      * fix: add tests natspec
      
      * fix: unit tests fixes
      
      * fix: super to legacy tests failing
      
      * fix: mock and expect mint and burn
      
      * fix: add generic factory interface (#14)
      
      * test: add L2 standard bridge interop unit tests
      
      * fix: add tests natspec
      
      * fix: add generic factory interface
      
      * feat: modify OptimismMintableERC20Factory for convert (#17)
      
      * test: add L2 standard bridge interop unit tests
      
      * fix: add tests natspec
      
      * fix: add generic factory interface
      
      * feat: modify OptimismMintableERC20Factory for convert
      
      * fix: use only a public function for create3
      
      * feat: rollback interop factory, modify legacy one
      
      * fix: delete local token return variable
      
      * fix: PR fixes
      
      * feat: add superchain erc20 factory implementation (#23)
      
      * feat: add superchain erc20 factory implementation
      
      * fix: remove createX comments
      
      * test: add superchain erc20 factory tests (#25)
      
      * test: add superchain erc20 factory tests
      
      * test: add erc20 asserts
      
      * test: fix expect emit
      
      * fix: remove comments
      
      * feat: add constructor to superchain ERC20 beacon (#34)
      
      * test: remove factory predeploy etch
      
      ----------
      Co-authored-by: default avatar0xng <ng@defi.sucks>
      Co-authored-by: default avatar0xParticle <particle@defi.sucks>
      Co-authored-by: default avatargotzenx <78360669+gotzenx@users.noreply.github.com>
      
      * fix: set an arbitrary address for superchain erc20 impl
      
      * fix: deploy a proxy for the beacon on genesis (#45)
      
      
      ---------
      Co-authored-by: default avatar0xng <ng@defi.sucks>
      
      * fix: conflicts and imports
      
      * fix: interfaces
      
      * chore: add .testdata
      
      * fix: adding back .testdata to gitignore
      
      * fix: new conflicts from ci improvements
      
      ---------
      Co-authored-by: default avatar0xng <ng@defi.sucks>
      Co-authored-by: default avatar0xParticle <particle@defi.sucks>
      Co-authored-by: default avatargotzenx <78360669+gotzenx@users.noreply.github.com>
      Co-authored-by: default avatarDisco <131301107+0xDiscotech@users.noreply.github.com>
      232c54d4
    • Matthew Slipper's avatar
      Add SendAsync to TxMgr (#11843) · 97aa08a6
      Matthew Slipper authored
      * Add SendAsync to TxMgr
      
      Adds a SendAsync method to TxMgr. I'd like to use this for `op-deployer`, which needs to send multiple transactions in parallel but with predictable nonces. `SendAsync` returns a channel that resolves with the result of each send, but synchronously increases the nonce and prepares the first send prior to returning.
      
      * review updates + tests
      97aa08a6
    • clabby's avatar
      chore(op-program): Turn off `fsync` on pebble KV store (#11863) · d887cfa9
      clabby authored
      * chore: Cleanup proofs actions
      
      * tidy
      
      * lint
      
      * adrian review
      
      * move `RunFaultProofProgram` onto the `L2FaultProofEnv` type
      
      * chore(op-program): Turn off `fsync` on pebble KV store
      d887cfa9
    • wissyLeeei's avatar
      Fix the error usage in cannon (#11368) · e3744430
      wissyLeeei authored
      e3744430
    • Inphi's avatar
      cannon: Fix GC emulation of Go programs (#11704) · 7ff5e6ed
      Inphi authored
      * cannon: Fix GC emulation of Go programs
      
      Improves Linux/MIPS32 emulation for Go programs that utilize the garbage
      collector and goroutine scheduling.
      
      This adds support for the following syscalls:
      
      - getpid - used by the go scheduler
      - clock_gettime - used by the go scheduler and for GC assists and to properly emulate
        time related operations such as `time.Sleep`.
      
      Note on GC assists:
      
      The Go GC relies on `clock_gettime` for GC "assists", whereby a mutator can perform a little bit
      of GC without waiting for the scheduler to do so.
      A monotonic clock (runtime.nanotime) is used to compute the current goroutine's compute budget.
      By modeling a MIPS32 CPU that runs at some clock speed (ex: 10 MHz), we can provide a consistent
      emulation of monotonic time needed by the Go runtime.
      All other clock_gettime flags are handled as unimplemented syscalls.
      
      * fix unsupported syscalls test
      
      * fix some review comments
      
      * address review comments
      
      * update snapshots
      
      * fuzz invalid memory proof
      
      * reduce test runtime
      
      * tweak realtime emulation
      
      * reduce test runtime
      
      * set a high timeout for heavy fuzz tests
      
      * simplify fuzz
      
      * fix heavy tests
      7ff5e6ed
    • Adrian Sutton's avatar
      e9337dbb
    • clabby's avatar
      chore: Cleanup proofs actions (#11858) · 77f72687
      clabby authored
      * chore: Cleanup proofs actions
      
      * tidy
      
      * lint
      
      * adrian review
      
      * move `RunFaultProofProgram` onto the `L2FaultProofEnv` type
      77f72687
    • Ratan Kaliani's avatar
      chore: export process frames (#11864) · 4656d49a
      Ratan Kaliani authored
      4656d49a
    • Adrian Sutton's avatar
    • clabby's avatar
      feat: Helper for dumping `fp-tests` fixtures in `op-program` action tests (#11855) · 320e11db
      clabby authored
      * feat: Helper for dumping `fp-tests` fixtures in `op-program` action tests
      
      * adrian review
      320e11db
    • smartcontracts's avatar
      fix: add extra context to check interfaces script logs (#11861) · bd3955a6
      smartcontracts authored
      Updates the output of the check-interfaces script to be more clear
      about cases when removing items from the EXCLUDE_CONTRACTS list is
      acceptable and how to verify that an item is unnecessary.
      bd3955a6
    • smartcontracts's avatar
      maint: add comment to OptimismPortal2 proof submitters mapping (#11853) · 820636fb
      smartcontracts authored
      Adds a comment to OptimismPortal2 that further explains the
      proofSubmitters mapping.
      820636fb
    • Adrian Sutton's avatar
    • smartcontracts's avatar
      fix: add IBeacon to interface check ignore (#11860) · 489d93c7
      smartcontracts authored
      IBeacon should've thrown an error but didn't, need to investigate
      why that was the case. For now I've added it to the ignore list.
      489d93c7
    • clabby's avatar
      feat: Run `op-program` in `op-e2e` action tests (#11846) · 89c9fef1
      clabby authored
      * feat: Run `op-program` in `op-e2e` action tests
      
      * configurable forks
      
      * golint / op-program test
      
      * use correct endpoint
      89c9fef1
    • smartcontracts's avatar
      maint: add remaining L1 contract interfaces (#11848) · 06a62ea8
      smartcontracts authored
      Adds interfaces for all remaining L1 contracts. L2 contracts are
      next!
      06a62ea8
    • Adrian Sutton's avatar
      proofs Add a proofs-tools docker image (#11825) · 327e6e68
      Adrian Sutton authored
      * op-challenger: Add a "big" op-challenger docker image including asterisc and kona
      
      * proofs-tools: Rename op-challenger-deps to proofs-tools and use tagged asterisc and kona sources.
      
      * proofs-tools: Use more recent version of challenger for testing
      
      * proofs-tools: Remove TODO
      
      * proofs-tools: Only build for amd64 - kona doesn't support arm64.
      
      * proofs-tools: Add README
      
      * proofs-tools: Use challenger v1.1.0
      327e6e68
    • Inphi's avatar
      Release op-contracts/v1.6.0 (#11760) · c21d0c5f
      Inphi authored
      * op-contracts/v1.6.0-rc.1 release (#11528)
      
      * Fix deploy-config absolute prestate
      
      * chore: update semver-lock
      
      ---------
      Co-authored-by: default avatarsmartcontracts <kelvin@optimism.io>
      Co-authored-by: default avatarKelvin Fichter <kelvinfichter@gmail.com>
      c21d0c5f
    • smartcontracts's avatar
      feat: run extra fuzz rounds for new fuzz tests (#11748) · 9d8c3426
      smartcontracts authored
      Adds a new script that can run extra fuzz test iterations when
      new fuzz tests are added. Can be used in CI or locally to make
      sure that new fuzz tests aren't flaky.
      9d8c3426
    • Samuel Laferriere's avatar
      feat: concurrent alt-da requests (#11698) · 88b1a95a
      Samuel Laferriere authored
      * feat: initial goroutine blob submission implementation
      
      test(batcher): add e2e test for concurrent altda requests
      
      doc: add explanation comment for FakeDAServer
      
      chore: fix if condition in altda sendTransaction path
      
      feat: add maxConcurrentDaRequests config flag + semaphore
      
      refactor: batcher to use errgroup for da instead of separate semaphore/waitgroup
      
      fix: nil pointer bug after using wrong function after rebase
      
      fix: defn of maxConcurrentDaRequests=0
      
      fix: TestBatcherConcurrentAltDARequests
      
      chore: remove unneeded if statement around time.Sleep
      
      refactor: use TryGo instead of Go to make logic local and easier to read
      
      chore: clean up some comments in batcher
      
      chore: make batcher shutdown cancel pending altda requests by using shutdownCtx instead of killCtx
      
      * chore(batcher): make altda wg wait + log only when useAltDa is true
      
      * refactor: batcher altda submission code into its own function
      
      * test: refactor batcher e2e test to only count batcher txs
      
      * chore: log errors from wait functions
      
      * chore: refactor and minimize time that e2e batcher system tests can run
      
      * chore: lower timeout duration in test
      
      * fix(batcher): maxConcurentDARequests was not being initialized
      88b1a95a
    • Matt Solomon's avatar
      144a7750
  2. 11 Sep, 2024 9 commits
  3. 10 Sep, 2024 9 commits
    • smartcontracts's avatar
      fix: OptimismPortal fuzz flakes (#11818) · f93f9f40
      smartcontracts authored
      OptimismPortal fuzz tests were flaking because the base fee would
      increase so much that there wouldn't be enough gas to burn for the
      user to be able to buy the gas that they want. Introduces an
      additional assumption that will prevent the elasticity multiplier
      and max change denominator from being such that the maximum
      change to the base fee won't cause us to run out of gas.
      f93f9f40
    • protolambda's avatar
    • Matt Solomon's avatar
      OPSM: Begin implementing OP Stack Manager code and it's deployment (#11623) · de31478b
      Matt Solomon authored
      * begin supporting specifying versions in OPSM
      
      * add deploy logic
      
      * deploy OPSM along with implementations
      
      * scaffold opsm interface between scripts
      
      * fixes
      
      * mvp of DeployOPChain
      
      * start working on an e2e opsm test, currently reverts
      
      * fix tests
      
      * test cleanup
      
      * rename opsmSingleton to opsm
      
      * chore: remove unused imports
      
      * refactor: switch from 'new' to blueprints, 50% code size reduction
      
      * fix semgrep
      
      * feat: add OPSM interop tests
      
      * test: add missing specs
      
      * add DisputeGameFactory deployment
      
      * chore: update snapshots
      
      * fix opsm interop support
      
      * chore: update snapshots
      
      * Update packages/contracts-bedrock/test/DeployOPChain.t.sol
      
      * fix: add L1StandardBridge setter and initialization
      
      * chore: small clarification of deploy flow
      
      * Update packages/contracts-bedrock/scripts/DeployImplementations.s.sol
      Co-authored-by: default avatarBlaine Malone <blainemalone01@gmail.com>
      
      * chore: add todos
      
      * fix: change bytes32 to string
      
      * rename addrs to opChainAddrs for clarity
      
      * test: fix assertion string numbering
      
      * chore: update semver lock:
      
      ---------
      Co-authored-by: default avatarBlaine Malone <blainemalone01@gmail.com>
      de31478b
    • Sam Stokes's avatar
      op-node: read DACommitmentType from scr in LoadOPStackRollupConfig (#11830) · 53fa7b9e
      Sam Stokes authored
      * op-node: read DACommitmentType from scr in LoadOPStackRollupConfig
      
      * op-node: check for altda nil pointers before dereferencing
      
      * op-node: leave altDA config nil if not existent in scr config
      53fa7b9e
    • Emiliano Bonassi's avatar
      fix(op-batcher): initAltDA before initChannelConfig (#11816) · 91e306b0
      Emiliano Bonassi authored
      * fix(op-batcher): initAltDA before initChannelConfig
      
      * chore(op-bastcher): fix comment
      91e306b0
    • Matthew Slipper's avatar
      Add broadcast API to Go forge scripts (#11826) · 219ebe00
      Matthew Slipper authored
      * Add broadcast API to Go forge scripts
      
      Adds a hooks-based API to collect transactions broadcasted via `vm.broadcast(*)` in the Go-based Forge scripts. Users pass an `OnBroadcast` hook to the host, which will be called with a `Broadcast` struct with the following fields whenever a transaction needs to be emitted:
      
      ```go
      type Broadcast struct {
      	From     common.Address
      	To       common.Address
      	Calldata []byte
      	Value    *big.Int
      }
      ```
      
      This API lets us layer on custom transaction management in the future which will be helpful for `op-deployer`.
      
      As part of this PR, I changed the internal `callStack` data structure to contain pointers to `CallFrame`s rather than passing by value. I discovered a bug where the pranked sender was not being cleared in subsequent calls due to an ineffectual assignment error. I took a look at the implementation and there are many places where assignments to call frames within the stack happen after converting the value to a reference, so converting the stack to store pointers in the first place both simplified the code and eliminated a class of errors in the future. I updated the public API methods to return copies of the internal structs to prevent accidental mutation.
      
      * Code review updates
      
      * moar review updates
      
      * fix bug with staticcall
      219ebe00
    • Adrian Sutton's avatar
    • Brian Bland's avatar
      feat: Add nested directory data format for op-program kvstore (#11795) · 7f3d6ef5
      Brian Bland authored
      * feat: Add nested directory data format for op-program kvstore
      
      * Review feedback: Update error message
      Co-authored-by: default avatarAdrian Sutton <adrian@symphonious.net>
      
      * op-program: Make directory preimage format the default.
      
      ---------
      Co-authored-by: default avatarAdrian Sutton <adrian@symphonious.net>
      Co-authored-by: default avatarAdrian Sutton <adrian@oplabs.co>
      7f3d6ef5
    • Michael de Hoog's avatar
      Fix race condition in sequencer stopping logic (#11769) · 7e97b67d
      Michael de Hoog authored
      * Fix race condition in sequencer stopping logic
      
      * Add channel to signal that latestHead has been updated
      
      * Fix test
      
      * Store latest sealed separately, as latest gets cleared by engine.PayloadSuccessEvent
      
      * Cleanup tests
      
      * Add assertions on latest block ref variables
      
      * Re-check if sequencer is active
      7e97b67d