-
Notifications
You must be signed in to change notification settings - Fork 6
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
Or 1948 make l1 contracts deploy script #309
Conversation
source ~/.bashrc | ||
cd $projectRoot | ||
pnpm install | ||
make submodules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a dependency installation, Go appears to be installed fine, but Go is not found here. Can you please check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it. Actually, there is no problem when I tested.
Please let me know if you still have this error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I found some error during make cannon-prestate
and make op-node
and the error log is here:
make[1]: *** [Makefile:24: op-program-host] Error 1
make[1]: Leaving directory '/tokamak-thanos/op-program'
make: *** [Makefile:138: op-program] Error 2
make -C ./op-node op-node
make[1]: Entering directory '/tokamak-thanos/op-node'
env GO111MODULE=on GOOS= GOARCH= go build -v -ldflags "-X main.GitCommit=1e6182502150c049ae354370a7d7165cf249cb0d -X main.GitDate=1733470411 -X github.com/ethereum-optimism/optimism/op-node/version.Version=untagged -X github.com/ethereum-optimism/optimism/op-node/version.Meta=" -o ./bin/op-node ./cmd/main.go
runtime/cgo
github.com/tokamak-network/tokamak-thanos/op-service/ioutil
# runtime/cgo
gcc: error: unrecognized command-line option '-m64'
github.com/tokamak-network/tokamak-thanos/op-service/jsonutil
make[1]: *** [Makefile:29: op-node] Error 1
make[1]: Leaving directory '/tokamak-thanos/op-node'
make: *** [Makefile:110: op-node] Error 2
However, we don't need to build whole packages to deploy contracts to L1. So we can remove this part if we need much time to resolve the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the gcc version in my env:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can start supporting AMD64 first, because it is enough for TRH project. Your problems relate to an ARM64 CPU.
We need op-node for generate L2 config files and cannon-prestate for compiling smart contracts related to Fault Proof
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, we've already had this conversation. Thanks for checking in!
Which env file should we use? |
Is configFilePath an absolute path only? |
It can be relative! |
I added packages/tokamak/contracts-bedrock/scripts/env.example.deploy as an example env |
Can you rebase this branch from main? |
d5a5e61
to
0d906c9
Compare
It is done. |
|
||
generateL2Genesis() { | ||
echo "Generate L2 genesis" | ||
deployResultFile=$projectRoot/packages/tokamak/contracts-bedrock/deployments/$(printf "%d-deploy.json" "$chainID") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run the deploy command, sometimes the deploy result file is generated as artifact.json instead of {chainID}-deploy.json.
Could you check this issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am checking, still not found anything. Could you give me the config file and the environment variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. i'm so sorry!!
echo $DEPLOYMENT_OUTFILE
deployments/artifact.json
The issue was due to an environment variable I had set earlier.
Now that this commit is in place, there’s no need to worry. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your checking!
I fixed it randomly ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!
source ~/.bashrc | ||
cd $projectRoot | ||
pnpm install | ||
make submodules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, we've already had this conversation. Thanks for checking in!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
Script for deploy smart contract using configf file and .env file.
Deploying smart contracts includes some steps:
Tested on: Ubuntu22.04, Debian:12
Arch: amd64
We can do the 3 steps above by one command:
./start-deploy.sh all -c /tokamak-thanos/packages/tokamak/contracts-bedrock/deploy-config/devnetL1.json -e .env
It is possible if there are issues happened. In these cases, we can retry each steps
Deploy contracts
./start-deploy.sh deploy -c /tokamak-thanos/packages/tokamak/contracts-bedrock/deploy-config/devnetL1.json -e .env
Generate rollup and genesis files
./start-deploy.sh generate -c /tokamak-thanos/packages/tokamak/contracts-bedrock/deploy-config/devnetL1.json -e .env
Thank you!