Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
04f2167
Start
bkchr Mar 13, 2023
08c0b32
More work!
bkchr Mar 13, 2023
d1d5d4c
Moar
bkchr Mar 14, 2023
55af869
More changes
bkchr Mar 15, 2023
4374d01
More fixes
bkchr Mar 16, 2023
cc3c030
More worrk
bkchr Mar 17, 2023
0cac727
More fixes
bkchr Mar 20, 2023
7dbaa81
More fixes to make it compile
bkchr Mar 20, 2023
5b2fc23
Adds `NoOffchainStorage`
bkchr Mar 21, 2023
9fed302
Pass the extensions
bkchr Mar 21, 2023
6730212
Small basti making small progress
bkchr Mar 22, 2023
63ada35
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Apr 4, 2023
a3ff3e3
Fix merge errors and remove `ExecutionContext`
bkchr Apr 4, 2023
afbc691
Move registration of `ReadRuntimeVersionExt` to `ExecutionExtension`
bkchr Apr 4, 2023
947b02f
Merge remote-tracking branch 'origin/bkchr-move-read-runtime-version-…
bkchr Apr 4, 2023
906fb5a
Fix compilation
bkchr Apr 5, 2023
20f3c02
Register the global extensions inside runtime api instance
bkchr Apr 10, 2023
f6928f8
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Apr 24, 2023
033a32b
Fixes
bkchr Apr 26, 2023
cb24657
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Apr 28, 2023
97befb6
Fix `generate_initial_session_keys` by passing the keystore extension
bkchr May 1, 2023
c76f8fd
Fix the grandpa tests
bkchr May 2, 2023
13347fb
Fix more tests
bkchr May 2, 2023
0bd9113
Fix more tests
bkchr May 2, 2023
d457ac9
Don't set any heap pages if there isn't an override
bkchr May 3, 2023
4e4b5e4
Fix small fallout
bkchr May 3, 2023
7d48c14
FMT
bkchr May 3, 2023
d85f8ea
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr May 5, 2023
05223f1
Fix tests
bkchr May 7, 2023
6ca6737
More tests
bkchr May 8, 2023
440d0e5
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr May 8, 2023
5942c96
Offchain worker custom extensions
bkchr May 9, 2023
5b253f8
More fixes
bkchr May 9, 2023
3b7a8b4
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr May 17, 2023
16714b6
Make offchain tx pool creation reusable
bkchr May 23, 2023
e52f63d
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr May 25, 2023
190e036
Merge remote-tracking branch 'origin/bkchr-offchain-tx-pool-factory' …
bkchr May 25, 2023
902f1a4
Fixes
bkchr May 25, 2023
671f9b9
Fixes
bkchr May 25, 2023
59a6fa0
Set offchain transaction pool in BABE before using it in the runtime
bkchr May 29, 2023
9145976
Add the `offchain_tx_pool` to Grandpa as well
bkchr May 30, 2023
c29dcb3
Fix the nodes
bkchr May 30, 2023
23578b1
Print some error when using the old warnings
bkchr Jun 2, 2023
9208bf4
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jun 2, 2023
0e0325c
Fix merge issues
bkchr Jun 2, 2023
d12e6ba
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jun 5, 2023
65248e9
Fix compilation
bkchr Jun 5, 2023
67b1730
Rename `babe_link`
bkchr Jun 5, 2023
b1bb12d
Rename to `offchain_tx_pool_factory`
bkchr Jun 5, 2023
d4de293
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jun 14, 2023
85ccb89
Cleanup
bkchr Jun 14, 2023
5042fb0
FMT
bkchr Jun 14, 2023
99a5ca8
Fix benchmark name
bkchr Jun 15, 2023
32e69a2
Fix `try-runtime`
bkchr Jun 15, 2023
38191af
Remove `--execution` CLI args
bkchr Jun 15, 2023
8960448
Make clippy happy
bkchr Jun 16, 2023
42301cd
Forward bls functions
bkchr Jun 16, 2023
296ffd5
Merge branch 'bkchr-execution-strategies-remove' of github.com:parity…
bkchr Jun 16, 2023
e4bfccc
Fix docs
bkchr Jun 16, 2023
ae756aa
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jun 20, 2023
22c5603
Update UI tests
bkchr Jun 20, 2023
74ac48e
Update client/api/src/execution_extensions.rs
bkchr Jun 24, 2023
b07fde8
Apply suggestions from code review
bkchr Jun 24, 2023
8b3f2d9
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jun 24, 2023
ec9e872
Update client/cli/src/params/import_params.rs
bkchr Jun 24, 2023
e4781c4
Update client/api/src/execution_extensions.rs
bkchr Jun 24, 2023
4115970
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jun 28, 2023
c668c7c
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jun 29, 2023
9d61976
Merge branch 'bkchr-execution-strategies-remove' of github.com:parity…
bkchr Jun 30, 2023
3c71aa1
Pass the offchain storage to the MMR RPC
bkchr Jun 30, 2023
0c5c43d
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jul 5, 2023
7079d01
Update client/api/src/execution_extensions.rs
bkchr Jul 10, 2023
ad87780
Review comments
bkchr Jul 10, 2023
dc65806
Merge remote-tracking branch 'origin/master' into bkchr-execution-str…
bkchr Jul 10, 2023
792fbcc
Fixes
bkchr Jul 10, 2023
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
Prev Previous commit
Next Next commit
Rename to offchain_tx_pool_factory
  • Loading branch information
