Skip to content

Inomurko/pull upstream to 174#110

Closed
InoMurko wants to merge 174 commits intov1.7.4from
inomurko/pull_upstream_to_174
Closed

Inomurko/pull upstream to 174#110
InoMurko wants to merge 174 commits intov1.7.4from
inomurko/pull_upstream_to_174

Conversation

@InoMurko
Copy link
Collaborator

No description provided.

danyalprout and others added 30 commits April 23, 2024 20:23
* Enable Fjord in e2e tests / test for RIP-7212

* switch to tagged op-geth
* ci: Add scheduled job to check reproducibility of op-program preimages.

* ci: Add slack notification on failure.
* op-e2e: Expose fields for asterisc e2e

* op-e2e: Add Helper Initializer methods

* op-e2e: Apply initializer methods and exposed fields

* op-e2e: Expose methods for asterisc e2e
* contracts-bedrock: remove cannon deps on bindings

Removes `cannon` deps on `op-bindings` package following
a pattern similar to ethereum-optimism/optimism#10225.
Includes test coverage of the new functions and is the minimal diff to
get things working.

Ideally there was a canonical forge artifact type that is used but for
now we don't worry about it. This unblocks further work on removing the
bindings from the monorepo, greatly improving devex.

* cannon: cleanup, new approach

* ci: attempt fix

* ci: attempt fix

* ci: fixup
* op-bindings: delete `more` files

The `op-bindings` more files existed to add
extra information to the bindings that were
helpful in particular for the L2 genesis generation
process. This commit deletes all more files as well
as the code for generating them. It also deletes
the top level `registry.go` file that used an `init`
function to populate public getters for accessing
the data in more files.

Now that the L2 genesis doesn't happen in Go, this
is all dead code. Removing this will greatly reduce
diff when smart contract code changes.

* cleanup: more dead code

* cleanup: decouple dead code
* ensure "maxDepth < p.depth" never happens

* add more log
Migrates the `op-plasma` service away from using `op-bindings`. Part of
deprecating `op-bindings` as part of smart contract dev. Services
are responsible for maintaining their own bindings now.
* contracts-bedrock: remove bindings requirement

Previously, CI enforced that bindings were kept up to date with
any changes to the smart contracts. This resulted in a lot of
churn with CI, created large diffs when opening PRs and also
took a long time to recompile and generate bindings.

Now that no major services depend on `op-bindings`, we can remove
the need to enforce they are kept up to date. The rest of the bindings
themselves can be removed in a separate PR. Merging this gives a sigh
of relief for all smart contract devs working on the optimism codebase.

* op-bindings-e2e: delete
* chore: `chain-mon` restructuring + fix some paths (exclude contracts for
now)

* chore: Fix the path of the docker with the new restructuring.

* chore: Change the `CODEOWNERS` for the `balance-mon`
* feat(ctb): Log preimage oracle calldata

* Add log tests

x

more binding
* op-challenger: Implement prestate sources

* op-challenger: Add canon-prestates-url flag to configure a source for prestates based on hash
Extracts the game creation logic into reusable code.
* feat(ct): update max bond gas to 300m

Updates the maximum bond gas to 300m up from 200m. Corresponds to
the increase in the cost of publishing a large preimage as a
result of emitting the data as part of a log.

* update kontrol

x

---------

Co-authored-by: clabby <ben@clab.by>
* contracts-bedrock: create TransientContext.sol

* contracts-bedrock: create test for Transient.sol

* contracts-bedrock: add documentation for Transient library

* contracts-bedrock: fix transient test

* contracts-bedrock: minor improvements to Transient lib tests

* contracts-bedrock: minor improvements to documentation for tests of Transient

* contracts-bedrock: minor improvements to documentation for tests of Transient

* contracts-bedrock: refactor Transient lib

* contracts-bedrock: add missing documentation in Transient lib

* contracts-bedrock: set correct CALL_DEPTH_SLOT in Transient lib

* contracts-bedrock: refactor Transient lib into TransientContext lib

* contracts-bedrock: improve labeling of vars in TransientContext

* contracts-bedrock: create tests for TransientContext

* contracts-bedrock: change var type of CALL_DEPTH_SLOT

* contracts-bedrock: refactor tests for TransientContext

* contracts-bedrock: refactor tests for TransientContext

* contracts-bedrock: add testFuzz_increment_fromMax_reverts

* contracts-bedrock: create test_increment_overflow_succeeds

* contracts-bedrock: drop underflow check in TransientContext

* contracts-bedrock: add additional tests for TransientContext

* contracts-bedrock: add documentation for TransientContext

* contracts-bedrock: add documentation for TransientContext

* contracts-bedrock: use suffix for return vars in TransientContext

* contracts-bedrock: use inline hash for callDepthSlot in TransienttContext tests

* contracts-bedrock: reintroduce transient-storage ignored error code to foundry.toml

* contracts-bedrock: remove unnecessary tests for TransientContext

