Skip to content

Commit 0d1811a

Browse files
authored
NODE-35, Release bifrost-node v1.2.3 (#16)
* NODE-35, Release bifrost-node v1.2.3 * NODE-35, chore: increase runtime spec_version * NODE-35, fix: adjust node launch interval preventing port conflicts * NODE-35, fix: set base fee elasticity to zero * NODE-35, fix: remove deprecated random collective flip pallet * NODE-35, fix: only increase spec_version on testnet for now * NODE-35, chore: increase mainnet runtime spec_version
1 parent 726c2ac commit 0d1811a

File tree

55 files changed

+4651
-5682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4651
-5682
lines changed

Cargo.lock

Lines changed: 921 additions & 818 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 155 additions & 90 deletions
Large diffs are not rendered by default.

node/common/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ repository = { workspace = true }
1010

1111
[dependencies]
1212
# third-party dependencies
13-
jsonrpc-core = "18.0.0"
14-
futures = { version = "0.3" }
15-
tokio = { version = "1.13.0", features = ["macros", "sync"] }
13+
futures = { workspace = true }
14+
tokio = { workspace = true, features = ["macros", "sync"] }
1615

1716
# substrate client dependencies
1817
sc-client-api = { workspace = true }
@@ -44,7 +43,7 @@ fc-rpc-debug = { workspace = true }
4443
fc-rpc-trace = { workspace = true }
4544

4645
# Local Dependencies
47-
bp-core = { path = "../../primitives/core" }
46+
bp-core = { workspace = true }
4847

4948
[features]
5049
default = []

node/common/src/cli_opt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ pub struct RpcConfig {
2929
pub eth_statuses_cache: usize,
3030
pub fee_history_limit: u64,
3131
pub max_past_logs: u32,
32+
pub logs_request_timeout: u64,
3233
pub tracing_raw_max_memory_usage: usize,
3334
}

node/common/src/rpc.rs

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@ use fc_rpc::{
55
SchemaV2Override, SchemaV3Override, StorageOverride,
66
};
77
use fc_rpc_core::types::{FeeHistoryCache, FilterPool};
8-
use fp_rpc;
8+
use fp_rpc::{self, EthereumRuntimeRPCApi};
99
use fp_storage::EthereumStorageSchema;
10-
use sc_client_api::{
11-
backend::{Backend, StateBackend},
12-
AuxStore, StorageProvider,
13-
};
10+
use sc_client_api::{backend::Backend, StorageProvider};
1411
use sc_consensus_manual_seal::EngineCommand;
1512
use sc_finality_grandpa::{
1613
FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,
@@ -21,44 +18,33 @@ use sc_rpc_api::DenyUnsafe;
2118
use sc_service::TaskManager;
2219
use sc_transaction_pool::{ChainApi, Pool};
2320
use sp_api::ProvideRuntimeApi;
24-
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
25-
use sp_runtime::{
26-
generic,
27-
traits::{BlakeTwo256, Block as BlockT},
28-
OpaqueExtrinsic as UncheckedExtrinsic,
29-
};
21+
use sp_blockchain::HeaderBackend;
22+
use sp_runtime::{generic, traits::Block as BlockT, OpaqueExtrinsic as UncheckedExtrinsic};
3023
use std::{collections::BTreeMap, sync::Arc};
3124

3225
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
3326

3427
/// Override storage
35-
pub fn overrides_handle<C, BE>(client: Arc<C>) -> Arc<OverrideHandle<Block>>
28+
pub fn overrides_handle<B, C, BE>(client: Arc<C>) -> Arc<OverrideHandle<B>>
3629
where
37-
C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,
38-
C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,
39-
C: Send + Sync + 'static,
40-
C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
41-
BE: Backend<Block> + 'static,
42-
BE::State: StateBackend<BlakeTwo256>,
30+
B: BlockT,
31+
C: ProvideRuntimeApi<B>,
32+
C::Api: EthereumRuntimeRPCApi<B>,
33+
C: HeaderBackend<B> + StorageProvider<B, BE> + 'static,
34+
BE: Backend<B> + 'static,
4335
{
4436
let mut overrides_map = BTreeMap::new();
45-
4637
overrides_map.insert(
4738
EthereumStorageSchema::V1,
48-
Box::new(SchemaV1Override::new(client.clone()))
49-
as Box<dyn StorageOverride<_> + Send + Sync>,
39+
Box::new(SchemaV1Override::new(client.clone())) as Box<dyn StorageOverride<_>>,
5040
);
51-
5241
overrides_map.insert(
5342
EthereumStorageSchema::V2,
54-
Box::new(SchemaV2Override::new(client.clone()))
55-
as Box<dyn StorageOverride<_> + Send + Sync>,
43+
Box::new(SchemaV2Override::new(client.clone())) as Box<dyn StorageOverride<_>>,
5644
);
57-
5845
overrides_map.insert(
5946
EthereumStorageSchema::V3,
60-
Box::new(SchemaV3Override::new(client.clone()))
61-
as Box<dyn StorageOverride<_> + Send + Sync>,
47+
Box::new(SchemaV3Override::new(client.clone())) as Box<dyn StorageOverride<_>>,
6248
);
6349

6450
Arc::new(OverrideHandle {
@@ -121,6 +107,8 @@ pub struct FullDevDeps<C, P, BE, SC, A: ChainApi> {
121107
pub command_sink: Option<futures::channel::mpsc::Sender<EngineCommand<Hash>>>,
122108
/// Maximum number of logs in one query.
123109
pub max_past_logs: u32,
110+
/// Timeout for eth logs query in seconds. (default 10)
111+
pub logs_request_timeout: u64,
124112
}
125113

126114
/// Mainnet/Testnet client dependencies.
@@ -161,6 +149,8 @@ pub struct FullDeps<C, P, BE, SC, A: ChainApi> {
161149
pub block_data_cache: Arc<EthBlockDataCacheTask<Block>>,
162150
/// Maximum number of logs in one query.
163151
pub max_past_logs: u32,
152+
/// Timeout for eth logs query in seconds. (default 10)
153+
pub logs_request_timeout: u64,
164154
}
165155

166156
pub struct SpawnTasksParams<'a, B: BlockT, C, BE> {

node/core/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bifrost-node"
3-
version = "1.2.2"
3+
version = "1.2.3"
44
description = "The node specification for BIFROST Node"
55
authors = { workspace = true }
66
homepage = { workspace = true}
@@ -17,7 +17,7 @@ name = "bifrost-node"
1717

1818
[dependencies]
1919
# third-party dependencies
20-
clap = { version = "4.0.9", features = ["derive"] }
20+
clap = { workspace = true }
2121

2222
# substrate client dependencies
2323
sc-cli = { workspace = true }
@@ -29,15 +29,15 @@ frame-benchmarking = { workspace = true, features = ["std"] }
2929
frame-benchmarking-cli = { workspace = true}
3030

3131
# BIFROST runtimes
32-
bifrost-dev-runtime = { path = "../../runtime/dev", features = ["std", "evm-tracing"] }
33-
bifrost-testnet-runtime = { path = "../../runtime/testnet", features = ["std", "evm-tracing"] }
34-
bifrost-mainnet-runtime = { path = "../../runtime/mainnet", features = ["std", "evm-tracing"] }
32+
bifrost-dev-runtime = { workspace = true, features = ["std", "evm-tracing"] }
33+
bifrost-testnet-runtime = { workspace = true, features = ["std", "evm-tracing"] }
34+
bifrost-mainnet-runtime = { workspace = true, features = ["std", "evm-tracing"] }
3535

3636
# BIFROST node specs
37-
bifrost-common-node = { path = "../common" }
38-
bifrost-dev-node = { path = "../dev" }
39-
bifrost-testnet-node = { path = "../testnet" }
40-
bifrost-mainnet-node = { path = "../mainnet" }
37+
bifrost-common-node = { workspace = true }
38+
bifrost-dev-node = { workspace = true }
39+
bifrost-testnet-node = { workspace = true }
40+
bifrost-mainnet-node = { workspace = true }
4141

4242
[build-dependencies]
4343
substrate-build-script-utils = { workspace = true }

node/core/src/cli.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ pub struct Cli {
4141
#[clap(long, default_value = "10000")]
4242
pub max_past_logs: u32,
4343

44+
/// Timeout for eth logs query RPCs in seconds. (default 10)
45+
#[clap(long, default_value = "10")]
46+
pub logs_request_timeout: u64,
47+
4448
/// Maximum fee history cache size.
4549
#[clap(long, default_value = "2048")]
4650
pub fee_history_limit: u64,

node/core/src/command.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ pub fn run() -> sc_cli::Result<()> {
278278
"Runtime benchmarking wasn't enabled when building the node. \
279279
You can enable it with `--features runtime-benchmarks`."
280280
.into(),
281-
)
281+
);
282282
}
283283

284284
cmd.run::<bifrost_dev_runtime::Block, bifrost_dev_node::service::dev::ExecutorDispatch>(config)
@@ -302,12 +302,14 @@ pub fn run() -> sc_cli::Result<()> {
302302

303303
cmd.run(config, client, db, storage)
304304
},
305-
BenchmarkCmd::Machine(cmd) =>
306-
cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()),
307-
_ =>
305+
BenchmarkCmd::Machine(cmd) => {
306+
cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())
307+
},
308+
_ => {
308309
return Err("Runtime benchmarking wasn't enabled when building the node. \
309310
You can enable it with `--features runtime-benchmarks`."
310-
.into()),
311+
.into())
312+
},
311313
}
312314
})
313315
},
@@ -321,6 +323,7 @@ pub fn run() -> sc_cli::Result<()> {
321323
eth_statuses_cache: cli.eth_statuses_cache,
322324
fee_history_limit: cli.fee_history_limit,
323325
max_past_logs: cli.max_past_logs,
326+
logs_request_timeout: cli.logs_request_timeout,
324327
tracing_raw_max_memory_usage: cli.tracing_raw_max_memory_usage,
325328
};
326329

