Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7e96459
2603
cl0w5 Jul 6, 2026
84d5169
dependencies for stable2603
cl0w5 Jul 6, 2026
6be7d4f
switch RuntimeDebug to Debug
cl0w5 Jul 6, 2026
3d7e1db
fmt
cl0w5 Jul 6, 2026
77b5bb2
AssetsInHolding
cl0w5 Jul 6, 2026
4e3e6db
bump node
cl0w5 Jul 11, 2026
69224a7
node v16 at 2603
cl0w5 Jul 11, 2026
d779e9c
runtime at stable2603
cl0w5 Jul 11, 2026
d743990
evm frontier at stable2506
cl0w5 Jul 11, 2026
3729cba
temporary mock weights
cl0w5 Jul 11, 2026
0e4cb46
node at stable2603
cl0w5 Jul 11, 2026
ff38d0c
scraper at stable2603
cl0w5 Jul 11, 2026
9c976ad
fix support rocksdb
cl0w5 Jul 11, 2026
f6f771f
synth: read events even when the node's sdk drifts from the runtime's
mrq1911 Jul 30, 2026
6039c38
synth: rustfmt the layout fingerprint, bump node crate
mrq1911 Jul 30, 2026
033c493
synth: domain on the block's own hash plus extrinsic hash, ascii sent…
mrq1911 Jul 30, 2026
7b7e5fb
synth: honest envelope — zero value, indexer-safe nonce, origin in to
mrq1911 Jul 31, 2026
11dba0e
synth: input is an abi call, not a magic byte layout
mrq1911 Jul 31, 2026
c22ba4c
synth: sweep the whole blob for evm logs so a wormhole event is never…
mrq1911 Jul 31, 2026
bffeb48
synth: ask the chain how it encodes its events
mrq1911 Jul 31, 2026
d7fd854
Merge pull request #1503 from galacticcouncil/fix/synth-event-decode-…
mrq1911 Jul 31, 2026
dbf8649
synth: read a block's metadata from its parent, not itself
mrq1911 Jul 31, 2026
81ab2e0
Merge pull request #1506 from galacticcouncil/stable2603-cachefix
mrq1911 Jul 31, 2026
7cea53c
Merge branch 'master' into polkadot-stable2603
cl0w5 Aug 6, 2026
c307381
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Aug 21, 2026
adbdf6e
fix peplv2 foloowing sdk change
enthusiastmartin Aug 24, 2026
fe4db1b
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Sep 7, 2026
9af6d40
fix new code for 2603
enthusiastmartin Sep 7, 2026
52ecb50
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Sep 7, 2026
a90f40e
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Sep 22, 2026
d2ca863
fix newly introduced type annotations
enthusiastmartin Sep 22, 2026
68d7c02
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Sep 28, 2026
d351974
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Oct 6, 2026
a4a7d8a
Merge branch 'master' into polkadot-stable2603
cl0w5 Oct 8, 2026
dbd3ad2
Bump polkadot-sdk with mempool stability fixes
cl0w5 Oct 8, 2026
0be7b0c
Add missing cli flag
cl0w5 Oct 8, 2026
f32a526
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Oct 18, 2026
f559ba1
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Oct 28, 2026
6317a46
change defaults tolrance for ice
enthusiastmartin Oct 29, 2026
4e5fc11
Merge branch 'master' into polkadot-stable2603
cl0w5 Nov 3, 2026
0d1792c
fix merge conflict
cl0w5 Nov 3, 2026
8e81dc6
feat: cerebro client integration - wip
enthusiastmartin Nov 3, 2026
4694bc7
add forgotten file
enthusiastmartin Nov 3, 2026
6caa88c
use sdk 4 patch branch
enthusiastmartin Nov 9, 2026
460259e
Merge pull request #1566 from galacticcouncil/feat/2603-cerebro
enthusiastmartin Nov 9, 2026
6582459
Merge remote-tracking branch 'origin/master' into polkadot-stable2603
enthusiastmartin Nov 11, 2026
5739715
fmt
cl0w5 Nov 11, 2026
8e7d8d0
Merge remote-tracking branch 'origin/master' into polkadot-stable2603
mrq1911 Nov 14, 2026
0433e94
Merge branch 'master' into polkadot-stable2603
enthusiastmartin Nov 24, 2026
4f8478f
fix build
enthusiastmartin Nov 24, 2026
4358afd
fix build
enthusiastmartin Nov 24, 2026
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
4,676 changes: 2,384 additions & 2,292 deletions Cargo.lock

