Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
db31a28
chore: Updated the frontier and substrate dependencies in the toml
arunjot12 Dec 6, 2024
f381b5a
chore: Updated the version of parity-codec and quote
arunjot12 Dec 6, 2024
a30f9bf
chore: added the pallet-evm and frame-system of v1.11.0
arunjot12 Dec 9, 2024
703e142
chore: added the pallet-staking of v1.11.0
arunjot12 Dec 9, 2024
a525a2a
chore: added the pallet-contracts of v1.11.0
arunjot12 Dec 10, 2024
19ea46f
chore: added the pallet-grandpa and transaction-payment of v1.11.0
arunjot12 Dec 10, 2024
409087a
chore:updated the pallet-babe to v1.11.0
arunjot12 Dec 10, 2024
9d03c81
chore: added the esg and reward configuration in pallet-staking
arunjot12 Dec 11, 2024
2f4059d
chore: updated the pallet-session and added all-session handler confi…
arunjot12 Dec 11, 2024
ae4fe78
chore: updated the pallet-hotflix-sufficients, test-vector-suppot and…
arunjot12 Dec 11, 2024
e4e4675
chore: updated the pallet-im-online and precomplies utils of evm
arunjot12 Dec 11, 2024
aca8e05
chore: Added esg and session configuration in the pallet-imonline
arunjot12 Dec 12, 2024
21a4705
chore: Implemented revenue sharing for evm contracts
arunjot12 Dec 12, 2024
9d49d95
chore: Implemented revenue sharing for the wasm contracts
arunjot12 Dec 12, 2024
6e9bd14
chore: removed deprecated types from the runtime
arunjot12 Dec 16, 2024
f49271e
chore: integrated the modules of pallet-evm-precompile registry and p…
arunjot12 Dec 16, 2024
016c2e4
chore: updated the implementation of pallet-contracts,pallet-mmr and …
arunjot12 Dec 16, 2024
61c69c3
chore: updated the implementation of pallet-identity,nomination-pool,…
arunjot12 Dec 17, 2024
095eaad
chore: added a new pallet-salary and freeze identifer for pallet-bala…
arunjot12 Dec 17, 2024
e15cc41
chore: Added pallet-asset-rate and pallet-parameters in runtime
arunjot12 Dec 17, 2024
d6f1199
chore: updated the precompiles batch and completed the implementation…
arunjot12 Dec 17, 2024
e43e313
chore: Updated Ethereum RPCs to align with version 1.11.0
arunjot12 Dec 18, 2024
8bbfc71
chore: Updated network and storage override configuration in service
arunjot12 Dec 18, 2024
b55ea47
chore: Updated function Newfullbase in service to align with version …
arunjot12 Dec 18, 2024
497fd22
chore: Refactor development genesis function in mainnet_chain_spec
arunjot12 Dec 19, 2024
73a5850
chore: Update and refactor local mainnet configuration to v1.11.0
arunjot12 Dec 19, 2024
40b079d
chore: Added Genesis builder preset in mainnet runtime
arunjot12 Dec 20, 2024
634cdb8
fix: Removed unwanted code in mainnet chain spec
arunjot12 Dec 20, 2024
8cf0587
chore: Update and refactor local testnet configuration to v1.11.0
arunjot12 Dec 20, 2024
ca6738c
fix: Removed unused packages from the tomls
arunjot12 Dec 23, 2024
5b30b15
chore: Added genesis preset to Thunder runtime and updated thunder de…
arunjot12 Dec 24, 2024
ac0c947
chore: Updated the QA chain-spec configuration to v1.11.0
arunjot12 Dec 26, 2024
7addce7
chore: Added builder preset in QA runtime
arunjot12 Dec 26, 2024
9c2b6c9
chore: Refactored nomination pool and epoch config in chain spec
arunjot12 Dec 26, 2024
c408898
chore: Updated the test cases of pallet-grandpa and pallet-authority-…
arunjot12 Dec 27, 2024
04f3809
chore: Updated the test cases of pallet-babe, precompiles-batch and p…
arunjot12 Dec 31, 2024
89ba665
chore: Updated the test cases of pallet-staking
arunjot12 Dec 31, 2024
8dfbd35
chore: Updated the test cases of pallet-babe
arunjot12 Dec 31, 2024
8f57356
chore: Updated the pallet-reward configuration to v1.11.0
arunjot12 Dec 31, 2024
ee4dc44
chore: Updated the pallet-babe and pallet-session mock configuration …
arunjot12 Jan 2, 2025
a4b85df
chore: Updated the functionality and test cases of pallet transaction…
arunjot12 Jan 2, 2025
9227f8e
chore: Updated the mock configuration of pallet im-online
arunjot12 Jan 2, 2025
e9ce72f
chore: Updated the test cases of pallet im-online
arunjot12 Jan 2, 2025
6c19e48
fix: Updated the functionality of contract deployer for fungible adapter
arunjot12 Jan 3, 2025
77137d3
fix: Removed deprecated code and warnings from pallet-staking and aut…
arunjot12 Jan 3, 2025
8a2db96
fix: Added Migration for ErasStakers storage
arunjot12 Jan 7, 2025
9b767d3
fix: Updated pallet-staking configuration in all the mock files
arunjot12 Jan 7, 2025
18222cf
fix: Replaced unwraps with the safer handling mechanisms to prevent p…
arunjot12 Jan 8, 2025
0757199
chore: fix integration tests
dung5ire Jan 8, 2025
a7bc0a4
fix: Removed unused RuntimeVarient and added feature flags for all Fi…
arunjot12 Jan 8, 2025
6dfe376
chore: Increased the spec and toml version of qa-runtime
arunjot12 Jan 13, 2025
35c13a0
Merge branch 'master' into chore/chain-upgrade
arunjot12 Jan 13, 2025
be649cf
chore: remove duplicate and cargo fmt
dung5ire Jan 20, 2025
a3a6b6f
Increased the spec and toml version of thunder-runtime
arunjot12 Mar 4, 2025
252d48a
chore: Updated the value of MaxFreezes in the Qa runtime
arunjot12 Mar 18, 2025
df8b361
chore: Increased the spec-version and toml version of QA
arunjot12 Mar 18, 2025
de6d7dc
fix: Resolved the rpc issue of EthFeeHistory
arunjot12 Mar 18, 2025
2c9fa5f
chore: Updated the type config of MaxFreeze and increased the spec ve…
arunjot12 Mar 21, 2025
1df75de
fix: Disabled migration for pallet staking in qa and thunder runtime
arunjot12 Mar 21, 2025
28ce9b0
chore: Increased the spec and toml version of mainnet-runtime
arunjot12 Apr 16, 2025
114aa12
chore: Updated the migration logic to include activa era for staking
arunjot12 Apr 16, 2025
d59a0ab
chore: Increased the multiplier of block weight in thunder runtime
arunjot12 Apr 17, 2025
180ae0e
chore: Increased the multiplier of block weight in mainnet runtime
arunjot12 Apr 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4,701 changes: 3,247 additions & 1,454 deletions Cargo.lock

