diff --git a/solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs b/solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs index 1b8761c8a..20265901a 100644 --- a/solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs +++ b/solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs @@ -104,6 +104,7 @@ parameter_types! { } // Holesky: https://github.com/eth-clients/holesky +// Fork versions: https://github.com/eth-clients/holesky/blob/main/metadata/config.yaml #[cfg(not(any( feature = "std", feature = "fast-runtime", @@ -117,19 +118,19 @@ parameter_types! { epoch: 0, }, altair: Fork { - version: hex_literal::hex!("01017000"), // 0x01017000 + version: hex_literal::hex!("02017000"), // 0x02017000 epoch: 0, }, bellatrix: Fork { - version: hex_literal::hex!("01017000"), // 0x01017000 + version: hex_literal::hex!("03017000"), // 0x03017000 epoch: 0, }, capella: Fork { - version: hex_literal::hex!("01017001"), // 0x01017001 + version: hex_literal::hex!("04017000"), // 0x04017000 epoch: 256, }, deneb: Fork { - version: hex_literal::hex!("01017002"), // 0x01017002 + version: hex_literal::hex!("05017000"), // 0x05017000 epoch: 29696, }, }; diff --git a/test/configs/zombie_tanssi_relay_eth_bridge.json b/test/configs/zombie_tanssi_relay_eth_bridge.json index b7002f240..48c981d53 100644 --- a/test/configs/zombie_tanssi_relay_eth_bridge.json +++ b/test/configs/zombie_tanssi_relay_eth_bridge.json @@ -39,6 +39,11 @@ { "name": "bob", "validator": true + }, + { + "name": "charlie", + "ws_port": "9948", + "validator": true } ] }, diff --git a/test/moonwall.config.json b/test/moonwall.config.json index c446a77ba..57b30ecf3 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -859,6 +859,11 @@ "name": "Tanssi-relay", "type": "polkadotJs", "endpoints": ["ws://127.0.0.1:9947"] + }, + { + "name": "Tanssi-charlie", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9948"] } ] }, diff --git a/test/suites/zombie_tanssi_relay_eth_bridge/test_zombie_tanssi_relay_eth_bridge.ts b/test/suites/zombie_tanssi_relay_eth_bridge/test_zombie_tanssi_relay_eth_bridge.ts index d747d93fd..708218b10 100644 --- a/test/suites/zombie_tanssi_relay_eth_bridge/test_zombie_tanssi_relay_eth_bridge.ts +++ b/test/suites/zombie_tanssi_relay_eth_bridge/test_zombie_tanssi_relay_eth_bridge.ts @@ -27,6 +27,7 @@ describeSuite({ foundationMethods: "zombie", testCases: function ({ it, context }) { let relayApi: ApiPromise; + let relayCharlieApi: ApiPromise; let ethereumNodeChildProcess; let relayerChildProcess; let alice; @@ -44,6 +45,8 @@ describeSuite({ const relayNetwork = relayApi.consts.system.version.specName.toString(); expect(relayNetwork, "Relay API incorrect").to.contain("dancelight"); + relayCharlieApi = context.polkadotJs("Tanssi-charlie"); + // //BeaconRelay const keyring = new Keyring({ type: "sr25519" }); alice = keyring.addFromUri("//Alice", { name: "Alice default" }); @@ -51,10 +54,11 @@ describeSuite({ const executionRelay = keyring.addFromUri("//ExecutionRelay", { name: "Execution relay default" }); // Operator keys - operatorAccount = keyring.addFromUri("//" + "Bob", { name: "COLLATOR" + " ACCOUNT" }); - operatorNimbusKey = keyring.addFromUri("//" + "COLLATOR_NIMBUS", { name: "COLLATOR" + " NIMBUS" }); - - await relayApi.tx.session.setKeys(u8aToHex(operatorNimbusKey), []).signAndSend(operatorAccount); + operatorAccount = keyring.addFromUri("//Charlie", { name: "Charlie default" }); + // We rotate the keys for charlie so that we have access to them from this test as well as the node + operatorNimbusKey = await relayCharlieApi.rpc.author.rotateKeys(); + console.log(`operatorNimbusKey: ${operatorNimbusKey}`); + await relayApi.tx.session.setKeys(operatorNimbusKey, []).signAndSend(operatorAccount); const fundingTxHash = await relayApi.tx.utility .batch([ @@ -182,6 +186,9 @@ describeSuite({ const externalValidatorsBefore = await relayApi.query.externalValidators.externalValidators(); + const sessionValidatorsBefore = await relayApi.query.session.validators(); + expect(!sessionValidatorsBefore.includes(operatorNimbusKey)); + const rawValidators = [ u8aToHex(operatorAccount.addressRaw), "0x7894567890123456789012345678901234567890123456789012345678901234", @@ -226,6 +233,24 @@ describeSuite({ }, }); + it({ + id: "T04", + title: "Operator produces blocks", + test: async function () { + for (let i = 0; i < 20; ++i) { + const latestBlockHash = await relayApi.rpc.chain.getBlockHash(); + const author = (await relayApi.derive.chain.getHeader(latestBlockHash)).author; + if (author == operatorAccount.address) { + return; + } + + await context.waitBlock(1, "Tanssi-relay"); + } + + expect.fail("operator didn't produce a block"); + }, + }); + afterAll(async () => { console.log("Cleaning up"); if (ethereumNodeChildProcess) {