Skip to content

Commit 2be2a94

Browse files
Merge branch 'master' into mainnet
2 parents b3478fc + e0a14a0 commit 2be2a94

35 files changed

Lines changed: 688 additions & 103 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
CMAKE_POLICY_VERSION_MINIMUM: 3.5
3535
RUSTDOCFLAGS: "--enable-index-page -Z unstable-options"
3636
run: |
37-
rustup default nightly-2024-04-22 && cargo +nightly-2024-04-22 doc --no-deps
37+
rustup default nightly-2025-02-01 && cargo +nightly-2025-02-01 doc --no-deps
3838
3939
- name: Deploy
4040
uses: peaceiris/actions-gh-pages@v3

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ async-trait = "0.1"
323323
tower = "0.4"
324324
pin-project = "1.0"
325325
mio = "0.6"
326+
mio-extras = "2.0.6"
326327
reqwest = "0.12"
327328

328329
# crypto & hash
@@ -356,6 +357,7 @@ log4rs = "1.3.0"
356357
env_logger = "0.11"
357358
lazy_static = "1.4"
358359
itertools = "0.14"
360+
lazycell = "1.3"
359361
once_cell = "1.21"
360362
byteorder = "1.5"
361363
strum = "0.26"

cargo_fmt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ BASE_PATH=$(dirname "$(realpath "$0")")
55

66
if [[ "$1" == "--install" ]]
77
then
8-
rustup toolchain add nightly-2024-02-04
9-
rustup component add rustfmt --toolchain nightly-2024-02-04
8+
rustup toolchain add nightly-2025-02-01
9+
rustup component add rustfmt --toolchain nightly-2025-02-01
1010
rustup component add clippy
1111
shift
1212
else
13-
"$BASE_PATH/dev-support/cargo_all.sh" +nightly-2024-02-04 fmt --all $@
13+
"$BASE_PATH/dev-support/cargo_all.sh" +nightly-2025-02-01 fmt --all $@
1414
fi

crates/cfxcore/core/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ futures = { workspace = true, features = ["compat"] }
2929
hashbrown = { workspace = true }
3030
hibitset = { workspace = true }
3131
itertools = { workspace = true }
32-
io = { workspace = true }
3332
jsonrpc-core = { workspace = true }
3433
keccak-hash = { workspace = true }
3534
kvdb = { workspace = true }

crates/cfxcore/core/src/light_protocol/handler/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ use cfx_parameters::light::{
3636
};
3737
use cfx_types::H256;
3838
use diem_types::validator_config::{ConsensusPublicKey, ConsensusVRFPublicKey};
39-
use io::TimerToken;
4039
use network::{
4140
node_table::NodeId, service::ProtocolVersion, NetworkContext,
4241
NetworkProtocolHandler,
@@ -57,6 +56,8 @@ use sync::{
5756
};
5857
use throttling::token_bucket::TokenBucketManager;
5958

59+
type TimerToken = usize;
60+
6061
const SYNC_TIMER: TimerToken = 0;
6162
const REQUEST_CLEANUP_TIMER: TimerToken = 1;
6263
const LOG_STATISTICS_TIMER: TimerToken = 2;

crates/cfxcore/core/src/light_protocol/provider.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ use cfx_parameters::light::{
4646
};
4747
use cfx_types::H256;
4848
use diem_types::validator_config::{ConsensusPublicKey, ConsensusVRFPublicKey};
49-
use io::TimerToken;
5049
use malloc_size_of_derive::MallocSizeOf as DeriveMallocSizeOf;
5150
use network::{
5251
node_table::NodeId, service::ProtocolVersion,
@@ -65,6 +64,8 @@ use std::{
6564
};
6665
use throttling::token_bucket::{ThrottleResult, TokenBucketManager};
6766

67+
type TimerToken = usize;
68+
6869
const CHECK_PEER_HEARTBEAT_TIMER: TimerToken = 0;
6970

7071
#[derive(DeriveMallocSizeOf)]

crates/cfxcore/core/src/pos/protocol/sync_protocol.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use diem_types::{
1818
epoch_change::EpochChangeProof,
1919
validator_config::{ConsensusPublicKey, ConsensusVRFPublicKey},
2020
};
21-
use io::TimerToken;
2221
use network::{
2322
node_table::NodeId, service::ProtocolVersion, NetworkContext,
2423
NetworkProtocolHandler, NetworkService, UpdateNodeOperation,
@@ -47,6 +46,8 @@ use crate::{
4746

4847
use super::{HSB_PROTOCOL_ID, HSB_PROTOCOL_VERSION};
4948

49+
type TimerToken = usize;
50+
5051
#[derive(Default)]
5152
pub struct PeerState {
5253
id: NodeId,

crates/cfxcore/core/src/sync/synchronization_protocol_handler.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use cfx_internal_common::ChainIdParamsDeprecated;
3030
use cfx_parameters::{block::MAX_BLOCK_SIZE_IN_BYTES, sync::*};
3131
use cfx_types::H256;
3232
use diem_types::validator_config::{ConsensusPublicKey, ConsensusVRFPublicKey};
33-
use io::TimerToken;
3433
use malloc_size_of::{new_malloc_size_ops, MallocSizeOf};
3534
use malloc_size_of_derive::MallocSizeOf as DeriveMallocSizeOf;
3635
use metrics::{register_meter_with_group, Meter, MeterTimer};
@@ -64,6 +63,8 @@ lazy_static! {
6463
register_meter_with_group("timer", "sync:propagate_tx_timer");
6564
}
6665

66+
type TimerToken = usize;
67+
6768
const TX_TIMER: TimerToken = 0;
6869
const CHECK_REQUEST_TIMER: TimerToken = 1;
6970
const BLOCK_CACHE_GC_TIMER: TimerToken = 2;

crates/config/src/configuration.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ build_config! {
195195
(eoa_code_transition_height, (Option<u64>), Some(129680000))
196196
(cip151_transition_height, (Option<u64>), None)
197197
(cip645_transition_height, (Option<u64>), None)
198+
(cip145_fix_transition_height, (Option<u64>), None)
198199
// For test only
199200
(align_evm_transition_height, (u64), u64::MAX)
200201

@@ -1513,14 +1514,17 @@ impl Configuration {
15131514
//
15141515
set_conf!(
15151516
self.raw_conf.eoa_code_transition_height.unwrap_or(default_transition_time);
1516-
params.transition_heights => { cip150, cip151, cip152, cip154, cip7702, cip645, eip2537, eip2935, eip7623 }
1517+
params.transition_heights => { cip150, cip151, cip152, cip154, cip7702, cip645, eip2537, eip2935, eip7623, cip145_fix }
15171518
);
15181519
if let Some(x) = self.raw_conf.cip151_transition_height {
15191520
params.transition_heights.cip151 = x;
15201521
}
15211522
if let Some(x) = self.raw_conf.cip645_transition_height {
15221523
params.transition_heights.cip645 = x;
15231524
}
1525+
if let Some(x) = self.raw_conf.cip145_fix_transition_height {
1526+
params.transition_heights.cip145_fix = x;
1527+
}
15241528
params.transition_heights.align_evm =
15251529
self.raw_conf.align_evm_transition_height;
15261530
}

0 commit comments

Comments
 (0)