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

feat!: upstream to optimism v1.3.0 #239

Merged
merged 835 commits into from
Jan 17, 2024
Merged

feat!: upstream to optimism v1.3.0 #239

merged 835 commits into from
Jan 17, 2024

Conversation

Pangssu
Copy link
Contributor

@Pangssu Pangssu commented Dec 22, 2023

Description

This is a PR to upstream to Optimism v1.3.0.
Note that I have reduced diffs from Optimism as much as possible to make the upstream task easier.
As a result, there are some breaking changes.

BREAKING CHANGES

  • It retains the hardfork naming used by Optimism, such as Bedrock, Regolith, Canyon. Therefore, the regolith_time field must be added to the rollup.json and l2GenesisRegolithTimeOffset to the deploy-config files. Note that Kroma is always post-regolith environment.
  • You will need to install and use pnpm as your node.js package manager. We no longer use yarn.
  • Some packages have been modified to allow kroma to work properly, and these have been separated into packages with the kroma- prefix.
    • op-bindings -> kroma-bindings
    • op-chain-ops -> kroma-chain-ops
    • bedrock-devnet -> kroma-devnet
  • The way to run e2e tests and startup local devnet has changed.
    • Like Optimism, you need to run the make devnet-allocs command to create an allocs.json before e2e testing.
    • The e2e test uses the config from the devnetL1 environment. For more information, see the packages/contracts/deploy-config/devnetL1-template.json.
    • It use a python script in kroma-devnet to startup the local devnet, not a bash script.

