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

Fix for e2e setup #1219

Merged
merged 7 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
[profile.default]
solc_version = "0.8.25"
optimizer = true
optimizer_runs = 20_000
optimizer_runs = 200
via_ir = true
test = 'test'
script = 'scripts'
fs_permissions = [{ access = "read-write", path = "test/data"}, { access = "read", path = "./"}]
fs_permissions = [{ access = "read-write", path = "test/data" }, { access = "read", path = "./" }]

ignored_error_codes = [
# DeployLocal.sol is never deployed
5574
5574,
]

# [etherscan]
# mainnet = { key = "${ETHERSCAN_API_KEY}" }
[profile.production]
optimizer_runs = 20_000

[profile.production.etherscan]
mainnet = { key = "${ETHERSCAN_API_KEY}" }
2 changes: 1 addition & 1 deletion relayer/relays/beacon/header/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (h *Header) Sync(ctx context.Context, eg *errgroup.Group) error {

log.Info("starting to sync finalized headers")

ticker := time.NewTicker(time.Second * 10)
ticker := time.NewTicker(time.Second * 30)

eg.Go(func() error {
for {
Expand Down
14 changes: 7 additions & 7 deletions web/packages/test/.envrc-example
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ source_up_if_exists

## Eth config for production
# export INFURA_PROJECT_ID= # Your Infura project id
# export ETH_NETWORK=goerli
# export ETH_NETWORK_ID=5
# export ETH_NETWORK=sepolia
# export ETH_NETWORK_ID=11155111
# export FOUNDRY_PROFILE=production
# export ETHERSCAN_API_KEY= # Your etherscan api key
# export ETH_RPC_ENDPOINT=https://goerli.infura.io/v3
# export ETH_WS_ENDPOINT=wss://goerli.infura.io/ws/v3
# export BEACON_HTTP_ENDPOINT=https://lodestar-goerli.chainsafe.io
# export ETH_RPC_ENDPOINT=https://sepolia.infura.io/v3
# export ETH_WS_ENDPOINT=wss://sepolia.infura.io/ws/v3
# export BEACON_HTTP_ENDPOINT=https://lodestar-sepolia.chainsafe.io
# export ACTIVE_SPEC=mainnet # For real network just uncomment and set as mainnet here
# export DEPLOYER_ETH_KEY= # Your private key to deploy contracts
# export BEEFY_RELAY_ETH_KEY= # Your Beefy relayer account private key
# export PARACHAIN_RELAY_ETH_KEY= # Your Parachain relayer account private key
# export E2E_TEST_ETH_KEY= # Your E2E test account private key
# export ETH_RANDAO_DELAY=128 # 4 epochs=128 slots=25.6mins
# export ETH_RANDAO_EXP=6 # 6 slots before expired
# export MINIMUM_REQUIRED_SIGNATURES=16 # The minimum number of signatures. See ~/scripts/beefy_signature_sampling.py

# export MINIMUM_REQUIRED_SIGNATURES=16 # The minimum number of signatures. See ~/scripts/beefy_signature_sampling.py

## For local dev setup
# export CUMULUS_VER=snowbridge # For dev setup change to some feature branch
Expand Down
6 changes: 3 additions & 3 deletions web/packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"directory": "web/packages/test"
},
"devDependencies": {
"@polkadot/api": "^10.12.1",
"@polkadot/api-cli": "^0.56.2",
"@polkadot/api": "^11.2.1",
"@polkadot/api-cli": "^0.56.11",
"@polkadot/keyring": "^12.6.2",
"@polkadot/types": "^10.12.1",
"@polkadot/types": "^11.2.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"@types/keccak": "^3.0.1",
Expand Down
1 change: 1 addition & 0 deletions web/packages/test/scripts/deploy-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ deploy_command() {
else
forge script \
--rpc-url $eth_endpoint_http \
--legacy \
--broadcast \
-vvv \
$deploy_script
Expand Down
3 changes: 2 additions & 1 deletion web/packages/test/scripts/deploy-ethereum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ start_geth() {
.config.CancunTime = $timestamp
' \
config/genesis.json >$output_dir/genesis.json
geth init --datadir "$ethereum_data_dir" "$output_dir/genesis.json"
geth init --datadir "$ethereum_data_dir" --state.scheme=hash "$output_dir/genesis.json"
geth --vmdebug --datadir "$ethereum_data_dir" --networkid 11155111 \
--http --http.api debug,personal,eth,net,web3,txpool,engine,miner --ws --ws.api debug,eth,net,web3 \
--rpc.allow-unprotected-txs --mine \
Expand All @@ -29,6 +29,7 @@ start_geth() {
--trace "$ethereum_data_dir/trace" \
--gcmode archive \
--syncmode=full \
--state.scheme=hash \
>"$output_dir/geth.log" 2>&1 &
fi
}
Expand Down
1 change: 1 addition & 0 deletions web/packages/test/scripts/set-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ execution_relayer_penpal_pub_key="${EXECUTION_RELAYER_PENPAL_PUB_KEY:-0xf8aed186

## Deployment key
export PRIVATE_KEY="${DEPLOYER_ETH_KEY:-0x4e9444a6efd6d42725a250b650a781da2737ea308c839eaccb0f7f3dbd2fea77}"
export ETHERSCAN_API_KEY="${ETHERSCAN_API_KEY:-0x0}"

## BeefyClient
# For max safety delay should be MAX_SEED_LOOKAHEAD=4 epochs=4*8*6=192s
Expand Down
Loading
Loading