bkchr committed Jun 5, 2023
commit b1bb12d9879b5974b51db6764ce6d4e96e74f509
2 changes: 1 addition & 1 deletion bin/node-template/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
prometheus_registry,
shared_voter_state: SharedVoterState::empty(),
telemetry: telemetry.as_ref().map(|x| x.handle()),
offchain_tx_pool: OffchainTransactionPoolFactory::new(transaction_pool),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool),
};

// the GRANDPA voter task is considered infallible, i.e.
Expand Down
4 changes: 2 additions & 2 deletions bin/node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ pub fn new_partial(
spawner: &task_manager.spawn_essential_handle(),
registry: config.prometheus_registry(),
telemetry: telemetry.as_ref().map(|x| x.handle()),
offchain_tx_pool: OffchainTransactionPoolFactory::new(transaction_pool.clone()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()),
})?;

let import_setup = (block_import, grandpa_link, babe_link);
Expand Down Expand Up @@ -548,7 +548,7 @@ pub fn new_full_base(
voting_rule: grandpa::VotingRulesBuilder::default().build(),
prometheus_registry: prometheus_registry.clone(),
shared_voter_state,
offchain_tx_pool: OffchainTransactionPoolFactory::new(transaction_pool.clone()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()),
};

// the GRANDPA voter task is considered infallible, i.e.
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/babe/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ mod tests {
spawner: &task_executor,
registry: None,
telemetry: None,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
})
.unwrap();

Expand Down
10 changes: 5 additions & 5 deletions client/consensus/babe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ pub struct BabeVerifier<Block: BlockT, Client, SelectChain, CIDP> {
config: BabeConfiguration,
epoch_changes: SharedEpochChanges<Block, Epoch>,
telemetry: Option<TelemetryHandle>,
offchain_tx_pool: OffchainTransactionPoolFactory<Block>,
offchain_tx_pool_factory: OffchainTransactionPoolFactory<Block>,
}

impl<Block, Client, SelectChain, CIDP> BabeVerifier<Block, Client, SelectChain, CIDP>
Expand Down Expand Up @@ -1102,7 +1102,7 @@ where
let mut runtime_api = self.client.runtime_api();

// Register the offchain tx pool to be able to use it from the runtime.
runtime_api.register_extension(self.offchain_tx_pool.offchain_transaction_pool(best_hash));
runtime_api.register_extension(self.offchain_tx_pool_factory.offchain_transaction_pool(best_hash));

runtime_api
.submit_report_equivocation_unsigned_extrinsic(
Expand Down Expand Up @@ -1801,7 +1801,7 @@ pub struct ImportQueueParams<'a, Block: BlockT, BI, Client, CIDP, SelectChain, S
/// The offchain transaction pool factory.
///
/// Will be used when sending equivocation reports.
pub offchain_tx_pool: OffchainTransactionPoolFactory<Block>,
pub offchain_tx_pool_factory: OffchainTransactionPoolFactory<Block>,
}

/// Start an import queue for the BABE consensus algorithm.
Expand All @@ -1824,7 +1824,7 @@ pub fn import_queue<Block: BlockT, Client, SelectChain, BI, CIDP, Spawn>(
spawner,
registry,
telemetry,
offchain_tx_pool,
offchain_tx_pool_factory,
}: ImportQueueParams<'_, Block, BI, Client, CIDP, SelectChain, Spawn>,
) -> ClientResult<(DefaultImportQueue<Block, Client>, BabeWorkerHandle<Block>)>
where
Expand Down Expand Up @@ -1857,7 +1857,7 @@ where
epoch_changes: babe_link.epoch_changes.clone(),
telemetry,
client: client.clone(),
offchain_tx_pool,
offchain_tx_pool_factory,
};

let (worker_tx, worker_rx) = channel(HANDLE_BUFFER_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/babe/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl TestNetFactory for BabeTestNet {
config: data.link.config.clone(),
epoch_changes: data.link.epoch_changes.clone(),
telemetry: None,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
},
mutator: MUTATOR.with(|m| m.borrow().clone()),
}
Expand Down
4 changes: 2 additions & 2 deletions client/consensus/grandpa/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ pub(crate) struct Environment<
pub(crate) metrics: Option<Metrics>,
pub(crate) justification_sender: Option<GrandpaJustificationSender<Block>>,
pub(crate) telemetry: Option<TelemetryHandle>,
pub(crate) offchain_tx_pool: OffchainTransactionPoolFactory<Block>,
pub(crate) offchain_tx_pool_factory: OffchainTransactionPoolFactory<Block>,
pub(crate) _phantom: PhantomData<Backend>,
}

