Skip to content

Commit

Permalink
fix: aggoracle + add config for aggsender
Browse files Browse the repository at this point in the history
Signed-off-by: Ji Hwan <[email protected]>
  • Loading branch information
jhkimqd committed Jan 10, 2025
1 parent 229e394 commit 72c3cb4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
10 changes: 5 additions & 5 deletions input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ DEFAULT_DEPLOYMENT_STAGES = {
# TODO: Remove this parameter to incorporate cdk-erigon inside the central environment.
"deploy_cdk_erigon_node": True,
# Deploy Optimism rollup.
"deploy_optimism_rollup": False,
"deploy_optimism_rollup": True,
# Deploy contracts on L2 (as well as fund accounts).
"deploy_l2_contracts": False,
}

DEFAULT_IMAGES = {
"agglayer_image": "ghcr.io/agglayer/agglayer:0.2.0-rc.23", # https://github.com/agglayer/agglayer/tags
"cdk_aggoracle_image": "arnaubennassar/cdk:12b8e2c", # https://github.com/0xpolygon/cdk/pkgs/container/cdk
"cdk_aggoracle_image": "cdk-aggoracle:latest", # https://github.com/0xpolygon/cdk/pkgs/container/cdk
"cdk_erigon_node_image": "hermeznetwork/cdk-erigon:v2.60.2", # https://hub.docker.com/r/hermeznetwork/cdk-erigon/tags
"cdk_node_image": "ghcr.io/0xpolygon/cdk:0.5.0-beta10", # https://github.com/0xpolygon/cdk/pkgs/container/cdk
"cdk_validium_node_image": "0xpolygon/cdk-validium-node:0.7.0-cdk", # https://hub.docker.com/r/0xpolygon/cdk-validium-node/tags
Expand Down Expand Up @@ -146,9 +146,9 @@ DEFAULT_ACCOUNTS = {
# claimsponsor
"zkevm_l2_claimsponsor_address": "0x0b68058E5b2592b1f472AdFe106305295A332A7C",
"zkevm_l2_claimsponsor_private_key": "0x6d1d3ef5765cf34176d42276edd7a479ed5dc8dbf35182dfdb12e8aafe0a4919",
# aggoracle
"zkevm_l2_aggoracle_address": "0xc653eCD4AC5153a3700Fb13442Bcf00A691cca16",
"zkevm_l2_aggoracle_private_key": "0xa574853f4757bfdcbb59b03635324463750b27e16df897f3d00dc6bef2997ae0",
# aggoracle: prefunded OP Geth account, not originated from the above mnemonic.
"zkevm_l2_aggoracle_address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"zkevm_l2_aggoracle_private_key": "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
}

DEFAULT_L1_ARGS = {
Expand Down
4 changes: 2 additions & 2 deletions lib/cdk_aggoracle.star
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def create_cdk_aggoracle_service_config(
(ports, public_ports) = get_cdk_aggoracle_ports(args)
service_command = get_cdk_aggoracle_cmd(args)
cdk_aggoracle_service_config = ServiceConfig(
image=args["cdk_node_image"],
image=args["cdk_aggoracle_image"],
ports=ports,
public_ports=public_ports,
files={
Expand Down Expand Up @@ -53,7 +53,7 @@ def get_cdk_aggoracle_cmd(args):
"sleep 20 && cdk-node run "
+ "--cfg=/app/config.toml "
+ "--custom-network-file=/app/genesis.json "
+ "--components=aggoracle,rpc"
+ "--components=aggoracle,aggsender"
]

return service_command
34 changes: 33 additions & 1 deletion templates/trusted-node/cdk-node-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ GasOffset = 0

[LastGERSync]
DBPath = "/tmp/lastgersync"
BlockFinality = "LatestBlock"
BlockFinality = "FinalizedBlock"
InitialBlockNum = 0
GlobalExitRootL2Addr = "{{.zkevm_global_exit_root_l2_address}}"
RetryAfterErrorPeriod = "1s"
Expand All @@ -129,6 +129,38 @@ CertificateSendInterval = "1m"
CheckSettledInterval = "5s"
MaxCertSize = 102760448
SaveCertificatesToFilesPath="/tmp"
StoragePath = "/tmp/aggsender.sqlite"
AggLayerURL = "{{.agglayer_url}}"
AggsenderPrivateKey = {Path = "/app/aggoracle.keystore", Password = "{{.zkevm_l2_keystore_password}}"}
URLRPCL2="http://cdk-erigon-rpc-001:8123"
BlockFinality = "FinalizedBlock"
EpochNotificationPercentage = 50
MaxRetriesStoreCertificate = 3
DelayBeetweenRetries = "60s"
KeepCertificatesHistory = true
BridgeMetadataAsHash = true
DryRun = false
EnableRPC = true

[BridgeL1Sync]
DBPath = "/tmp/bridgel1sync.sqlite"
BlockFinality = "FinalizedBlock"
InitialBlockNum = 0
BridgeAddr = "{{.zkevm_bridge_address}}"
SyncBlockChunkSize = 100
RetryAfterErrorPeriod = "1s"
MaxRetryAttemptsAfterError = -1
WaitForNewBlocksPeriod = "3s"

[BridgeL2Sync]
DBPath = "/tmp/bridgel2sync.sqlite"
BlockFinality = "FinalizedBlock"
InitialBlockNum = 0
BridgeAddr = "{{.zkevm_bridge_l2_address}}"
SyncBlockChunkSize = 100
RetryAfterErrorPeriod = "1s"
MaxRetryAttemptsAfterError = -1
WaitForNewBlocksPeriod = "3s"

[L1InfoTreeSync]
# The initial block number from which to start syncing.
Expand Down

0 comments on commit 72c3cb4

Please sign in to comment.