Large diffs are not rendered by default.

1,306 changes: 651 additions & 655 deletions Cargo.toml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions integration-tests/src/cerebro_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl Transport for ExtTransport<'_> {
true,
None,
None,
None,
)))
})
});
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/src/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use hydradx_traits::evm::{CallContext, InspectEvmAccounts, EVM};
use num_enum::{IntoPrimitive, TryFromPrimitive};
use pretty_assertions::assert_eq;
use primitives::EvmAddress;
use sp_core::{RuntimeDebug, H256, U256};
use sp_core::{H256, U256};
use test_utils::expect_events;
use xcm_emulator::{Network, TestExt};

Expand All @@ -24,7 +24,7 @@ pub fn deployer() -> EvmAddress {
}

#[module_evm_utility_macro::generate_function_selector]
#[derive(RuntimeDebug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
#[derive(Debug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
#[repr(u32)]
pub enum Function {
IsContract = "isContract(address)",
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/src/hsm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use pallet_stableswap::types::PegSource;
use pretty_assertions::assert_eq;
use primitives::EvmAddress;
use primitives::{AssetId, Balance};
use sp_core::{RuntimeDebug, H256, U256};
use sp_core::{H256, U256};
use sp_runtime::traits::One;
use sp_runtime::Perbill;
use sp_runtime::Permill;
Expand All @@ -38,7 +38,7 @@ pub const PATH_TO_SNAPSHOT: &str = "snapshots/hsm/SNAPSHOT";
const RUNTIME_API_CALLER: EvmAddress = sp_core::H160(hex!("82db570265c37be24caf5bc943428a6848c3e9a6"));

#[module_evm_utility_macro::generate_function_selector]
#[derive(RuntimeDebug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
#[derive(Debug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
#[repr(u32)]
pub enum Function {
AddFacilitator = "addFacilitator(address,string,uint128)",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/src/liquidation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ fn calculate_debt_to_liquidate_with_two_different_assets() {
});
}

#[derive(sp_core::RuntimeDebug)]
#[derive(sp_core::Debug)]
pub struct ApiProvider<C>(pub C);
impl<Block, C> RuntimeApiProvider<Block, OriginCaller, RuntimeCall, RuntimeEvent> for ApiProvider<C>
where
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/src/pepl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ pub fn get_oracle_price(asset_pair: &str) -> Option<(U256, U256)> {
None
}

#[derive(sp_core::RuntimeDebug)]
#[derive(Debug)]
pub struct ApiProvider<C>(pub C);

