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

[TUTORIAL] Improve L2 Testnet Tutorial #627

Closed
sbvegan opened this issue Apr 8, 2024 · 7 comments
Closed

[TUTORIAL] Improve L2 Testnet Tutorial #627

sbvegan opened this issue Apr 8, 2024 · 7 comments
Assignees
Labels
community-request docs updates requested by community or OP collective documentation Improvements or additions to documentation gas gas (limit, oracle, estimation) transactions transaction (fees, status, estimating) tutorial new tutorial request or revision to existing tutorial

Comments

@sbvegan
Copy link
Collaborator

sbvegan commented Apr 8, 2024

Brief Description of the Docs Request

The, "Creating Your Own L2 Rollup Testnet" tutorial is currently pinned at an older branch so the tutorial doesn't break with the latest changes to develop. We should update it to be more recent.

Description of the Documentation You'd Like

Two approaches:

  1. Update the tutorials/chain in the monorepo, verify the tutorial works as expected
  2. Update the tutorial to be more evergreen. Explain that you need to deploy the contracts from op-contracts-vX.X.X, and run the client software from a different branch. Also check that the genesis and rollup config generation is solid.

Links to Related Pages

https://docs.optimism.io/builders/chain-operators/tutorials/create-l2-rollup

Additional Context

Feedback in this comment and thread from a chain operator: ethereum-optimism/superchain-registry#125 (comment)
More feedback: ethereum-optimism/developers#329 (reply in thread)

@sbvegan sbvegan added documentation Improvements or additions to documentation community-request docs updates requested by community or OP collective labels Apr 8, 2024
@Chomtana
Copy link
Contributor

Someone also says op-contracts/v1.3.0 branch can't deploy

ethereum-optimism/developers#344

It still fail after switch to op-contracts/v1.3.0. cause of failure seems to be latest release of foundry.
set specific version when install foundry. below is example
https://github.com/gokch/optimism_builder/blob/main/init/Dockerfile#L21

ethereum-optimism/developers#329

Hey, I solved this problem by following their suggestions. OP has made changes in the codebase to generate the genesis and rollup. You may want to follow the discussion below to make it work. Two highlights: 1. uses https://github.com/ethereum-optimism/optimism/tree/op-contracts/v1.3.0 to deploy v1 contract 2.write your l1-deployment json file like https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/extra/addresses/sepolia/base.json

@Chomtana
Copy link
Contributor

Branch op-contracts/v1.3.0 and beyond doesn't have sync() anymore but the document is still using sync()

@opfocus
Copy link
Contributor

opfocus commented Apr 17, 2024

In the "Creating Your Own L2 Rollup Testnet" tutorial, two issues are currently being faced:

it seems that all the issues point towards the process involving the forge script scripts/Deploy.s.sol:Deploy --sig 'sync()' --rpc-url $L1_RPC_URL.

@420516460
Copy link

420516460 commented Apr 17, 2024

When I deployed the op according to the tutorial, i ran into three new issues:

  1. executing forge script scripts/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --slow to deploy the contract to L1, it comes up:
Error: 
Failed to send transaction

Context:
- server returned an error response: error code -32000: max priority fee per gas higher than max fee per gas

solution:
remove --slow flag and add --with-gas-price <value> flag, such as --with-gas-price 2gwei.

  1. Newer versions dont rely on the artifacts. So create genesis files command should be changed to:
go run cmd/main.go genesis l2 \
  --deploy-config ../packages/contracts-bedrock/deploy-config/getting-started.json \
  --l1-deployments ../packages/contracts-bedrock/deployments/getting-started/.deploy \
  --outfile.l2 genesis.json \
  --outfile.rollup rollup.json \
  --l1-rpc $L1_RPC_URL
  1. since artifacts have been remove, so some of the artifact-dependent commands should be modified and described accordingly, for example op-proposer start command:
./bin/op-proposer \
  --poll-interval=12s \
  --rpc.port=8560 \
  --rollup-rpc=http://localhost:8547 \
  --l2oo-address=$(cat ../packages/contracts-bedrock/deployments/getting-started/L2OutputOracleProxy.json | jq -r .address) \
  --private-key=$GS_PROPOSER_PRIVATE_KEY \
  --l1-eth-rpc=$L1_RPC_URL

@sbvegan
Copy link
Collaborator Author

sbvegan commented Apr 17, 2024

Another report of this tutorial being broken: ethereum-optimism/developers#351
Additional context: ethereum-optimism/developers#17 (comment)

@sbvegan sbvegan self-assigned this Apr 23, 2024
@cpengilly cpengilly changed the title [DOCS] Improve L2 Testnet Tutorial [TUTORIAL] Improve L2 Testnet Tutorial May 1, 2024
@cpengilly cpengilly added tutorial new tutorial request or revision to existing tutorial gas gas (limit, oracle, estimation) transactions transaction (fees, status, estimating) labels May 1, 2024
@richardhuaaa
Copy link
Contributor

richardhuaaa commented Jun 13, 2024

The chainid.link for connecting a wallet to the rollup also does not work currently, although just using metamask seems fine. Setting the correct RPC address and chain ID is needed though

This was referenced Aug 9, 2024
@sbvegan
Copy link
Collaborator Author

sbvegan commented Sep 23, 2024

closing in favor of #917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-request docs updates requested by community or OP collective documentation Improvements or additions to documentation gas gas (limit, oracle, estimation) transactions transaction (fees, status, estimating) tutorial new tutorial request or revision to existing tutorial
Projects
None yet
Development

No branches or pull requests

6 participants