-
Notifications
You must be signed in to change notification settings - Fork 128
feat: support taiko_transition chain spec #668
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
Open
smtmfft
wants to merge
4
commits into
main
Choose a base branch
from
trans-chain-spec
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+377
−110
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,211 @@ | ||
| services: | ||
| init: | ||
| build: | ||
| context: .. | ||
| dockerfile: Dockerfile | ||
| image: us-docker.pkg.dev/evmchain/images/raiko:latest | ||
| container_name: raiko-init | ||
| command: --init | ||
| env_file: | ||
| - .env | ||
| devices: | ||
| - "/dev/sgx_enclave:/dev/sgx_enclave" | ||
| - "/dev/sgx_provision:/dev/sgx_provision" | ||
| volumes: | ||
| - /var/log/raiko:/var/log/raiko | ||
| - ${HOME}/.config/gramine:/root/.config/gramine | ||
| - ${TRANSITION_HOME}/raiko:/root/.config/raiko | ||
| environment: | ||
| - SGX=true | ||
| - SGXGETH=${SGXGETH} | ||
| # environment: | ||
| # you can use your own PCCS host | ||
| #- PCCS_HOST=host.docker.internal:8081 | ||
| depends_on: | ||
| - pccs | ||
| init-self-register: | ||
| build: | ||
| context: .. | ||
| args: | ||
| ENABLE_SELF_REGISTER: "true" | ||
| dockerfile: Dockerfile | ||
| image: us-docker.pkg.dev/evmchain/images/raiko:latest | ||
| container_name: raiko-init-self-register | ||
| command: --init-self-register | ||
| env_file: | ||
| - .env | ||
| devices: | ||
| - "/dev/sgx_enclave:/dev/sgx_enclave" | ||
| - "/dev/sgx_provision:/dev/sgx_provision" | ||
| volumes: | ||
| - /var/log/raiko:/var/log/raiko | ||
| - ${HOME}/.config/gramine:/root/.config/gramine | ||
| - ${TRANSITION_HOME}/raiko:/root/.config/raiko | ||
| - ${TRANSITION_HOME}/raiko/config/config.sgx.json:/etc/raiko/config.sgx.json | ||
| environment: | ||
| - SGX=true | ||
| - SGXGETH=${SGXGETH} | ||
| - SENDER_PRIV_KEY=${SENDER_PRIV_KEY} | ||
| - SGX_VERIFIER_ADDRESS=${SGX_VERIFIER_ADDRESS} | ||
| - HOODI_RPC=${HOODI_RPC} | ||
| - HOODI_BEACON_RPC=${HOODI_BEACON_RPC} | ||
| - TAIKO_TRANS_RPC=${TAIKO_TRANS_RPC} | ||
| - REDIS_URL=${REDIS_URL:-redis://redis:6379} | ||
| - NETWORK=${NETWORK} | ||
| - L1_NETWORK=${L1_NETWORK} | ||
| #- PCCS_HOST=host.docker.internal:8081 | ||
| depends_on: | ||
| - pccs | ||
| raiko: | ||
| build: | ||
| context: .. | ||
| dockerfile: Dockerfile | ||
| image: us-docker.pkg.dev/evmchain/images/raiko:latest | ||
| container_name: raiko | ||
| command: | ||
| env_file: | ||
| - .env | ||
| devices: | ||
| - "/dev/sgx_enclave:/dev/sgx_enclave" | ||
| - "/dev/sgx_provision:/dev/sgx_provision" | ||
| volumes: | ||
| - /var/log/raiko:/var/log/raiko | ||
| - ${HOME}/.config/gramine:/root/.config/gramine | ||
| - ${TRANSITION_HOME}/raiko:/root/.config/raiko | ||
| ports: | ||
| - "8080:8080" | ||
| environment: | ||
| - SGX=true | ||
| - SGXGETH=${SGXGETH} | ||
| - SGX_MODE=${SGX_MODE:-local} | ||
| - RAIKO_REMOTE_URL=${RAIKO_REMOTE_URL:-http://transition-sgx-server:9090} | ||
| - GAIKO_REMOTE_URL=${GAIKO_REMOTE_URL:-http://transition-sgx-server:8090} | ||
| - PREFETCH_CHUNK_SIZE=${PREFETCH_CHUNK_SIZE} | ||
| - BASE_CONFIG_FILE=${BASE_CONFIG_FILE:-config.sgx.json} | ||
| - BASE_CHAINSPEC_FILE=${BASE_CHAINSPEC_FILE:-chain_spec_list.docker.json} | ||
| # Set to 0 (which is the default) to run on real hardware; use 1 for testing | ||
| - SGX_DIRECT=${SGX_DIRECT} | ||
| - SGX_PACAYA_INSTANCE_ID=${SGX_PACAYA_INSTANCE_ID} | ||
| - SGXGETH_PACAYA_INSTANCE_ID=${SGXGETH_PACAYA_INSTANCE_ID} | ||
| - SGX_SHASTA_INSTANCE_ID=${SGX_SHASTA_INSTANCE_ID} | ||
| - SGXGETH_SHASTA_INSTANCE_ID=${SGXGETH_SHASTA_INSTANCE_ID} | ||
| - ETHEREUM_RPC=${ETHEREUM_RPC} | ||
| - ETHEREUM_BEACON_RPC=${ETHEREUM_BEACON_RPC} | ||
| - HOODI_RPC=${HOODI_RPC} | ||
| - HOODI_BEACON_RPC=${HOODI_BEACON_RPC} | ||
| - TAIKO_TRANS_RPC=${TAIKO_TRANS_RPC} | ||
| - L1_NETWORK=${L1_NETWORK} | ||
| - NETWORK=${NETWORK} | ||
| - REDIS_URL=${REDIS_URL:-redis://redis:6379} | ||
| - RUST_LOG=${RUST_LOG:-info} | ||
| # you can use your own PCCS host | ||
| #- PCCS_HOST=host.docker.internal:8081 | ||
| # use the host's network to connect to the PCCS | ||
| #extra_hosts: | ||
| # - "host.docker.internal:host-gateway" | ||
| depends_on: | ||
| - redis | ||
| - pccs | ||
| profiles: | ||
| - prod-redis | ||
| raiko-zk: | ||
| build: | ||
| context: .. | ||
| dockerfile: Dockerfile.zk | ||
| image: us-docker.pkg.dev/evmchain/images/raiko-zk:latest | ||
| container_name: raiko-zk | ||
| command: | ||
| env_file: | ||
| - .env | ||
| volumes: | ||
| - /var/log/raiko:/var/log/raiko | ||
| ports: | ||
| - "8090:8080" | ||
| environment: | ||
| # you can use your own PCCS host | ||
| # - PCCS_HOST=host.docker.internal:8081 | ||
| - RUST_LOG=${RUST_LOG:-info} | ||
| - ZK=true | ||
| - PREFETCH_CHUNK_SIZE=${PREFETCH_CHUNK_SIZE} | ||
| - BASE_CONFIG_FILE=${BASE_CONFIG_FILE:-config.sgx.json} | ||
| - BASE_CHAINSPEC_FILE=${BASE_CHAINSPEC_FILE:-chain_spec_list.docker.json} | ||
| - ETHEREUM_RPC=${ETHEREUM_RPC} | ||
| - ETHEREUM_BEACON_RPC=${ETHEREUM_BEACON_RPC} | ||
| - HOODI_RPC=${HOODI_RPC} | ||
| - HOODI_BEACON_RPC=${HOODI_BEACON_RPC} | ||
| - TAIKO_TRANS_RPC=${TAIKO_TRANS_RPC} | ||
| - L1_NETWORK=${L1_NETWORK} | ||
| - NETWORK=${NETWORK} | ||
| - REDIS_URL=${REDIS_URL:-redis://redis:6379} | ||
| # risc0 service env | ||
| - BONSAI_API_KEY=${BONSAI_API_KEY} | ||
| - BONSAI_API_URL=${BONSAI_API_URL} | ||
| # risc0 verifier | ||
| - GROTH16_VERIFIER_RPC_URL=${GROTH16_VERIFIER_RPC_URL} | ||
| - GROTH16_VERIFIER_ADDRESS=${GROTH16_VERIFIER_ADDRESS} | ||
| # sp1 service env | ||
| - NETWORK_RPC_URL=${NETWORK_RPC_URL} | ||
| - NETWORK_PRIVATE_KEY=${NETWORK_PRIVATE_KEY} | ||
| - SKIP_SIMULATION=true | ||
| # sp1 verifier | ||
| - SP1_VERIFIER_RPC_URL=${SP1_VERIFIER_RPC_URL} | ||
| - SP1_VERIFIER_ADDRESS=${SP1_VERIFIER_ADDRESS} | ||
| depends_on: | ||
| - redis | ||
| profiles: | ||
| - prod-redis | ||
| transition-raiko-sgx-server: | ||
| build: | ||
| context: .. | ||
| dockerfile: Dockerfile | ||
| image: us-docker.pkg.dev/evmchain/images/raiko:latest | ||
| container_name: transition-sgx-server | ||
| command: | ||
| env_file: | ||
| - .env | ||
| devices: | ||
| - "/dev/sgx_enclave:/dev/sgx_enclave" | ||
| - "/dev/sgx_provision:/dev/sgx_provision" | ||
| volumes: | ||
| - /var/log/raiko:/var/log/raiko | ||
| - ${HOME}/.config/gramine:/root/.config/gramine | ||
| - ${TRANSITION_HOME}/raiko:/root/.config/raiko | ||
| ports: | ||
| - "8090:8090" | ||
| - "9090:9090" | ||
| environment: | ||
| - SGXGETH=${SGXGETH} | ||
| - SGX_SERVER=true | ||
| - SGX_PACAYA_INSTANCE_ID=${SGX_PACAYA_INSTANCE_ID} | ||
| - SGXGETH_PACAYA_INSTANCE_ID=${SGXGETH_PACAYA_INSTANCE_ID} | ||
| - SGX_SHASTA_INSTANCE_ID=${SGX_SHASTA_INSTANCE_ID} | ||
| - SGXGETH_SHASTA_INSTANCE_ID=${SGXGETH_SHASTA_INSTANCE_ID} | ||
| - GAIKO_GUEST_APP_VERBOSE_LEVEL=${GAIKO_GUEST_APP_VERBOSE_LEVEL} | ||
| # you can use your own PCCS host | ||
| #- PCCS_HOST=host.docker.internal:8081 | ||
| # use the host's network to connect to the PCCS | ||
| #extra_hosts: | ||
| # - "host.docker.internal:host-gateway" | ||
| pccs: | ||
| build: | ||
| context: .. | ||
| dockerfile: Dockerfile.pccs | ||
| image: us-docker.pkg.dev/evmchain/images/pccs:latest | ||
| container_name: pccs | ||
| env_file: | ||
| - .env | ||
| ports: | ||
| - "8081:8081" | ||
| volumes: | ||
| - ${HOME}/.config/sgx-pccs/default.json:/opt/intel/pccs/config/default.json | ||
| - ${HOME}/.config/sgx-pccs/file.crt:/opt/intel/pccs/ssl_key/file.crt | ||
| - ${HOME}/.config/sgx-pccs/private.pem:/opt/intel/pccs/ssl_key/private.pem | ||
| redis: | ||
| image: redis | ||
| container_name: redis | ||
| env_file: | ||
| - .env | ||
| ports: | ||
| - "6379:6379" | ||
| profiles: | ||
| - prod-redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule gaiko
updated
5 files
| +1 −1 | go.mod | |
| +2 −2 | go.sum | |
| +24 −8 | internal/witness/chain_spec.go | |
| +44 −0 | internal/witness/chain_spec_list_default.json | |
| +56 −0 | internal/witness/chain_spec_test.go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 default
rpcendpoint fortaiko_transitionis a plaintexthttp://URL to a raw IP address. This is inconsistent with the other default entries (mostlyhttps://hostnames) and makes MITM/downgrade attacks easier if used outside a trusted network; prefer anhttps://endpoint or a placeholder value that must be overridden via env/config (e.g., viaTAIKO_TRANSITION_RPC).