Large diffs are not rendered by default.

345 changes: 176 additions & 169 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frame/authority-discovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = [
"derive",
] }
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
Expand Down
30 changes: 4 additions & 26 deletions frame/authority-discovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,10 @@ impl<T: Config> OneSessionHandlerAll<T::AccountId> for Pallet<T> {
mod tests {
use super::*;
use crate as pallet_authority_discovery;
use frame_support::{
parameter_types,
traits::{ConstU32, ConstU64},
};
use frame_support::{derive_impl, parameter_types, traits::ConstU32};
use sp_application_crypto::Pair;
use sp_authority_discovery::AuthorityPair;
use sp_core::{crypto::key_types, H256};
use sp_core::crypto::key_types;
use sp_io::TestExternalities;
use sp_runtime::{
testing::UintAuthorityId,
Expand Down Expand Up @@ -219,7 +216,7 @@ mod tests {
pub struct MyAllSessionHandler;
impl OneSessionHandlerAll<AuthorityId> for MyAllSessionHandler {
type Key = UintAuthorityId;
fn on_new_session_all<'a, I: 'a>(changed: bool, validators: I, queued_validators: I)
fn on_new_session_all<'a, I: 'a>(_: bool, _: I, _: I)
where
I: Iterator<Item = (&'a AuthorityId, Self::Key)>,
u64: 'a,
Expand Down Expand Up @@ -290,30 +287,11 @@ mod tests {
pub const Offset: BlockNumber = 0;
}

#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type Nonce = u64;
type RuntimeCall = RuntimeCall;
type Hash = H256;
type Hashing = ::sp_runtime::traits::BlakeTwo256;
type AccountId = AuthorityId;
type Lookup = IdentityLookup<Self::AccountId>;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = ConstU64<250>;
type Version = ();
type PalletInfo = PalletInfo;
type AccountData = ();
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = ConstU32<16>;
}

pub struct TestSessionHandler;
Expand Down
43 changes: 20 additions & 23 deletions frame/babe/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-babe"
version = "4.0.0-dev"
version = "28.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
Expand All @@ -14,33 +14,33 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.5.0", default-features = false, features = ["derive", "serde"] }
frame-benchmarking = { workspace = true, optional = true}
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-authorship = { workspace = true }
pallet-session = { workspace = true }
pallet-timestamp = { workspace = true }
sp-application-crypto = { workspace = true, features = ["serde"] }
sp-consensus-babe = { workspace = true, features = ["serde"] }
sp-core = { workspace = true, features = ["serde"] }
sp-io = { workspace = true}
sp-runtime = { workspace = true, features = ["serde"] }
sp-session = { workspace = true}
sp-staking = { workspace = true, features = ["serde"] }
sp-std = { workspace = true}
pallet-esg = { workspace = true }
log = { workspace = true }
scale-info = { version = "2.11.1", default-features = false, features = ["derive", "serde"] }
frame-benchmarking = { workspace = true, default-features = false, optional = true }
frame-support = { workspace = true, default-features = false }
frame-system = { workspace = true, default-features = false }
pallet-authorship = { workspace = true, default-features = false }
pallet-session = { workspace = true, default-features = false }
pallet-timestamp = { workspace = true, default-features = false }
sp-application-crypto = { workspace = true, default-features = false, features = ["serde"] }
sp-consensus-babe = { workspace = true, default-features = false, features = ["serde"] }
sp-core = { workspace = true, default-features = false, features = ["serde"] }
sp-io = { workspace = true, default-features = false }
sp-runtime = { workspace = true, default-features = false, features = ["serde"] }
sp-session = { workspace = true, default-features = false }
sp-staking = { workspace = true, default-features = false, features = ["serde"] }
sp-std = { workspace = true, default-features = false }

[dev-dependencies]
frame-election-provider-support = { workspace = true }
pallet-balances = { workspace = true }
pallet-offences = { workspace = true }
pallet-staking = { path = "../staking" }
pallet-staking = { workspace = true }
sp-core = { workspace = true }
pallet-esg = { workspace = true }

[features]
default = [ "std" ]
default = ["std"]
std = [
"codec/std",
"frame-benchmarking?/std",
Expand All @@ -63,7 +63,6 @@ std = [
"sp-session/std",
"sp-staking/std",
"sp-std/std",
"pallet-esg/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
Expand All @@ -76,7 +75,6 @@ runtime-benchmarks = [
"pallet-timestamp/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
"pallet-esg/runtime-benchmarks",
]
try-runtime = [
"frame-election-provider-support/try-runtime",
Expand All @@ -88,6 +86,5 @@ try-runtime = [
"pallet-session/try-runtime",
"pallet-staking/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-esg/try-runtime",
"sp-runtime/try-runtime",
]
2 changes: 1 addition & 1 deletion frame/babe/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ benchmarks! {
// NOTE: generated with the test below `test_generate_equivocation_report_blob`.
// the output is not deterministic since keys are generated randomly (and therefore
// signature content changes). it should not affect the benchmark.
// with the current benchmark setup it is not possible to generate this programatically
// with the current benchmark setup it is not possible to generate this programmatically
// from the benchmark setup.
const EQUIVOCATION_PROOF_BLOB: [u8; 416] = [
222, 241, 46, 66, 243, 228, 135, 233, 177, 64, 149, 170, 141, 92, 193, 106, 51, 73, 31,
Expand Down
6 changes: 3 additions & 3 deletions frame/babe/src/equivocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ where

// Validate the equivocation proof (check votes are different and signatures are valid)
if !sp_consensus_babe::check_equivocation_proof(equivocation_proof) {
return Err(Error::<T>::InvalidEquivocationProof.into());
return Err(Error::<T>::InvalidEquivocationProof.into())
}

let validator_set_count = key_owner_proof.validator_count();
Expand All @@ -181,7 +181,7 @@ where
// Check that the slot number is consistent with the session index
// in the key ownership proof (i.e. slot is for that epoch)
if Pallet::<T>::session_index_for_epoch(epoch_index) != session_index {
return Err(Error::<T>::InvalidKeyOwnershipProof.into());
return Err(Error::<T>::InvalidKeyOwnershipProof.into())
}

// Check the membership proof and extract the offender's id
Expand Down Expand Up @@ -213,7 +213,7 @@ impl<T: Config> Pallet<T> {
"rejecting unsigned report equivocation transaction because it is not local/in-block.",
);

return InvalidTransaction::Call.into();
return InvalidTransaction::Call.into()
},
}

Expand Down
36 changes: 19 additions & 17 deletions frame/babe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ pub mod pallet {
/// entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in
/// slots, which may be skipped, the block numbers may not line up with the slot numbers.
#[pallet::storage]
pub(super) type EpochStart<T: Config> =
pub type EpochStart<T: Config> =
StorageValue<_, (BlockNumberFor<T>, BlockNumberFor<T>), ValueQuery>;

/// How late the current block is compared to its parent.
Expand Down Expand Up @@ -324,7 +324,7 @@ pub mod pallet {
#[pallet::genesis_config]
pub struct GenesisConfig<T: Config> {
pub authorities: Vec<(AuthorityId, BabeAuthorityWeight)>,
pub epoch_config: Option<BabeEpochConfiguration>,
pub epoch_config: BabeEpochConfiguration,
#[serde(skip)]
pub _config: sp_std::marker::PhantomData<T>,
}
Expand All @@ -334,9 +334,7 @@ pub mod pallet {
fn build(&self) {
SegmentIndex::<T>::put(0);
Pallet::<T>::initialize_genesis_authorities(&self.authorities);
EpochConfig::<T>::put(
self.epoch_config.clone().expect("epoch_config must not be None"),
);
EpochConfig::<T>::put(&self.epoch_config);
}
}

Expand Down Expand Up @@ -385,7 +383,11 @@ pub mod pallet {
});

public
.make_bytes(RANDOMNESS_VRF_CONTEXT, &transcript, &signature.output)
.make_bytes(
RANDOMNESS_VRF_CONTEXT,
&transcript,
&signature.pre_output,
)
.ok()
});

Expand Down Expand Up @@ -499,7 +501,7 @@ impl<T: Config> FindAuthor<u32> for Pallet<T> {
for (id, mut data) in digests.into_iter() {
if id == BABE_ENGINE_ID {
let pre_digest: PreDigest = PreDigest::decode(&mut data).ok()?;
return Some(pre_digest.authority_index());
return Some(pre_digest.authority_index())
}
}

Expand Down Expand Up @@ -591,8 +593,7 @@ impl<T: Config> Pallet<T> {

if authorities.is_empty() {
log::warn!(target: LOG_TARGET, "Ignoring empty epoch change.");

return;
return
}

// Update epoch index.
Expand Down Expand Up @@ -623,7 +624,7 @@ impl<T: Config> Pallet<T> {
session_index,
);

return;
return
}

if skipped_epochs.is_full() {
Expand Down Expand Up @@ -665,7 +666,7 @@ impl<T: Config> Pallet<T> {
let next_randomness = NextRandomness::<T>::get();

let next_epoch = NextEpochDescriptor {
authorities: next_authorities.to_vec(),
authorities: next_authorities.into_inner(),
randomness: next_randomness,
};
Self::deposit_consensus(ConsensusLog::NextEpochData(next_epoch));
Expand Down Expand Up @@ -701,7 +702,7 @@ impl<T: Config> Pallet<T> {
epoch_index: EpochIndex::<T>::get(),
start_slot: Self::current_epoch_start(),
duration: T::EpochDuration::get(),
authorities: Self::authorities().to_vec(),
authorities: Self::authorities().into_inner(),
randomness: Self::randomness(),
config: EpochConfig::<T>::get()
.expect("EpochConfig is initialized in genesis; we never `take` or `kill` it; qed"),
Expand All @@ -726,7 +727,7 @@ impl<T: Config> Pallet<T> {
epoch_index: next_epoch_index,
start_slot,
duration: T::EpochDuration::get(),
authorities: NextAuthorities::<T>::get().to_vec(),
authorities: NextAuthorities::<T>::get().into_inner(),
randomness: NextRandomness::<T>::get(),
config: NextEpochConfig::<T>::get().unwrap_or_else(|| {
EpochConfig::<T>::get().expect(
Expand Down Expand Up @@ -779,7 +780,7 @@ impl<T: Config> Pallet<T> {
// we use the same values as genesis because we haven't collected any
// randomness yet.
let next = NextEpochDescriptor {
authorities: Self::authorities().to_vec(),
authorities: Self::authorities().into_inner(),
randomness: Self::randomness(),
};

Expand All @@ -791,7 +792,7 @@ impl<T: Config> Pallet<T> {
// let's ensure that we only do the initialization once per block
let initialized = Self::initialized().is_some();
if initialized {
return;
return
}

let pre_digest =
Expand Down Expand Up @@ -902,8 +903,9 @@ impl<T: Config> OnTimestampSet<T::Moment> for Pallet<T> {
let timestamp_slot = moment / slot_duration;
let timestamp_slot = Slot::from(timestamp_slot.saturated_into::<u64>());

assert!(
CurrentSlot::<T>::get() == timestamp_slot,
assert_eq!(
CurrentSlot::<T>::get(),
timestamp_slot,
"Timestamp slot must match `CurrentSlot`"
);
}
Expand Down
Loading