Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use castings according to padding #14174

Merged
merged 56 commits into from
Feb 12, 2025
Merged

Use castings according to padding #14174

merged 56 commits into from
Feb 12, 2025

Conversation

alcueca
Copy link
Contributor

@alcueca alcueca commented Feb 5, 2025

Description

Casting bytes20 -> bytes32 pads the variable on the right, while uint160 -> uint256 pads on the left.

In PR14134 a code simplification was introduced that calculated a salt in a non-conventional manner. While still correct, it might be confusing to future users.

This PR corrects that code simplification so that the salt is calculated in the regular manner (padding on the left with zeros).

@alcueca alcueca requested a review from a team as a code owner February 5, 2025 16:00
@alcueca alcueca requested a review from Inphi February 5, 2025 16:00
Copy link
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

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

Nice! We just talked about this offline.

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.59%. Comparing base (31a9b25) to head (1fc1fdc).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14174      +/-   ##
===========================================
- Coverage    45.90%   44.59%   -1.32%     
===========================================
  Files         1008      951      -57     
  Lines        86419    81747    -4672     
===========================================
- Hits         39673    36456    -3217     
+ Misses       43745    42474    -1271     
+ Partials      3001     2817     -184     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?
contracts-bedrock-tests 94.44% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...es/contracts-bedrock/src/L1/OPContractsManager.sol 99.15% <100.00%> (ø)
...racts-bedrock/src/L1/OPContractsManagerInterop.sol 100.00% <100.00%> (ø)

... and 62 files with indirect coverage changes

@Inphi
Copy link
Contributor

Inphi commented Feb 5, 2025

Looks like the semver needs to be updated too. Though I believe there's a contracts freeze, so I dunno if this can be merged yet. cc: @maurelian

@maurelian
Copy link
Contributor

Looks like the semver needs to be updated too. Though I believe there's a contracts freeze, so I dunno if this can be merged yet. cc: @maurelian

Good callout @Inphi. FYI:

  1. the freeze is now enforced in CI (by check-frozen-files.sh).
  2. We've lifted the freeze from the OPCM to allow for audit fixes and other polish.

@alcueca alcueca requested review from a team as code owners February 7, 2025 13:30
@alcueca alcueca removed request for a team February 7, 2025 13:42
ajsutton and others added 22 commits February 12, 2025 06:59
…unsafe head (#14206)

* op-e2e: Introduce helpers for building transition states.

* op-e2e: Add test for disputing a block prior to the proposal block

* op-challenger: Handle requesting superchain roots beyond the current chain head.

* Detect not found responses in prestate provider too.

* Add test to confirm correct enforcement of trace extension activation.

* Add more variants of tests where agreed = disputed. Cover all combinations of trace extension activating.

* Remove printf
* Fix AddLink error type ; clean up reset logic

* fix tests
Adds mirrored compiler restrictions to the lite profile so that
all generated artifacts get overwritten when switching between
build and build-dev.
This parallelizes the job with contracts-bedrock-build so that results
are returned more quickly.
By wrapping the observed errors one layer too deep we were introducing
escaped strings into the logs. Now multi-line and quoted strings appear as-is.
* op-program: Ensure exec msg inclusion during consolidation

* implement timestamp invariants in the program

* use msg expiry in rollup config

* remove leftover non-working test
* feat: Ignore frozen files check by using a PR label

* fix: following https://github.com/orgs/community/discussions/26712

* fix: maybe

* fix: follow existing pattern

* fix: temporarily remove the contracts changed check to make it run

* spike: Using jq instead of grep

* fix: don't extract labels twice

* fix: a bit cleaner output

* fix: minor change to trigger CI again

* fix: Bring back the change check

* feat: Docs

* ci: use circleci-agent step halt to end job

---------

Co-authored-by: alcueca <[email protected]>
Co-authored-by: Maurelian <[email protected]>
Co-authored-by: Maurelian <[email protected]>
…14266)

* op-e2e: Add tests for cascading invalidations

* Make InboxContract an entity in the DSL.

* op-e2e: Focus test cases on consolidation.

* op-e2e: Generate correct payload when executing messages.

* op-e2e: Skip known failing test with reference to tracking issues.
* Add a new updatePrestatehash method to the OPContractsManager

* deployed

* second deployment

* Go back to refactor

* delete file

* format

* make diff smaller

* even smaller

* missing bracket

* Go back on refactoring

* fix build

* fix build

* fix build

* fix build

* fix versions

* add snapshots

* Add a new updatePrestatehash method to the OPContractsManager

* deployed

* second deployment

* Go back to refactor

* delete file

* format

* make diff smaller

* even smaller

* missing bracket

* Go back on refactoring

* fix build

* fix build

* fix build

* fix build

* fix versions

* fix versions

* add snapshots

* update snapshots & semver

* correct semver

* bump OPCM version

* move interface to inherit IOPCM

* fix interface

* update versions

* add specs

* fix deploy opcm setters

* fix deploy opcm setters

* changes asked on review & semver-lock

* Add non implemented tests for coverage

* linting

* New tests & semverlock

* rewrite hasFDG boolean

* semver-lock

* fix review comments

* pre-pr

* semver

* semver-lock

* semverlock again

* final semverlock

* fix comment about versions

* fix comment about versions

* semverlock opcm

* feat: test upgrading just the pdg vs. both games

* feat: remove unused assertValidGameType() function

* review changes

* remove unnecessary comment

* update interface to fix CI

* change file format

* rebase

* semver lock

* valid semlock

* rerun ci

---------

Co-authored-by: JosepBove <[email protected]>
Co-authored-by: JosepBove <[email protected]>
Co-authored-by: JosepBove <[email protected]>
@alcueca alcueca added the M-exempt-frozen-files Meta: Exempt from frozen code label Feb 12, 2025
@alcueca alcueca enabled auto-merge February 12, 2025 07:21
@alcueca alcueca added this pull request to the merge queue Feb 12, 2025
Merged via the queue into develop with commit 7ba4555 Feb 12, 2025
46 checks passed
@alcueca alcueca deleted the bytes-pads-right branch February 12, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-exempt-frozen-files Meta: Exempt from frozen code
Projects
None yet
Development

Successfully merging this pull request may close these issues.