* contracts-bedrock: create snapshots
Now that genesis generation is in solidity, delete
dead code. This code serialized solidity types suitable
for storage. Very similar to abi encoding but not always
the same, big difference was dynamic types, this library
only supported dynamic types <= 31 bytes to not handle the
chunking. This impacted the sorts of types that could
be in the genesis storage.
…r deprecated `--cannon-l2` (#10257)

* op-challenger: Log a warning when deprecated --cannon-l2 option is used.

* op-challenger: Rename --l2-rpc to --l2-eth-rpc for consistency with --l1-eth-rpc
Avoids loading the full state to extract the commitment for each individual game.
Removes the bindgen cli tool from the repo since it is not owned
by anybody and also not used to generate bindings anymore since
we are moving away from auto generated bindings.
This package canonicalized the ast ids that were placed
in the bindings `more` files because any change in the
smart contracts would cause a massive diff in the storage
layout for all storage layouts as they used the ast ids
to represent types. We needed to canonicalize them to have
deterministic bindings generation, otherwise CI would generate
the bindings in a non deterministic way. As we adopted new
solidity features, it would find edge cases in our ast canonicalize
algo, breaking CI. This code helped us for a long time but
now it is no longer used and can be retired.
This package was helpful when we still relied on hardhat
for the compiler toolchain. Now that we use foundry, this
is no longer used anywhere. Deleting to reduce dead code
in the repo.
…he dispute game contracts (#10302)

* op-challenger, op-dispute-mon: Support both old and new versions of the dispute game contracts.

* op-challenger: Update fault dispute game contract tests to cover multiple versions.
* op-challenger: Apply multiple prestates for asterisc

* op-challenger: Add asterisc-prestates-url flag to configure a source for prestates based on hash
…es (#10314)

* op-challenger: Share providers across different asterisc game instances

Avoids loading the full state to extract the commitment for each individual game.

* Fix flag error
tynes and others added 26 commits May 13, 2024 13:35
Migrates the `op-bindings/predeploys` package to
`op-service/predeploys`. There is various other
"system related" code there. This unblocks fully
deleting `op-bindings` as a top level package.
* cannon: Add units tests around hint writes

* cannon: Update hint write fuzz tests to randomize target memory

* cannon: Fix inverted conditional check

* cannon: Clean up unit test - remove panic helper

* cannon: Add error handling to fuzz test randomBytes helper
* feat(ctb): Enforce maximum L2 gas limit

Enforces a maximum L2 gas limit within the `SystemConfig`. This change
helps ensure that OP Stack chain governors keep the L2 block gas limit
within a reasonable range in order to guarantee that the L2 blocks may
be proven.

* In the `_setResourceConfig` function, the new minimum gas limit is
checked to be less than the current `gasLimit`. This value may never be
larger than `MAX_GAS_LIMIT`, per the checks in `_setGasLimit`. This
ensures that the `minimumGasLimit <= maximumGasLimit`

* Update SystemConfig.t.sol

Co-authored-by: Matt Solomon <matt@mattsolomon.dev>

---------

Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
* op-chain-ops: bindings decouple

More small bindings decoupling. After this PR is merged,
it should be possible to move `op-bindings/bindings` into
`op-e2e/bindings`

* dead-code: cleanup

* build: fix
* cannon: Handle div by zero in MIPS.sol

* fix revert stmt style
* ctb: Change Safe contract version to GnosisSafe v1.3.0

This aligns with what the Security Council is running

* ctb: Update snapshots and semver-lock
* feat(ctb): Support `OptimismPortal2` in kontrol tests

Adds a second `DeploymentSummary` to `kontrol` for fault proofs, and
ports the existing `OptimismPortal` proofs with the `OptimismPortal2`.

* summary tests

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* tests

* Update `check-snapshots`

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <matt@mattsolomon.dev>

* Separate snapshot gen

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
* wip

* wip

* fix

* fix

* fix

* fix

* address some of the bots comments

* use version bit of 1

* fix lint

* adding compression type

* update batch reader

* abstract span channel compressor

* test and singular batch compressor

* fix

* lint

* move channel compressor as interface

* add base class

* fix go mod

* test fixes

* address comments

* fix

* fix

* revert channel builder test

* revert ratio compressor test

* add checks to accept brotli only post fjord

* revemo unnecessary in test

* fix forge-std

* gofmt

* address comments

* remove methods in compressor

* fix error msg

* add compression algo flag to optional flags

* add Clone() function

---------

Co-authored-by: Roberto Bayardo <roberto.bayardo@coinbase.com>
…solidity implementation (#10509)

* op-challenger: Show resolvable time in claims list.

Don't require a sort param in list-games.

* op-challenger, op-dispute-mon: Fix chess clock calculations to match the solidity implementation.

Adds clock and L2 block challenge information to list-claims subcommand.
* feat(ctb): Remove `setResourceConfig`

Removes the `setResourceConfig` setter from the `SystemConfig`, only
allowing it to be set by the `ProxyAdmin` owner.

* fmt
* GasPriceOracle fjord fastlz update

* Review feedback
Signed-off-by: petercover <raowanxiang@outlook.com>
* dispute-game: Sanity check disputed claim index

* Fix tests

* update snapshots

* fix docs

* move param

* op-challenger: Supply parent value when performing moves

Also moves calculation of the required bond into the contract bindings so the returned TxCandidate is ready to send.

* op-challenger: Add backwards compatibility with v1.1.1

* op-e2e: Update e2e for new FaultDisputeGame ABI

---------

Co-authored-by: Adrian Sutton <adrian@oplabs.co>
* ctb: Update snapshots and semver-lock

* ctb: Move threshold check from LivenessModule constructor

Perform the check in the deployment scripts instead.

* ctb: Add check to LM deploy script

* ctb: Update snapshots and semver-lock
@socket-security
Copy link

@socket-security
Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Install scripts npm/core-js@2.6.12
  • Install script: postinstall
  • Source: node -e "try{require('./postinstall')}catch(e){}"
Install scripts npm/cypress@12.17.3
  • Install script: postinstall
  • Source: node index.js --exec install
Install scripts npm/core-js-pure@3.34.0
  • Install script: postinstall
  • Source: node -e "try{require('./postinstall')}catch(e){}"
Install scripts npm/core-js@3.34.0
  • Install script: postinstall
  • Source: node -e "try{require('./postinstall')}catch(e){}"

View full report↗︎

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/core-js@2.6.12
  • @SocketSecurity ignore npm/cypress@12.17.3
  • @SocketSecurity ignore npm/core-js-pure@3.34.0
  • @SocketSecurity ignore npm/core-js@3.34.0

@InoMurko InoMurko closed this May 15, 2024
InoMurko pushed a commit that referenced this pull request Jan 30, 2025
* feat: SuperchainWETH redesign (#101)

* feat: add superchain erc20 bridge (#61)

* feat: add superchain erc20 bridge

* fix: interfaces and versions

* refactor: optimism superchain erc20 redesign (#62)

* refactor: use oz upgradeable erc20 as dependency

* chore: update interfaces

* fix: tests based on changes

* refactor: remove op as dependency

* feat: add check for supererc20 bridge on modifier

* chore: update tests and interfaces

* chore: update stack vars name on test

* chore: remove empty gitmodules file

* chore: update superchain weth errors

* test: add superchain erc20 bridge tests (#65)

* test: add superchain erc20 bridge tests

* test: add optimism superchain erc20 beacon tests

* test: remove unnecessary test

* test: tests fixes

* test: tests fixes

* chore: update missing bridge on natspec (#69)

* chore: update missing bridge on natspec

* fix: natspecs

---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* fix: remove superchain erc20 base (#70)

* refactor: update isuperchainweth (#71)


---------

Co-authored-by: agusduha <agusnduha@gmail.com>

* feat: rename mint/burn and add SuperchainERC20 (#74)

* refactor: rename mint and burn functions on superchain erc20

* chore: rename optimism superchain erc20 to superchain erc20

* feat: create optimism superchain erc20 contract

* chore: update natspec and errors

* fix: superchain erc20 tests

* refactor: make superchain erc20 abstract

* refactor: move storage and erc20 metadata functions to implementation

* chore: update interfaces

* chore: update superchain erc20 events

* fix: tests

* fix: natspecs

* fix: add semmver lock and snapshots

* fix: remove unused imports

* fix: natspecs

---------

Co-authored-by: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com>

* fix: refactor zero check (#76)

* fix: pre pr

* fix: semver natspec check failure (#79)

* fix: semver natspec check failure

* fix: ignore mock contracts in semver natspec script

* fix: error message

* feat: add crosschain erc20 interface (#80)

* feat: add crosschain erc20 interface

* fix: refactor interfaces

* fix: superchain bridge natspec (#83)

* fix: superchain weth natspec (#84)

Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: stop inheriting superchain interfaces (#85)

* fix: stop inheriting superchain interfaces

* fix: move events and erros into the implementation

* fix: make superchainERC20 inherits from crosschainERC20

* fix: superchain bridge rename (#86)

* fix: fee vault compiler error (#87)

* fix: remove unused imports

* fix: refactor common errors (#90)

* fix: refactor common errors

* fix: remove unused version

* fix: reuse unauthorized error (#92)

* fix: superchain erc20 factory conflicts

* fix: rename crosschain functions (#94)

* feat: superweth redesign

* fix: pr fixes

* fix: fixes post merge

---------

Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>

* fix: SuperchainWETH redesign fixes (#110)

* fix: superchainWETH redesign fixes

* fix: withdraw arg

* fix: fix revert in SuperchainWETH tests (#112)

---------

Co-authored-by: AgusDuha <81362284+agusduha@users.noreply.github.com>
Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
Co-authored-by: 0xParticle <particle@defi.sucks>
Co-authored-by: agusduha <agusnduha@gmail.com>
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.