impl<B: Block, C> RuntimeApiProvider<B> for ApiProvider<C>
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/src/polkadot_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub use hydradx_traits::{evm::InspectEvmAccounts, registry::Mutate};
pub use num_traits::Zero;
use pallet_referrals::{FeeDistribution, Level};
use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV13;
pub use polkadot_primitives::v8::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE};
pub use polkadot_primitives::v9::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE};
use polkadot_runtime_parachains::configuration::HostConfiguration;
use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId;
use sp_core::storage::Storage;
Expand All @@ -35,7 +35,7 @@ use xcm_emulator::{decl_test_networks, decl_test_parachains, decl_test_relay_cha
pub struct XcmpQueueWithPrices;

impl polkadot_parachain::primitives::XcmpMessageHandler for XcmpQueueWithPrices {
fn handle_xcmp_messages<'a, I: Iterator<Item = (ParaId, polkadot_primitives::v8::BlockNumber, &'a [u8])>>(
fn handle_xcmp_messages<'a, I: Iterator<Item = (ParaId, polkadot_primitives::v9::BlockNumber, &'a [u8])>>(
iter: I,
max_weight: frame_support::weights::Weight,
) -> frame_support::weights::Weight {
Expand Down
24 changes: 12 additions & 12 deletions liquidation-worker-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use frame_support::{pallet_prelude::*, sp_runtime::traits::Block as BlockT, Dese
use num_enum::{IntoPrimitive, TryFromPrimitive};
use primitives::EvmAddress;
use sp_arithmetic::ArithmeticError;
use sp_core::{RuntimeDebug, H160, H256, U256};
use sp_core::{H160, H256, U256};
use sp_std::{boxed::Box, ops::BitAnd, vec::Vec};
use std::marker::PhantomData;
use xcm_runtime_apis::dry_run::{CallDryRunEffects, Error as XcmDryRunApiError};
Expand All @@ -33,7 +33,7 @@ pub type Balance = u128;
pub type AssetId = u32;
pub type CallResult = (ExitReason, Vec<u8>);

#[derive(RuntimeDebug)]
#[derive(Debug)]
pub enum LiquidationError {
DispatchError(DispatchError),
EvmError(ExitReason),
Expand Down Expand Up @@ -90,7 +90,7 @@ const MAX_LIQUIDATION_CLOSE_FACTOR: u128 = 10_000u128;
const CLOSE_FACTOR_HF_THRESHOLD: u128 = 950_000_000_000_000_000u128;

#[module_evm_utility_macro::generate_function_selector]
#[derive(RuntimeDebug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
#[derive(Debug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
#[repr(u32)]
pub enum Function {
GetPool = "getPool()",
Expand Down Expand Up @@ -218,7 +218,7 @@ pub fn percent_mul(value: U256, percentage: U256) -> Result<U256, LiquidationErr
}

/// Collateral and debt amounts of a reserve in the base currency.
#[derive(Default, Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Default, Eq, PartialEq, Clone, Debug)]
pub struct UserReserve {
pub collateral: U256,
pub debt: U256,
Expand All @@ -228,7 +228,7 @@ pub struct UserReserve {
/// Bitmap of the users collaterals and borrows. It is divided into pairs of bits, one pair per asset.
/// The first bit indicates if the user uses an asset as collateral, the second whether the user borrows an asset.
/// The corresponding assets are in the same position as `fetch_reserves_list()`.
#[derive(Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Debug)]
struct UserConfiguration(U256);
impl UserConfiguration {
/// Returns `true` if the user uses the asset as collateral.
Expand All @@ -246,7 +246,7 @@ impl UserConfiguration {
}
}

#[derive(Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Debug)]
pub struct EModeCategory {
// ltv: u16,
liquidation_threshold: u16,
Expand All @@ -268,7 +268,7 @@ impl EModeCategory {
}

/// User's data. The state is not automatically updated. Any change in the chain can invalidate the data stored in the struct.
#[derive(Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Debug)]
pub struct UserData {
address: EvmAddress,
configuration: UserConfiguration,
Expand Down Expand Up @@ -634,7 +634,7 @@ where
/// Configuration of the reserve.
/// https://github.com/aave/aave-v3-core/blob/782f51917056a53a2c228701058a6c3fb233684a/contracts/protocol/libraries/types/DataTypes.sol#L5
/// Not all data fields are used.
#[derive(Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Debug)]
pub struct ReserveData {
configuration: U256, // https://github.com/aave-dao/aave-v3-origin/blob/3aad8ca184159732e4b3d8c82cd56a8707a106a2/src/core/contracts/protocol/libraries/types/DataTypes.sol#L79
liquidity_index: u128,
Expand Down Expand Up @@ -671,7 +671,7 @@ impl ReserveData {
}

/// State of asset reserve.
#[derive(Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Debug)]
pub struct Reserve {
pub reserve_data: ReserveData,
pub asset_address: EvmAddress,
Expand Down Expand Up @@ -932,7 +932,7 @@ impl Reserve {
}
}

#[derive(Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Debug)]
pub struct LiquidationAmounts {
pub debt_amount: U256,
pub collateral_amount: U256,
Expand All @@ -942,7 +942,7 @@ pub struct LiquidationAmounts {

/// Captures the state of the money market related to liquidations.
/// The state is not automatically updated. Any change in the chain can invalidate the data stored in the struct.
#[derive(Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Debug)]
pub struct MoneyMarketData<Block, OriginCaller, RuntimeCall, RuntimeEvent>
where
Block: BlockT,
Expand Down Expand Up @@ -1654,7 +1654,7 @@ impl<Block: BlockT, OriginCaller, RuntimeCall, RuntimeEvent>
}
}

#[derive(Eq, PartialEq, Clone, RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Debug)]
pub struct LiquidationOption {
pub health_factor: U256,
pub collateral_asset: EvmAddress,
Expand Down
3 changes: 1 addition & 2 deletions math/src/stableswap/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ use crate::types::Balance;
use codec::{Decode, Encode, MaxEncodedLen};
use num_traits::Zero;
use scale_info::TypeInfo;
use sp_core::RuntimeDebug;

#[derive(Encode, Decode, Clone, Copy, RuntimeDebug, TypeInfo, MaxEncodedLen)]
#[derive(Encode, Decode, Clone, Copy, Debug, TypeInfo, MaxEncodedLen)]
pub struct AssetReserve {
pub amount: Balance,
pub decimals: u8,
Expand Down
7 changes: 3 additions & 4 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hydradx"
version = "15.9.2"
version = "17.6.0"
description = "Hydration node"
authors = ["GalacticCouncil"]
edition = "2021"
Expand Down Expand Up @@ -35,7 +35,7 @@ threadpool = { version = "1.7" }
num_cpus = { version = "1.13.1" }
ethereum = { workspace = true }
ethabi = { workspace = true }
kvdb-rocksdb = "0.19.0"
kvdb-rocksdb = "0.21.0"
lru = "0.12"
rlp = "0.6"

Expand Down Expand Up @@ -106,7 +106,6 @@ cumulus-client-cli = { workspace = true }
cumulus-client-collator = { workspace = true }
cumulus-client-consensus-aura = { workspace = true }
cumulus-client-consensus-common = { workspace = true }
cumulus-client-consensus-proposer = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
Expand All @@ -120,7 +119,7 @@ polkadot-service = { workspace = true }

# Frontier
fc-consensus = { workspace = true }
fc-db = { workspace = true, features = ["default"] }
fc-db = { workspace = true, features = ["default", "rocksdb"] }
fc-mapping-sync = { workspace = true }
fc-rpc = { workspace = true }
fc-rpc-core = { workspace = true }
Expand Down
5 changes: 4 additions & 1 deletion node/src/cerebro_guard/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,10 @@ impl<C> CerebroGuard<C> {

impl<C: CallApiAt<Block>> CerebroGuard<C> {
fn readiness(&self, parent: H256) -> (Readiness, u32) {
let version = match self.client.runtime_version_at(parent) {
let version = match self
.client
.runtime_version_at(parent, sp_core::traits::CallContext::Onchain)
{
Ok(v) => v,
Err(e) => return (Readiness::Unsupported(format!("runtime version: {e}")), 0),
};
Expand Down
20 changes: 12 additions & 8 deletions node/src/cerebro_guard/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,19 @@ pub struct DropResult {
}

/// What the RPC needs from the transaction pool and chain.
#[async_trait]
pub trait PoolControl: Send + Sync {
fn best(&self) -> (H256, u32);
/// Remove `hash` (and its dependents) from the pool; returns what was removed.
fn remove(&self, at: H256, hash: H256) -> Vec<H256>;
async fn remove(&self, at: H256, hash: H256) -> Vec<H256>;
}

pub struct NodePool<C, P> {
pub client: Arc<C>,
pub pool: Arc<P>,
}

#[async_trait]
impl<C, P> PoolControl for NodePool<C, P>
where
C: HeaderBackend<Block> + Send + Sync,
Expand All @@ -89,9 +91,10 @@ where
(info.best_hash, info.best_number)
}

fn remove(&self, at: H256, hash: H256) -> Vec<H256> {
async fn remove(&self, at: H256, hash: H256) -> Vec<H256> {
self.pool
.report_invalid(Some(at), TxInvalidityReportMap::from_iter([(hash, None)]))
.await
.into_iter()
.map(|tx| *tx.hash())
.collect()
Expand Down Expand Up @@ -205,12 +208,12 @@ impl CerebroGuardRpcImpl {
})
}

pub fn drop_tx(&self, hash: H256, reason: String) -> Result<DropResult, ErrorObjectOwned> {
pub async fn drop_tx(&self, hash: H256, reason: String) -> Result<DropResult, ErrorObjectOwned> {
if !lock(&self.shared.holds).forget(&hash) {
return Err(unknown(hash));
}
let (best_hash, best) = self.pool.best();
let removed = self.pool.remove(best_hash, hash);
let removed = self.pool.remove(best_hash, hash).await;
self.shared.audit(shadow::audit(
"drop",
&hash,
Expand Down Expand Up @@ -259,7 +262,7 @@ impl CerebroGuardRpcServer for CerebroGuardRpcImpl {

async fn drop_tx(&self, ext: &Extensions, hash: H256, reason: String) -> RpcResult<DropResult> {
check_if_safe(ext)?;
CerebroGuardRpcImpl::drop_tx(self, hash, reason)
CerebroGuardRpcImpl::drop_tx(self, hash, reason).await
}
}

Expand All @@ -276,11 +279,12 @@ mod tests {
removed: Mutex<Vec<H256>>,
}

#[async_trait]
impl PoolControl for FakePool {
fn best(&self) -> (H256, u32) {
(H256::repeat_byte(0xbb), 200)
}
fn remove(&self, _at: H256, hash: H256) -> Vec<H256> {
async fn remove(&self, _at: H256, hash: H256) -> Vec<H256> {
self.removed.lock().unwrap().push(hash);
vec![hash]
}
Expand Down Expand Up @@ -351,7 +355,7 @@ mod tests {
let hash = H256::repeat_byte(1);
lock(&shared.holds).hold(hash, held(190));

let res = rpc.drop_tx(hash, "spam".into()).unwrap();
let res = futures::executor::block_on(rpc.drop_tx(hash, "spam".into())).unwrap();

assert_eq!(
res,
Expand All @@ -367,7 +371,7 @@ mod tests {
fn drop_should_fail_when_hash_is_unknown() {
let (rpc, _) = rpc(GuardMode::Hold);

assert!(rpc.drop_tx(H256::repeat_byte(3), "x".into()).is_err());
assert!(futures::executor::block_on(rpc.drop_tx(H256::repeat_byte(3), "x".into())).is_err());
}

#[test]
Expand Down
2 changes: 2 additions & 0 deletions node/src/cerebro_guard/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ where
true,
None,
None,
None,
)
})
.map_err(|e| format!("EthereumRuntimeRPCApi_call: {e}"))?
Expand Down Expand Up @@ -157,6 +158,7 @@ where
true,
None,
None,
None,
)
.map_err(|e| format!("EthereumRuntimeRPCApi_call: {e}"))?
.map_err(|e| format!("EthereumRuntimeRPCApi_call: {e:?}"))?;
Expand Down
3 changes: 2 additions & 1 deletion node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ pub fn run() -> sc_cli::Result<()> {
pool_config.tx_ban_seconds,
pool_type,
config.dev_key_seed.is_some(),
pool_config.pool_best_blocks_only,
);

// Enable for all full nodes by default to store ISMP request/responses
Expand All @@ -313,7 +314,7 @@ pub fn run() -> sc_cli::Result<()> {
let id = ParaId::from(para_id);

let parachain_account =
AccountIdConversion::<polkadot_primitives::v8::AccountId>::into_account_truncating(&id);
AccountIdConversion::<polkadot_primitives::v9::AccountId>::into_account_truncating(&id);

let state_version = Cli::runtime_version().state_version();

Expand Down
Loading
Loading