Skip to content

Commit

Permalink
Merge branch 'master' into bko-bridges-congestion
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur authored Nov 16, 2024
2 parents 465db5f + 4df9433 commit 37974be
Show file tree
Hide file tree
Showing 50 changed files with 2,010 additions and 1,038 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ linked-hash-map = { version = "0.5.4" }
linked_hash_set = { version = "0.1.4" }
linregress = { version = "0.5.1" }
lite-json = { version = "0.2.0", default-features = false }
litep2p = { version = "0.8.0", features = ["websocket"] }
litep2p = { version = "0.8.1", features = ["websocket"] }
log = { version = "0.4.22", default-features = false }
macro_magic = { version = "0.5.1" }
maplit = { version = "1.0.2" }
Expand Down
17 changes: 6 additions & 11 deletions cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ use frame_support::{
ord_parameter_types, parameter_types,
traits::{
fungible, fungibles,
tokens::{
imbalance::ResolveAssetTo, nonfungibles_v2::Inspect, Fortitude::Polite,
Preservation::Expendable,
},
tokens::{imbalance::ResolveAssetTo, nonfungibles_v2::Inspect},
AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, InstanceFilter,
Nothing, TransformOrigin,
},
Expand All @@ -68,7 +65,7 @@ use parachains_common::{
NORMAL_DISPATCH_RATIO,
};
use sp_api::impl_runtime_apis;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160};
use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160, U256};
use sp_runtime::{
generic, impl_opaque_keys,
traits::{AccountIdConversion, BlakeTwo256, Block as BlockT, Saturating, Verify},
Expand Down Expand Up @@ -130,7 +127,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: alloc::borrow::Cow::Borrowed("westmint"),
impl_name: alloc::borrow::Cow::Borrowed("westmint"),
authoring_version: 1,
spec_version: 1_016_005,
spec_version: 1_016_006,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 16,
Expand Down Expand Up @@ -2081,10 +2078,8 @@ impl_runtime_apis! {

impl pallet_revive::ReviveApi<Block, AccountId, Balance, Nonce, BlockNumber, EventRecord> for Runtime
{
fn balance(address: H160) -> Balance {
use frame_support::traits::fungible::Inspect;
let account = <Runtime as pallet_revive::Config>::AddressMapper::to_account_id(&address);
Balances::reducible_balance(&account, Expendable, Polite)
fn balance(address: H160) -> U256 {
Revive::evm_balance(&address)
}

fn nonce(address: H160) -> Nonce {
Expand All @@ -2094,7 +2089,7 @@ impl_runtime_apis! {
fn eth_transact(
from: H160,
dest: Option<H160>,
value: Balance,
value: U256,
input: Vec<u8>,
gas_limit: Option<Weight>,
storage_deposit_limit: Option<Balance>,
Expand Down
8 changes: 8 additions & 0 deletions prdoc/pr_6302.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: migrate pallet-nomination-pool-benchmarking to benchmarking syntax v2
doc:
- audience: Runtime Dev
description: |-
migrate pallet-nomination-pool-benchmarking to benchmarking syntax v2
crates:
- name: pallet-nomination-pools-benchmarking
bump: patch
12 changes: 12 additions & 0 deletions prdoc/pr_6466.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
title: '[pallet-revive] add piggy-bank sol example'
doc:
- audience: Runtime Dev
description: |-
This PR update the pallet to use the EVM 18 decimal balance in contracts call and host functions instead of the native balance.

It also updates the js example to add the piggy-bank solidity contract that expose the problem
crates:
- name: pallet-revive-eth-rpc
bump: minor
- name: pallet-revive
bump: minor
10 changes: 10 additions & 0 deletions prdoc/pr_6484.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: Update litep2p network backend to version 0.8.1

doc:
- audience: [ Node Dev, Node Operator ]
description: |
Release 0.8.1 of litep2p includes critical fixes to further enhance the stability and performance of the litep2p network backend.

crates:
- name: sc-network
bump: patch
10 changes: 10 additions & 0 deletions prdoc/pr_6486.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: "sp-trie: minor fix to avoid panic on badly-constructed proof"

doc:
- audience: ["Runtime Dev", "Runtime User"]
description: |
"Added a check when decoding encoded proof nodes in `sp-trie` to avoid panicking when receiving a badly constructed proof, instead erroring out."

crates:
- name: sp-trie
bump: patch
11 changes: 5 additions & 6 deletions substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ use frame_support::{
},
tokens::{
imbalance::ResolveAssetTo, nonfungibles_v2::Inspect, pay::PayAssetFromAccount,
Fortitude::Polite, GetSalary, PayFromAccount, Preservation::Preserve,
GetSalary, PayFromAccount,
},
AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU16, ConstU32, ConstU64, Contains,
Currency, EitherOfDiverse, EnsureOriginWithArg, EqualPrivilegeOnly, Imbalance, InsideBoth,
Expand Down Expand Up @@ -86,6 +86,7 @@ use pallet_nis::WithMaximumOf;
use pallet_nomination_pools::PoolId;
use pallet_revive::{evm::runtime::EthExtra, AddressMapper};
use pallet_session::historical as pallet_session_historical;
use sp_core::U256;
// Can't use `FungibleAdapter` here until Treasury pallet migrates to fungibles
// <https://github.com/paritytech/polkadot-sdk/issues/226>
use pallet_broker::TaskId;
Expand Down Expand Up @@ -3205,10 +3206,8 @@ impl_runtime_apis! {

impl pallet_revive::ReviveApi<Block, AccountId, Balance, Nonce, BlockNumber, EventRecord> for Runtime
{
fn balance(address: H160) -> Balance {
use frame_support::traits::fungible::Inspect;
let account = <Runtime as pallet_revive::Config>::AddressMapper::to_account_id(&address);
Balances::reducible_balance(&account, Preserve, Polite)
fn balance(address: H160) -> U256 {
Revive::evm_balance(&address)
}

fn nonce(address: H160) -> Nonce {
Expand All @@ -3219,7 +3218,7 @@ impl_runtime_apis! {
fn eth_transact(
from: H160,
dest: Option<H160>,
value: Balance,
value: U256,
input: Vec<u8>,
gas_limit: Option<Weight>,
storage_deposit_limit: Option<Balance>,
Expand Down
8 changes: 7 additions & 1 deletion substrate/client/network/src/litep2p/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,13 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkBackend<B, H> for Litep2pNetworkBac
metrics.pending_connections_errors_total.with_label_values(&["transport-errors"]).inc();
}
}
_ => {}
None => {
log::error!(
target: LOG_TARGET,
"Litep2p backend terminated"
);
return
}
},
}
}
Expand Down
Loading

0 comments on commit 37974be

Please sign in to comment.