Skip to content

Commit

Permalink
fix(nodle-parachain): try to enforce dalek decoding deeper in the client
Browse files Browse the repository at this point in the history
  • Loading branch information
aliXsed committed Feb 26, 2023
1 parent 07940db commit 2cbfb6e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ jobs:
context: .
file: './Dockerfile'
push: true
tags: nodlecode/chain:dalek-zebra-rc1
tags: |
nodlecode/chain:dalek-zebra-rc2
ghcr.io/nodlecode/chain:dalek-zebra-rc2
labels: ${{ steps.meta.outputs.labels }}
40 changes: 20 additions & 20 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,26 @@ where
)?;
let client = Arc::new(client);

// Set the block number until which ed25519-dalek should be used for signature verification
// Check out https://github.com/paritytech/substrate/pull/12661
// TODO https://github.com/NodleCode/chain/issues/703
const EDEN_BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED: u32 = 2_500_000;
const PARADIS_BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED: u32 = 2_000_000;
use sc_client_api::ExecutorProvider;
match config.chain_spec.id() {
"para_eden" => client.execution_extensions().set_extensions_factory(
sc_client_api::execution_extensions::ExtensionBeforeBlock::<Block, sp_io::UseDalekExt>::new(
EDEN_BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED,
),
),
"para_eden_testing_0510" => client.execution_extensions().set_extensions_factory(
sc_client_api::execution_extensions::ExtensionBeforeBlock::<Block, sp_io::UseDalekExt>::new(
PARADIS_BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED,
),
),
_ => (),
};

let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle());

let telemetry = telemetry.map(|(worker, telemetry)| {
Expand Down Expand Up @@ -238,26 +258,6 @@ where
let backend = params.backend.clone();
let mut task_manager = params.task_manager;

// Set the block number until which ed25519-dalek should be used for signature verification
// Check out https://github.com/paritytech/substrate/pull/12661
// TODO https://github.com/NodleCode/chain/issues/703
const EDEN_BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED: u32 = 2_500_000;
const PARADIS_BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED: u32 = 2_000_000;
use sc_client_api::ExecutorProvider;
match parachain_config.chain_spec.id() {
"para_eden" => client.execution_extensions().set_extensions_factory(
sc_client_api::execution_extensions::ExtensionBeforeBlock::<Block, sp_io::UseDalekExt>::new(
EDEN_BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED,
),
),
"para_eden_testing_0510" => client.execution_extensions().set_extensions_factory(
sc_client_api::execution_extensions::ExtensionBeforeBlock::<Block, sp_io::UseDalekExt>::new(
PARADIS_BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED,
),
),
_ => (),
};

let (relay_chain_interface, collator_key) = build_relay_chain_interface(
polkadot_config,
&parachain_config,
Expand Down

0 comments on commit 2cbfb6e

Please sign in to comment.