node/dev/Cargo.toml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ repository = { workspace = true }
1010

1111
[dependencies]
1212
# third-party dependencies
13-
serde_json = "1.0"
14-
jsonrpc-core = "18.0.0"
15-
jsonrpsee = { version = "0.16.2", features = ["server"] }
16-
futures = { version = "0.3" }
17-
hex-literal = { version = "0.3.1" }
18-
tokio = { version = "1.13.0", features = ["macros", "sync"] }
13+
serde_json = { workspace = true }
14+
jsonrpsee = { workspace = true, features = ["server"] }
15+
futures = { workspace = true }
16+
hex-literal = { workspace = true }
17+
tokio = { workspace = true, features = ["macros", "sync"] }
1918

2019
# substrate client dependencies
2120
sc-client-api = { workspace = true }
@@ -48,7 +47,7 @@ sp-blockchain = { workspace = true }
4847
sp-consensus = { workspace = true }
4948

5049
# FRAME dependencies
51-
pallet-bfc-staking = { path = "../../pallets/bfc-staking" }
50+
pallet-bfc-staking = { workspace = true }
5251
pallet-im-online = { workspace = true, features = ["std"] }
5352
pallet-transaction-payment-rpc = { workspace = true }
5453
substrate-frame-rpc-system = { workspace = true }
@@ -75,10 +74,10 @@ frame-benchmarking-cli = { workspace = true }
7574
frame-benchmarking = { workspace = true, features = ["std"] }
7675

7776
# Local Dependencies
78-
bp-core = { path = "../../primitives/core" }
79-
bifrost-dev-runtime = { path = "../../runtime/dev", features = ["std", "evm-tracing"] }
80-
bifrost-dev-constants = { path = "../../runtime/dev/constants" }
81-
bifrost-common-node = { path = "../common" }
77+
bp-core = { workspace = true }
78+
bifrost-dev-runtime = { workspace = true, features = ["std", "evm-tracing"] }
79+
bifrost-dev-constants = { workspace = true }
80+
bifrost-common-node = { workspace = true }
8281

8382
[features]
8483
default = []

node/dev/src/chain_spec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ fn development_genesis(
205205
evm: Default::default(),
206206
ethereum: Default::default(),
207207
base_fee: devnet::BaseFeeConfig::new(
208-
sp_core::U256::from(100 * GWEI * SUPPLY_FACTOR),
209-
sp_runtime::Permill::from_parts(125_000),
208+
sp_core::U256::from(1_000 * GWEI * SUPPLY_FACTOR),
209+
sp_runtime::Permill::zero(),
210210
),
211211
relay_manager: Default::default(),
212212
bfc_staking: devnet::BfcStakingConfig {

0 commit comments

Comments
 (0)