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: improve devnet command #87

Conversation

0x6e616d
Copy link
Member

  • Add configs for anvil for preventing stuck on block creation
  • Remove L2NativeToken deployments in case we set the L2NativeTokenAddress because, in the fork public network, we don't need to deploy this contract to the network
  • Replace the images in docker-compose by using onthertech/image-* with the custom tag

@0x6e616d 0x6e616d requested a review from a team March 11, 2024 02:30
@0x6e616d 0x6e616d self-assigned this Mar 11, 2024
@rlgns98kr
Copy link
Member

Thank you Nam!
Will you check about the genesis-l1.json in case of fork-network ?

@0x6e616d
Copy link
Member Author

0x6e616d commented Mar 11, 2024

Thank you Nam! Will you check about the genesis-l1.json in case of fork-network ?

Ohh I've got this point, let me see

@0x6e616d
Copy link
Member Author

0x6e616d commented Mar 20, 2024

@rlgns98kr I've tested it. Can you take a look for this PR

To run in the fork public network. You can do the following steps:

  1. Make a copy and edit the values .env.example
  2. Export it to terminal env
  3. Run make devnet-up

The result of this PR is that we don't deploy L2NativeToken contract, but we can still use it on the forked public network. This address is set on other proxies, the same as the normal way.

@rlgns98kr
Copy link
Member

rlgns98kr commented Mar 20, 2024

Thank you very much, Nam! 😍

I knew the reason why below situation is occured thanks to you!

docker logs -f ops-bedrock-l1-1
+ GENESIS_FILE_PATH=/genesis.json
+ jq -r .config.chainId /genesis.json
+ CHAIN_ID=900
+ jq -r .gasLimit /genesis.json
+ GAS_LIMIT=0x1c9c380
+ echo GAS_LIMIT
+ awk '{ printf("%d", $0) }'
+ GAS_LIMIT_VALUE=0
+ RPC_PORT=8545
+ WS_PORT=8546
+ L1_RPC=https://eth-pokt.nodies.app
/entrypoint.sh: line 12: FROM_BLOCK_NUMBER: parameter not set

I think the reason is depends_on
The op-node, op-batcher, op-proposer, artifacts-server has depends_on l1
So, the l1 is restarted in serveral times in the below lines in init.py because of the difference of docker-compose file(fork.docker-compose and docker-compose).

https://github.com/tokamak-network/tokamak-titan-canyon/blob/330250173399506f46bec860038a7ce8a72ca7b4/bedrock-devnet/devnet/__init__.py#L356
https://github.com/tokamak-network/tokamak-titan-canyon/blob/330250173399506f46bec860038a7ce8a72ca7b4/bedrock-devnet/devnet/__init__.py#L363

I think it is good if we can merge docker-compose files...🙇🏼‍♂️

@0x6e616d
Copy link
Member Author

Thank you very much, Nam! 😍

I knew the reason why below situation is occured thanks to you!

docker logs -f ops-bedrock-l1-1
+ GENESIS_FILE_PATH=/genesis.json
+ jq -r .config.chainId /genesis.json
+ CHAIN_ID=900
+ jq -r .gasLimit /genesis.json
+ GAS_LIMIT=0x1c9c380
+ echo GAS_LIMIT
+ awk '{ printf("%d", $0) }'
+ GAS_LIMIT_VALUE=0
+ RPC_PORT=8545
+ WS_PORT=8546
+ L1_RPC=https://eth-pokt.nodies.app
/entrypoint.sh: line 12: FROM_BLOCK_NUMBER: parameter not set

I think the reason is depends_on The op-node, op-batcher, op-proposer, artifacts-server has depends_on l1 So, the l1 is restarted in serveral times in the below lines in init.py because of the difference of docker-compose file(fork.docker-compose and docker-compose).

https://github.com/tokamak-network/tokamak-titan-canyon/blob/330250173399506f46bec860038a7ce8a72ca7b4/bedrock-devnet/devnet/__init__.py#L356

https://github.com/tokamak-network/tokamak-titan-canyon/blob/330250173399506f46bec860038a7ce8a72ca7b4/bedrock-devnet/devnet/__init__.py#L363

I think it is good if we can merge docker-compose files...🙇🏼‍♂️

Thank you, I will merge two files into one. 😊

@0x6e616d
Copy link
Member Author

0x6e616d commented Apr 3, 2024

@rlgns98kr Can you take a look?

@rlgns98kr
Copy link
Member

Thank you very much!
I tested It works well! Great! You did a hard tasks.
Can we add the function of block autocreation in L1 ? 🥰🥰

Copy link
Member

@rlgns98kr rlgns98kr left a comment

Choose a reason for hiding this comment

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

Thank you very much!
I'm sorry my faults! I checked about l1 block auto creation per 12s!

Thank you for your great works! ❤️❤️❤️

@0x6e616d 0x6e616d merged commit 4920bd5 into OR-1257-Update-smart-contracts-for-deposit-TON-in-L1 Apr 3, 2024
6 checks passed
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.

None yet

3 participants