Expand Down Expand Up @@ -576,7 +576,7 @@ where
let mut runtime_api = self.client.runtime_api();

runtime_api
.register_extension(self.offchain_tx_pool.offchain_transaction_pool(best_block_hash));
.register_extension(self.offchain_tx_pool_factory.offchain_transaction_pool(best_block_hash));

runtime_api
.submit_report_equivocation_unsigned_extrinsic(
Expand Down
12 changes: 6 additions & 6 deletions client/consensus/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ pub struct GrandpaParams<Block: BlockT, C, N, S, SC, VR> {
///
/// This will be used to create an offchain transaction pool instance for sending an
/// equivocation report from the runtime.
pub offchain_tx_pool: OffchainTransactionPoolFactory<Block>,
pub offchain_tx_pool_factory: OffchainTransactionPoolFactory<Block>,
}

/// Returns the configuration value to put in
Expand Down Expand Up @@ -742,7 +742,7 @@ where
prometheus_registry,
shared_voter_state,
telemetry,
offchain_tx_pool,
offchain_tx_pool_factory,
} = grandpa_params;

// NOTE: we have recently removed `run_grandpa_observer` from the public
Expand Down Expand Up @@ -817,7 +817,7 @@ where
shared_voter_state,
justification_sender,
telemetry,
offchain_tx_pool,
offchain_tx_pool_factory,
);

let voter_work = voter_work.map(|res| match res {
Expand Down Expand Up @@ -887,7 +887,7 @@ where
shared_voter_state: SharedVoterState,
justification_sender: GrandpaJustificationSender<Block>,
telemetry: Option<TelemetryHandle>,
offchain_tx_pool: OffchainTransactionPoolFactory<Block>,
offchain_tx_pool_factory: OffchainTransactionPoolFactory<Block>,
) -> Self {
let metrics = match prometheus_registry.as_ref().map(Metrics::register) {
Some(Ok(metrics)) => Some(metrics),
Expand All @@ -912,7 +912,7 @@ where
metrics: metrics.as_ref().map(|m| m.environment.clone()),
justification_sender: Some(justification_sender),
telemetry: telemetry.clone(),
offchain_tx_pool,
offchain_tx_pool_factory,
_phantom: PhantomData,
});

Expand Down Expand Up @@ -1064,7 +1064,7 @@ where
metrics: self.env.metrics.clone(),
justification_sender: self.env.justification_sender.clone(),
telemetry: self.telemetry.clone(),
offchain_tx_pool: self.env.offchain_tx_pool.clone(),
offchain_tx_pool_factory: self.env.offchain_tx_pool_factory.clone(),
_phantom: PhantomData,
});

Expand Down
14 changes: 7 additions & 7 deletions client/consensus/grandpa/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ fn initialize_grandpa(
voting_rule: (),
prometheus_registry: None,
shared_voter_state: SharedVoterState::empty(),
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
telemetry: None,
};
let voter =
Expand Down Expand Up @@ -483,7 +483,7 @@ async fn finalize_3_voters_1_full_observer() {
prometheus_registry: None,
shared_voter_state: SharedVoterState::empty(),
telemetry: None,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
};

run_grandpa_voter(grandpa_params).expect("all in order with client and network")
Expand Down Expand Up @@ -576,7 +576,7 @@ async fn transition_3_voters_twice_1_full_observer() {
prometheus_registry: None,
shared_voter_state: SharedVoterState::empty(),
telemetry: None,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
};

voters
Expand Down Expand Up @@ -1044,7 +1044,7 @@ async fn voter_persists_its_votes() {
prometheus_registry: None,
shared_voter_state: SharedVoterState::empty(),
telemetry: None,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
};

run_grandpa_voter(grandpa_params).expect("all in order with client and network")
Expand Down Expand Up @@ -1088,7 +1088,7 @@ async fn voter_persists_its_votes() {
prometheus_registry: None,
shared_voter_state: SharedVoterState::empty(),
telemetry: None,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
};

run_grandpa_voter(grandpa_params)
Expand Down Expand Up @@ -1299,7 +1299,7 @@ async fn voter_catches_up_to_latest_round_when_behind() {
prometheus_registry: None,
shared_voter_state: SharedVoterState::empty(),
telemetry: None,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
};

Box::pin(run_grandpa_voter(grandpa_params).expect("all in order with client and network"))
Expand Down Expand Up @@ -1429,7 +1429,7 @@ where
justification_sender: None,
telemetry: None,
_phantom: PhantomData,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
}
}

Expand Down