Skip to content

Commit

Permalink
chore: update arbitrum bridge netparams and config
Browse files Browse the repository at this point in the history
  • Loading branch information
wwestgarth committed Apr 19, 2024
1 parent 0ce118d commit bd44c96
Show file tree
Hide file tree
Showing 28 changed files with 206 additions and 174 deletions.
42 changes: 23 additions & 19 deletions generator/vega/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ import (
)

type ConfigTemplateContext struct {
TendermintNodePrefix string
VegaNodePrefix string
DataNodePrefix string
ETHEndpoint string
SecondaryETHEndpoint string
NodeMode string
FaucetPublicKey string
NodeNumber int
NodeSet types.NodeSet
NodeHomeDir string
TendermintNodePrefix string
VegaNodePrefix string
DataNodePrefix string
ETHEndpoint string
SecondaryETHEndpoint string
PrimaryBridgeChainID string
SecondaryBridgeChainID string
NodeMode string
FaucetPublicKey string
NodeNumber int
NodeSet types.NodeSet
NodeHomeDir string
}

func NewConfigTemplate(templateRaw string) (*template.Template, error) {
Expand All @@ -40,15 +42,17 @@ func NewConfigTemplate(templateRaw string) (*template.Template, error) {

func (vg ConfigGenerator) TemplateConfig(ns types.NodeSet, fc *types.Faucet, configTemplate *template.Template) (*bytes.Buffer, error) {
templateCtx := ConfigTemplateContext{
TendermintNodePrefix: vg.conf.TendermintNodePrefix,
VegaNodePrefix: vg.conf.VegaNodePrefix,
DataNodePrefix: vg.conf.DataNodePrefix,
ETHEndpoint: vg.conf.Network.Ethereum.Endpoint,
SecondaryETHEndpoint: vg.conf.Network.SecondaryEthereum.Endpoint,
NodeMode: ns.Mode,
NodeNumber: ns.Index,
NodeSet: ns,
NodeHomeDir: vg.nodeDir(ns.Index),
TendermintNodePrefix: vg.conf.TendermintNodePrefix,
VegaNodePrefix: vg.conf.VegaNodePrefix,
DataNodePrefix: vg.conf.DataNodePrefix,
ETHEndpoint: vg.conf.Network.Ethereum.Endpoint,
SecondaryETHEndpoint: vg.conf.Network.SecondaryEthereum.Endpoint,
PrimaryBridgeChainID: vg.conf.Network.Ethereum.ChainID,
SecondaryBridgeChainID: vg.conf.Network.SecondaryEthereum.ChainID,
NodeMode: ns.Mode,
NodeNumber: ns.Index,
NodeSet: ns,
NodeHomeDir: vg.nodeDir(ns.Index),
}

if fc != nil {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
toolchain go1.21.5

require (
code.vegaprotocol.io/vega v0.76.0-preview.3
code.vegaprotocol.io/vega v0.75.1-0.20240419081557-4e3376272e45
github.com/BurntSushi/toml v1.2.1
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/blang/semver v3.5.1+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
code.vegaprotocol.io/quant v0.2.5 h1:8h+TTHdz1LCO4oGXt8mbowXszd8CQP1MHlJOkthUp1E=
code.vegaprotocol.io/quant v0.2.5/go.mod h1:HEzOoPKj8OIP49r9AZYeo5281M5ygeGWxopwvt8k6Es=
code.vegaprotocol.io/vega v0.76.0-preview.3 h1:hQxw620riH5gdCDH7MDl46Ckseb9Ey3/9rkZ2WPTZPg=
code.vegaprotocol.io/vega v0.76.0-preview.3/go.mod h1:BsCaA1w1yC5MOrsuGx8VJWih59sKmq1xCt6Gd1hsrbw=
code.vegaprotocol.io/vega v0.75.1-0.20240419081557-4e3376272e45 h1:kRQ0TCnKAqUr7VeOkZuEHK17jn8kRNn0FxH13eXNDeE=
code.vegaprotocol.io/vega v0.75.1-0.20240419081557-4e3376272e45/go.mod h1:BsCaA1w1yC5MOrsuGx8VJWih59sKmq1xCt6Gd1hsrbw=
contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg=
contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ=
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
Expand Down
10 changes: 5 additions & 5 deletions net_confs/config.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EOT

pre_start {
docker_service "ganache-1" {
image = "vegaprotocol/ganache:latest"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--miner.blockTime", "1",
"--chain.chainId", "1440",
Expand All @@ -44,28 +44,28 @@ EOT
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
]
static_port {
value = 8545
to = 8545
}
auth_soft_fail = true
}
docker_service "ganache-2" {
image = "vegaprotocol/ganache:latest"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--miner.blockTime", "1",
"--chain.chainId", "1450",
"--chain.networkId", "1451",
"-h", "0.0.0.0",
"-p", "8545",
"-p", "8546",
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
static_port {
value = 8546
to = 8545
to = 8546
}
auth_soft_fail = true
}
Expand Down
53 changes: 28 additions & 25 deletions net_confs/config_checkpoint.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -34,38 +34,38 @@ EOT

pre_start {
docker_service "ganache-1" {
image = "vegaprotocol/ganache:latest"
cmd = "ganache-cli"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--blockTime", "1",
"--chainId", "1440",
"--networkId", "1441",
"--miner.blockTime", "1",
"--chain.chainId", "1440",
"--chain.networkId", "1441",
"-h", "0.0.0.0",
"-p", "8545",
"-m", "ozone access unlock valid olympic save include omit supply green clown session",
"--db", "/app/ganache-db",
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
static_port {
value = 8545
to = 8545
to = 8545
}
auth_soft_fail = true
}
docker_service "ganache-2" {
image = "vegaprotocol/ganache:latest"
cmd = "ganache-cli"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--blockTime", "1",
"--chainId", "1450",
"--networkId", "1451",
"--miner.blockTime", "1",
"--chain.chainId", "1450",
"--chain.networkId", "1451",
"-h", "0.0.0.0",
"-p", "8546",
"-m", "ozone access unlock valid olympic save include omit supply green clown session",
"--db", "/app/ganache-db",
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
static_port {
value = 8546
to = 8546
to = 8546
}
auth_soft_fail = true
}
Expand Down Expand Up @@ -260,7 +260,7 @@ EOT
},
"network_parameters": {
"blockchains.ethereumConfig": "{\"network_id\": \"{{ .PrimaryBridge.NetworkID }}\", \"chain_id\": \"{{ .PrimaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "staking_bridge"}}\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "erc20_vesting"}}\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
"blockchains.evmChainConfig": "{\"network_id\": \"{{ .SecondaryBridge.NetworkID }}\", \"chain_id\": \"{{ .SecondaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"multisig_control_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
"blockchains.evmBridgeConfigs": "{\"configs\": [{\"network_id\": \"{{ .SecondaryBridge.NetworkID }}\", \"chain_id\": \"{{ .SecondaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 2, \"multisig_control_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }, \"block_time\": \"10ms\"}]}",
"blockchains.ethereumRpcAndEvmCompatDataSourcesConfig": "{\"configs\": []}",
"governance.proposal.asset.minClose": "2s",
"governance.proposal.asset.minEnact": "2s",
Expand Down Expand Up @@ -349,17 +349,18 @@ EOT
{{if .FaucetPublicKey}}
BlockchainQueueAllowlist = ["{{ .FaucetPublicKey }}"]
{{end}}
[[EvtForward.EVMBridges]]
Level = "Info"
PollEventRetryDuration = "500ms"
ChainID = "{{.SecondaryBridgeChainID}}"
[SecondaryEvtForward]
Level = "Info"
RetryRate = "1s"
{{if .FaucetPublicKey}}
BlockchainQueueAllowlist = ["{{ .FaucetPublicKey }}"]
{{end}}
[Ethereum]
RPCEndpoint = "{{.ETHEndpoint}}"
SecondaryRPCEndpoint = "{{.SecondaryETHEndpoint}}"
[[Ethereum.EVMBridgeConfigs]]
RPCEndpoint = "{{.SecondaryETHEndpoint}}"
ChainID = "{{.SecondaryBridgeChainID}}"
[Processor]
[Processor.Ratelimit]
Expand Down Expand Up @@ -442,7 +443,9 @@ EOT
[Ethereum]
RPCEndpoint = "{{.ETHEndpoint}}"
SecondaryRPCEndpoint = "{{.SecondaryETHEndpoint}}"
[[Ethereum.EVMBridgeConfigs]]
RPCEndpoint = "{{.SecondaryETHEndpoint}}"
ChainID = "{{.SecondaryBridgeChainID}}"
[Processor]
[Processor.Ratelimit]
Expand Down
10 changes: 5 additions & 5 deletions net_confs/config_clef.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EOT

pre_start {
docker_service "ganache-1" {
image = "vegaprotocol/ganache:latest"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--miner.blockTime", "1",
"--chain.chainId", "1440",
Expand All @@ -44,28 +44,28 @@ EOT
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
]
static_port {
value = 8545
to = 8545
}
auth_soft_fail = true
}
docker_service "ganache-2" {
image = "vegaprotocol/ganache:latest"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--miner.blockTime", "1",
"--chain.chainId", "1450",
"--chain.networkId", "1451",
"-h", "0.0.0.0",
"-p", "8545",
"-p", "8546",
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
static_port {
value = 8546
to = 8545
to = 8546
}
auth_soft_fail = true
}
Expand Down
10 changes: 5 additions & 5 deletions net_confs/config_data_node_snapshot.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EOT

pre_start {
docker_service "ganache-1" {
image = "vegaprotocol/ganache:latest"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--miner.blockTime", "1",
"--chain.chainId", "1440",
Expand All @@ -44,28 +44,28 @@ EOT
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
]
static_port {
value = 8545
to = 8545
}
auth_soft_fail = true
}
docker_service "ganache-2" {
image = "vegaprotocol/ganache:latest"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--miner.blockTime", "1",
"--chain.chainId", "1450",
"--chain.networkId", "1451",
"-h", "0.0.0.0",
"-p", "8545",
"-p", "8546",
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
static_port {
value = 8546
to = 8545
to = 8546
}
auth_soft_fail = true
}
Expand Down
10 changes: 7 additions & 3 deletions net_confs/config_example.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ network "testnet" {
},
"network_parameters": {
"blockchains.ethereumConfig": "{\"network_id\": \"{{ .PrimaryBridge.NetworkID }}\", \"chain_id\": \"{{ .PrimaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "staking_bridge"}}\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "erc20_vesting"}}\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
"blockchains.evmChainConfig": "{\"network_id\": \"{{ .SecondaryBridge.NetworkID }}\", \"chain_id\": \"{{ .SecondaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"multisig_control_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
"blockchains.evmBridgeConfigs": "{\"configs\": [{\"network_id\": \"{{ .SecondaryBridge.NetworkID }}\", \"chain_id\": \"{{ .SecondaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 2, \"multisig_control_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }, \"block_time\": \"10ms\"}]}",
"blockchains.ethereumRpcAndEvmCompatDataSourcesConfig": "{\"configs\": []}",
"governance.proposal.asset.minClose": "2s",
"governance.proposal.asset.minEnact": "2s",
Expand Down Expand Up @@ -310,7 +310,9 @@ network "testnet" {
[Ethereum]
RPCEndpoint = "{{.ETHEndpoint}}"
SecondaryRPCEndpoint = "{{.SecondaryETHEndpoint}}"
[[Ethereum.EVMBridgeConfigs]]
RPCEndpoint = "{{.SecondaryETHEndpoint}}"
ChainID = "{{.SecondaryBridgeChainID}}"
[Processor]
[Processor.Ratelimit]
Expand Down Expand Up @@ -395,7 +397,9 @@ EOT
[Ethereum]
RPCEndpoint = "{{.ETHEndpoint}}"
SecondaryRPCEndpoint = "{{.SecondaryETHEndpoint}}"
[[Ethereum.EVMBridgeConfigs]]
RPCEndpoint = "{{.SecondaryETHEndpoint}}"
ChainID = "{{.SecondaryBridgeChainID}}"
[Processor]
[Processor.Ratelimit]
Expand Down
10 changes: 5 additions & 5 deletions net_confs/config_external_postgres.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EOT

pre_start {
docker_service "ganache-1" {
image = "vegaprotocol/ganache:latest"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--miner.blockTime", "1",
"--chain.chainId", "1440",
Expand All @@ -44,28 +44,28 @@ EOT
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
]
static_port {
value = 8545
to = 8545
}
auth_soft_fail = true
}
docker_service "ganache-2" {
image = "vegaprotocol/ganache:latest"
image = "vegaprotocol/ganache:v1.4.0"
args = [
"--miner.blockTime", "1",
"--chain.chainId", "1450",
"--chain.networkId", "1451",
"-h", "0.0.0.0",
"-p", "8545",
"-p", "8546",
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json",
]
static_port {
value = 8546
to = 8545
to = 8546
}
auth_soft_fail = true
}
Expand Down
Loading

0 comments on commit bd44c96

Please sign in to comment.