Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ddfa4f1
Use locked/polkadot-v0.9.40 substrate and frontier deps
dmitrylavrenov Nov 30, 2023
7c93f7c
[substrate-apply] Move grandpa crates to consensus folder #13458
dmitrylavrenov Nov 30, 2023
6502f4d
Use suitable evm version
dmitrylavrenov Nov 30, 2023
83d879b
Fix naming
dmitrylavrenov Nov 30, 2023
b82fdca
[frontier-apply] EVM + Weight v2 support #1039
dmitrylavrenov Dec 1, 2023
03778fc
[substrate-apply] Deprecate Weight::from_{ref_time, proof_size} #13475
dmitrylavrenov Dec 1, 2023
b2956a3
[substrate-apply] Offences report system rework #13425
dmitrylavrenov Dec 1, 2023
d635e8f
Add missing GasLimitPovSizeRatio for pallet_evm::Config
dmitrylavrenov Dec 4, 2023
8ea9f5e
[frontier-apply] Add pending support for eth_getBlockByNumber #1048
dmitrylavrenov Dec 7, 2023
38a4476
Fix is_precompile return value
dmitrylavrenov Dec 7, 2023
0688449
Add missing args for weight limit and transaction len at runner call …
dmitrylavrenov Dec 7, 2023
a25f485
Add missing trait OnFinalize
dmitrylavrenov Dec 7, 2023
10bc7f9
Use SyncingService for Eth
dmitrylavrenov Dec 7, 2023
c58a4cc
[frontier-apply] sql backend w/ receipt log indexing #883 (part 1)
dmitrylavrenov Dec 7, 2023
d063971
[frontier-apply] Add txpool RPC and impl new_pending_transaction_filt…
dmitrylavrenov Dec 7, 2023
01c062e
[substrate-apply] Extract syncing protocol from sc-network #12828
dmitrylavrenov Dec 8, 2023
dc62dc4
sql backend w/ receipt log indexing #883 (part 2)
dmitrylavrenov Dec 8, 2023
4534351
[frontier-apply] sql backend w/ receipt log indexing #883 (part 3)
dmitrylavrenov Dec 11, 2023
c31739c
Fix tests
dmitrylavrenov Dec 11, 2023
6fc23ec
Update features snapshot
dmitrylavrenov Dec 11, 2023
3dfcf0c
Fux typo
dmitrylavrenov Dec 11, 2023
2f394d6
Fix clippy default usage
dmitrylavrenov Dec 11, 2023
62dd6c2
Fix clippy ref usage
dmitrylavrenov Dec 11, 2023
bd7b194
Add missing docs
dmitrylavrenov Dec 11, 2023
0f3b31d
Introduce frontier backend configuration
dmitrylavrenov Dec 11, 2023
1748656
[frontier-apply] make rocksdb and paritydb optional. (#1088)
dmitrylavrenov Dec 12, 2023
51b3313
Make new_partial async
dmitrylavrenov Dec 12, 2023
f7194d1
Return result for frontier backend creation
dmitrylavrenov Dec 12, 2023
c0d9e3a
Implement a helper function to remove frontier offchain db
dmitrylavrenov Dec 12, 2023
f2a03cc
Update features snapshot
dmitrylavrenov Dec 12, 2023
1e8cdd8
Fix clippy
dmitrylavrenov Dec 12, 2023
ea07c32
Update help stdout fixture
dmitrylavrenov Dec 12, 2023
94b963f
Merge branch 'master' into polkadot-v0.9.40
dmitrylavrenov Dec 13, 2023
d67e63d
Merge branch 'master' into polkadot-v0.9.40
dmitrylavrenov Dec 18, 2023
409db70
[substrate-apply] Pub enum runtime to pub struct runtime #13250
dmitrylavrenov Dec 18, 2023
9b5459e
Update frontier
dmitrylavrenov Dec 22, 2023
54130a7
Properly use evm deps
dmitrylavrenov Dec 22, 2023
1e4d920
Merge branch 'master' into polkadot-v0.9.40
dmitrylavrenov Dec 22, 2023
9b0bee1
Fix fmt
dmitrylavrenov Dec 26, 2023
020def5
Use fully qualified TxPool usage
dmitrylavrenov Jan 8, 2024
8d66bed
Link TODO to humanode issue
dmitrylavrenov Jan 8, 2024
5268b4f
Add test to verify pending block extraction
dmitrylavrenov Jan 9, 2024
bdbe4dd
Return new_partial to be synchronously
dmitrylavrenov Jan 9, 2024
6020f1c
Remove missed added test file
dmitrylavrenov Jan 9, 2024
193f3cb
Fix help sdtout fixture
dmitrylavrenov Jan 17, 2024
d0ef1f3
Remove pending block test
dmitrylavrenov Jan 17, 2024
2088989
Merge branch 'master' into polkadot-v0.9.40
dmitrylavrenov Jan 18, 2024
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
[substrate-apply] Move grandpa crates to consensus folder #13458
  • Loading branch information
dmitrylavrenov committed Nov 30, 2023
commit 7c93f7c799ef54e4f1ec4af12ea0d29301ac11b9
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ sc-consensus = { git = "https://github.com/humanode-network/substrate", branch =
sc-consensus-babe = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-consensus-babe-rpc = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-consensus-epochs = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-consensus-grandpa = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-consensus-grandpa-rpc = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-executor = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-finality-grandpa = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-finality-grandpa-rpc = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-network = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-rpc-api = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
Expand All @@ -116,9 +116,9 @@ sp-block-builder = { git = "https://github.com/humanode-network/substrate", bran
sp-blockchain = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-consensus = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-consensus-babe = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-consensus-grandpa = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-core = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-core-hashing-proc-macro = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-finality-grandpa = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-io = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sp-keyring = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ publish = false
frame-support = { workspace = true }
pallet-im-online = { workspace = true }
sp-consensus-babe = { workspace = true }
sp-finality-grandpa = { workspace = true }
sp-consensus-grandpa = { workspace = true }
sp-runtime = { workspace = true }
2 changes: 1 addition & 1 deletion crates/crypto-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_finality_grandpa::AuthorityId as GrandpaId;
use sp_consensus_grandpa::AuthorityId as GrandpaId;
use sp_runtime::{
app_crypto::{Pair, Public},
traits::IdentifyAccount,
Expand Down
4 changes: 2 additions & 2 deletions crates/humanode-peer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ sc-cli = { workspace = true }
sc-client-api = { workspace = true }
sc-consensus = { workspace = true }
sc-consensus-babe = { workspace = true }
sc-consensus-grandpa = { workspace = true }
sc-executor = { workspace = true }
sc-finality-grandpa = { workspace = true }
sc-service = { workspace = true }
sc-telemetry = { workspace = true }
sc-transaction-pool = { workspace = true }
Expand All @@ -63,8 +63,8 @@ serde_json = { workspace = true }
sp-api = { workspace = true }
sp-application-crypto = { workspace = true }
sp-consensus-babe = { workspace = true }
sp-consensus-grandpa = { workspace = true }
sp-core = { workspace = true }
sp-finality-grandpa = { workspace = true }
sp-inherents = { workspace = true }
sp-io = { workspace = true }
sp-keyring = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/humanode-peer/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use sc_chain_spec_derive::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use serde::{Deserialize, Serialize};
use sp_consensus_babe::AuthorityId as BabeId;
use sp_finality_grandpa::AuthorityId as GrandpaId;
use sp_consensus_grandpa::AuthorityId as GrandpaId;
use sp_runtime::{app_crypto::sr25519, traits::Verify};

/// The concrete chain spec type we're using for the humanode network.
Expand Down
2 changes: 1 addition & 1 deletion crates/humanode-peer/src/cli/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub async fn run() -> sc_cli::Result<()> {
} = service::new_partial(&config)?;
let aux_revert = Box::new(|client, backend, blocks| {
sc_consensus_babe::revert(Arc::clone(&client), backend, blocks)?;
sc_finality_grandpa::revert(client, blocks)?;
sc_consensus_grandpa::revert(client, blocks)?;
Ok(())
});
Ok((cmd.run(client, backend, Some(aux_revert)), task_manager))
Expand Down
30 changes: 15 additions & 15 deletions crates/humanode-peer/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use humanode_runtime::{self, opaque::Block, RuntimeApi};
use sc_client_api::{BlockBackend, BlockchainEvents};
use sc_consensus_babe::SlotProportion;
pub use sc_executor::NativeElseWasmExecutor;
use sc_finality_grandpa::SharedVoterState;
use sc_consensus_grandpa::SharedVoterState;
use sc_service::{
Error as ServiceError, KeystoreContainer, PartialComponents, TaskManager, WarpSyncParams,
};
Expand Down Expand Up @@ -61,7 +61,7 @@ type FullBackend = sc_service::TFullBackend<Block>;
type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;
/// Full type for `GrandpaBlockImport`.
type FullGrandpa =
sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>;
sc_consensus_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>;
/// Full type for `BabeBlockImport`.
type FullBabe = sc_consensus_babe::BabeBlockImport<Block, FullClient, FullGrandpa>;
/// Full type for `FrontierBlockImport`.
Expand Down Expand Up @@ -98,7 +98,7 @@ pub fn new_partial(
sc_consensus::DefaultImportQueue<Block, FullClient>,
sc_transaction_pool::FullPool<Block, FullClient>,
(
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
sc_consensus_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
sc_consensus_babe::BabeLink<Block>,
EffectiveFullBlockImport,
inherents::Creator<FullClient>,
Expand Down Expand Up @@ -157,7 +157,7 @@ pub fn new_partial(

let select_chain = sc_consensus::LongestChain::new(Arc::clone(&backend));

let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import(
let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import(
Arc::clone(&client),
&(Arc::clone(&client) as Arc<_>),
select_chain.clone(),
Expand Down Expand Up @@ -246,7 +246,7 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
..
} = config;

let grandpa_protocol_name = sc_finality_grandpa::protocol_standard_name(
let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name(
&client
.block_hash(0)
.ok()
Expand All @@ -258,11 +258,11 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
config
.network
.extra_sets
.push(sc_finality_grandpa::grandpa_peers_set_config(
.push(sc_consensus_grandpa::grandpa_peers_set_config(
grandpa_protocol_name.clone(),
));

let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new(
let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new(
Arc::clone(&backend),
grandpa_link.shared_authority_set().clone(),
Vec::default(),
Expand Down Expand Up @@ -348,9 +348,9 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError

let grandpa_justification_stream = grandpa_link.justification_stream();
let grandpa_shared_authority_set = grandpa_link.shared_authority_set().clone();
let grandpa_shared_voter_state = sc_finality_grandpa::SharedVoterState::empty();
let grandpa_finality_proof_provider =
sc_finality_grandpa::FinalityProofProvider::new_for_service(
let grandpa_shared_voter_state = sc_consensus_grandpa::SharedVoterState::empty();
let grandpa_consensus_proof_provider =
sc_consensus_grandpa::consensusProofProvider::new_for_service(
Arc::clone(&backend),
Some(grandpa_shared_authority_set.clone()),
);
Expand Down Expand Up @@ -410,7 +410,7 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
grandpa_shared_voter_state: grandpa_shared_voter_state.clone(),
grandpa_shared_authority_set: grandpa_shared_authority_set.clone(),
grandpa_justification_stream: grandpa_justification_stream.clone(),
grandpa_finality_provider: Arc::clone(&grandpa_finality_proof_provider),
grandpa_consensus_provider: Arc::clone(&grandpa_consensus_proof_provider),
},
select_chain: select_chain.clone(),
evm: humanode_rpc::EvmDeps {
Expand Down Expand Up @@ -476,7 +476,7 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
babe,
);

let grandpa_config = sc_finality_grandpa::Config {
let grandpa_config = sc_consensus_grandpa::Config {
// See substrate#1578: make this available through chainspec.
// Ref: https://github.com/paritytech/substrate/issues/1578
gossip_duration: Duration::from_millis(333),
Expand All @@ -490,11 +490,11 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
};

if enable_grandpa {
let grandpa_config = sc_finality_grandpa::GrandpaParams {
let grandpa_config = sc_consensus_grandpa::GrandpaParams {
config: grandpa_config,
link: grandpa_link,
network: Arc::clone(&network),
voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(),
prometheus_registry,
shared_voter_state: SharedVoterState::empty(),
telemetry: telemetry.as_ref().map(|x| x.handle()),
Expand All @@ -503,7 +503,7 @@ pub async fn new_full(config: Configuration) -> Result<TaskManager, ServiceError
task_manager.spawn_essential_handle().spawn_blocking(
"grandpa-voter",
Some("block-finalization"),
sc_finality_grandpa::run_grandpa_voter(grandpa_config)?,
sc_consensus_grandpa::run_grandpa_voter(grandpa_config)?,
);
}

Expand Down
4 changes: 2 additions & 2 deletions crates/humanode-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ sc-client-api = { workspace = true }
sc-consensus-babe = { workspace = true }
sc-consensus-babe-rpc = { workspace = true }
sc-consensus-epochs = { workspace = true }
sc-finality-grandpa = { workspace = true }
sc-finality-grandpa-rpc = { workspace = true }
sc-consensus-grandpa = { workspace = true }
sc-consensus-grandpa-rpc = { workspace = true }
sc-network = { workspace = true }
sc-rpc = { workspace = true }
sc-rpc-api = { workspace = true }
Expand Down
12 changes: 6 additions & 6 deletions crates/humanode-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ use sc_client_api::{
use sc_consensus_babe::{BabeConfiguration, Epoch};
use sc_consensus_babe_rpc::{Babe, BabeApiServer};
use sc_consensus_epochs::SharedEpochChanges;
use sc_finality_grandpa::{
use sc_consensus_grandpa::{
FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,
};
use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer};
use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer};
use sc_network::NetworkService;
pub use sc_rpc_api::DenyUnsafe;
use sc_rpc_spec_v2::chain_spec::{ChainSpec, ChainSpecApiServer};
Expand Down Expand Up @@ -75,8 +75,8 @@ pub struct GrandpaDeps<BE> {
pub grandpa_shared_authority_set: SharedAuthoritySet<Hash, BlockNumber>,
/// Receives notifications about justification events from Grandpa.
pub grandpa_justification_stream: GrandpaJustificationStream<Block>,
/// Finality proof provider.
pub grandpa_finality_provider: Arc<FinalityProofProvider<BE, Block>>,
/// consensus proof provider.
pub grandpa_consensus_provider: Arc<consensusProofProvider<BE, Block>>,
}

/// Extra EVM related dependencies.
Expand Down Expand Up @@ -222,7 +222,7 @@ where
grandpa_shared_voter_state,
grandpa_shared_authority_set,
grandpa_justification_stream,
grandpa_finality_provider,
grandpa_consensus_provider,
} = grandpa;

let EvmDeps {
Expand Down Expand Up @@ -270,7 +270,7 @@ where
grandpa_shared_authority_set,
grandpa_shared_voter_state,
grandpa_justification_stream,
grandpa_finality_provider,
grandpa_consensus_provider,
)
.into_rpc(),
)?;
Expand Down