trianglesphere and others added 30 commits October 26, 2023 09:15
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](google/uuid@v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
-  add match check-values-match job that searches using grep
- define workflow to verify initializer value matches between contract and genesis
…/github.com/google/uuid-1.4.0

build(deps): bump github.com/google/uuid from 1.3.1 to 1.4.0
fix: race condition updating last updated scorebook timestamp
…hain-mon_docker_build

chore: Improve chain-mon docker build
ops: handle warm-up output case during docker publish correctly
…rn/types/node-20.8.9

build(deps-dev): bump @types/node from 20.8.8 to 20.8.9
…config

op-node: Pull in Canyon Time from superchain registry
ci: Add filters so op-stack-go-docker-build-release builds on tags.
contracts-bedrock: modern import style in tests
Adds a new helper library called `EIP1967Helper` that can
get the admin and impl storage slots from a `Proxy` implementing
ERC1967. This is more helpful to use than hardcoded magic values
such as `multisig` because it is not clear who the multisig is
since its value is assigned in a different file. We want to decouple
the value from a magic value and set it to exactly what we want it
to be which is the admin. This will work in all cases no matter what
the admin is since it dynamically pulls the value from storage for
the tests.
@Pangssu Pangssu removed the request for review from a team December 22, 2023 06:16
@Pangssu Pangssu force-pushed the feat/upstream-op-v1.3.0 branch 3 times, most recently from 88baeee to 7ba1fb1 Compare December 22, 2023 08:54
@0xHansLee 0xHansLee requested a review from jyc228 January 2, 2024 09:14
@Pangssu Pangssu force-pushed the feat/upstream-op-v1.3.0 branch from 7ba1fb1 to e00548a Compare January 8, 2024 06:55
Makefile Show resolved Hide resolved
Copy link
Contributor

@jyc228 jyc228 left a comment

Choose a reason for hiding this comment

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

lgtm

@kangsorang
Copy link
Contributor

kangsorang commented Jan 12, 2024

Currently, only Legolith and Spanbatch are applied to devnet environments, why not add the Canyon flag as well?
(devnetL1-template.json)

@kangsorang
Copy link
Contributor

And if we are going to include the Canyon hardfork in the next release, it would be nice to include the Canyon environment variable in the script to work in the e2e environment. (OP_E2E_USE_CANYON)


// [Kroma: START]
var (
L1ProxyCount = uint64(2048)
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this value now unnecessary because of the improvements?

@Pangssu Pangssu force-pushed the feat/upstream-op-v1.3.0 branch from e00548a to 1059db8 Compare January 15, 2024 04:05
"l1GenesisBlockTimestamp": "0x64c811bf",
"l2GenesisRegolithTimeOffset": "0x0",
"l2GenesisSpanBatchTimeOffset": "0x0",
"l2GenesisCanyonTimeOffset": "0x40",
Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering if there is a reason why it is 0x40 and not 0x00.
And for l2GenesisCanyonTimeOffset to be set, shouldn't eip1559DenominatorCanyon also be included?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

eip1559DenominatorCanyon added.

If I set the l2GenesisCanyonTimeOffset to 0x40, I think we can test the hard fork on the devnet.

@@ -69,10 +70,14 @@ func blocksTopicV1(cfg *rollup.Config) string {
return fmt.Sprintf("/kroma/%s/0/blocks", cfg.L2ChainID.String())
}

func blocksTopicV2(cfg *rollup.Config) string {
return fmt.Sprintf("/optimism/%s/1/blocks", cfg.L2ChainID.String())
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be nice to unify the format for v1, v2 topics?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree

Copy link
Contributor

@0xHansLee 0xHansLee left a comment

Choose a reason for hiding this comment

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

Why the legacy-bindings and predeployes/address.go are deleted in op-bindings? I know the deleted things are not used in Kroma, but it would also be good to have in terms of less changes compared with Optimism

op-batcher/metrics/metrics.go Outdated Show resolved Hide resolved
op-e2e/actions/blocktime_test.go Outdated Show resolved Hide resolved
op-e2e/actions/l1_replica.go Outdated Show resolved Hide resolved
op-e2e/actions/l2_verifier.go Outdated Show resolved Hide resolved
@@ -69,10 +70,14 @@ func blocksTopicV1(cfg *rollup.Config) string {
return fmt.Sprintf("/kroma/%s/0/blocks", cfg.L2ChainID.String())
}

func blocksTopicV2(cfg *rollup.Config) string {
return fmt.Sprintf("/optimism/%s/1/blocks", cfg.L2ChainID.String())
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree

Copy link
Contributor

Choose a reason for hiding this comment

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

Just curiosity, this filename ends with tests, so I think it's not being recognized as a test file by golang.
Is this by design?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

l2_engine_test.go will test it.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
packages/contracts/hardhat.config.ts Outdated Show resolved Hide resolved
packages/contracts/hardhat.config.ts Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
kroma-validator/challenger.go Outdated Show resolved Hide resolved
kroma-chain-ops/cmd/check-l2/main.go Outdated Show resolved Hide resolved
kroma-chain-ops/crossdomain/encoding_test.go Outdated Show resolved Hide resolved
@Pangssu Pangssu force-pushed the feat/upstream-op-v1.3.0 branch from 1059db8 to 46cf288 Compare January 16, 2024 13:15
Copy link
Contributor

@0xHansLee 0xHansLee left a comment

Choose a reason for hiding this comment

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

LGTM
Before merging, have you tested running a node locally sync with live network (mainnet or sepolia)?

@Pangssu Pangssu force-pushed the feat/upstream-op-v1.3.0 branch 2 times, most recently from 4c992f3 to 1c2755b Compare January 17, 2024 05:45
Copy link
Contributor

@seolaoh seolaoh left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kangsorang kangsorang left a comment

Choose a reason for hiding this comment

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

LGTM!

@Pangssu Pangssu force-pushed the feat/upstream-op-v1.3.0 branch from 1c2755b to b2e2a80 Compare January 17, 2024 07:46
@Pangssu Pangssu merged commit 321b5e0 into dev Jan 17, 2024
2 checks passed
@Pangssu Pangssu deleted the feat/upstream-op-v1.3.0 branch January 17, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Upstream the changes in the other repository.
Projects
None yet
Development

Successfully merging this pull request may close these issues.