Skip to content

Commit 797f913

Browse files
committed
Merge remote-tracking branch 'origin/master' into sigurpol-dap-satellite
2 parents 8993417 + a6082b3 commit 797f913

File tree

17 files changed

+250
-265
lines changed

17 files changed

+250
-265
lines changed
Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1 @@
1-
{
2-
"fixtures/solidity/complex/create/create2_many/test.json::1::Y M3": "Failed",
3-
"fixtures/solidity/complex/create/create_in_library/test.json::0::Y M0": "Failed",
4-
"fixtures/solidity/complex/create/create_in_library/test.json::0::Y M3": "Failed",
5-
"fixtures/solidity/complex/create/create_many/test.json::1::Y M3": "Failed",
6-
"fixtures/solidity/complex/library_call_tuple/test.json::0::Y M0": "Failed",
7-
"fixtures/solidity/complex/library_call_tuple/test.json::0::Y M3": "Failed",
8-
"fixtures/solidity/complex/solidity_by_example/applications/iterable_mapping/test.json::0::Y M0 >=0.8.1": "Failed",
9-
"fixtures/solidity/complex/solidity_by_example/applications/iterable_mapping/test.json::0::Y M3 >=0.8.1": "Failed",
10-
"fixtures/solidity/simple/internal_function_pointers/sum_oddness.sol::0::Y M3": "Failed",
11-
"fixtures/solidity/simple/internal_function_pointers/sum_oddness.sol::1::Y M3": "Failed",
12-
"fixtures/solidity/simple/pointer/large_offset.sol::0::Y M0": "Failed",
13-
"fixtures/solidity/simple/pointer/large_offset.sol::0::Y M3": "Failed",
14-
"fixtures/solidity/simple/try_catch/unbalanced_gas_limit.sol::0::Y M0": "Failed",
15-
"fixtures/solidity/simple/try_catch/unbalanced_gas_limit.sol::0::Y M3": "Failed",
16-
"fixtures/solidity/simple/yul_instructions/revert.sol::59::Y M0": "Failed",
17-
"fixtures/solidity/simple/yul_instructions/revert.sol::59::Y M3": "Failed",
18-
"fixtures/solidity/simple/yul_instructions/revert.sol::60::Y M0": "Failed",
19-
"fixtures/solidity/simple/yul_instructions/revert.sol::60::Y M3": "Failed",
20-
"fixtures/solidity/simple/yul_instructions/revert.sol::61::Y M0": "Failed",
21-
"fixtures/solidity/simple/yul_instructions/revert.sol::61::Y M3": "Failed",
22-
"fixtures/solidity/simple/yul_instructions/revert.sol::75::Y M0": "Failed",
23-
"fixtures/solidity/simple/yul_instructions/revert.sol::75::Y M3": "Failed",
24-
"fixtures/solidity/simple/yul_instructions/revert.sol::197::Y M0": "Failed",
25-
"fixtures/solidity/simple/yul_instructions/revert.sol::197::Y M3": "Failed",
26-
"fixtures/solidity/simple/yul_instructions/revert.sol::202::Y M0": "Failed",
27-
"fixtures/solidity/simple/yul_instructions/revert.sol::202::Y M3": "Failed",
28-
"fixtures/solidity/simple/yul_instructions/revert.sol::207::Y M0": "Failed",
29-
"fixtures/solidity/simple/yul_instructions/revert.sol::207::Y M3": "Failed"
30-
}
1+
{}

.github/scripts/common/lib.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,9 @@ function get_s3_url_base() {
355355
frame-omni-bencher)
356356
printf "https://releases.parity.io/frame-omni-bencher"
357357
;;
358+
eth-rpc)
359+
printf "https://releases.parity.io/eth-rpc"
360+
;;
358361
*)
359362
printf "UNSUPPORTED BINARY $name"
360363
exit 1

.github/workflows/release-30_publish_release_draft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235
runs-on: ubuntu-latest
236236
strategy:
237237
matrix:
238-
binary: [ polkadot, polkadot-execute-worker, polkadot-prepare-worker, polkadot-parachain, polkadot-omni-node, frame-omni-bencher, chain-spec-builder ]
238+
binary: [ polkadot, polkadot-execute-worker, polkadot-prepare-worker, polkadot-parachain, polkadot-omni-node, frame-omni-bencher, chain-spec-builder, eth-rpc ]
239239
target: [ x86_64-unknown-linux-gnu, aarch64-apple-darwin ]
240240

241241
steps:

.github/workflows/tests-evm.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,25 @@ jobs:
3838
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3939
- name: Update the Installed Python
4040
run: apt-get update && apt-get install -y python3-pip python3
41+
- name: Download artifact by ID
42+
id: download
43+
run: |
44+
curl -L --fail --show-error \
45+
-H "Authorization: Bearer ${{ github.token }}" \
46+
-H "Accept: application/vnd.github+json" \
47+
-H "X-GitHub-Api-Version: 2022-11-28" \
48+
"https://api.github.com/repos/paritytech/revive/actions/artifacts/5198357315/zip" \
49+
-o resolc.zip
50+
unzip -q resolc.zip -d resolc
51+
chmod +x ./resolc/resolc-x86_64-unknown-linux-musl
52+
echo "resolc-path=$(pwd)/resolc/resolc-x86_64-unknown-linux-musl" >> "$GITHUB_OUTPUT"
4153
- name: Run revive differential tests
42-
uses: paritytech/revive-differential-tests/.github/actions/run-differential-tests@be448d78bd83a755fdcab96849971ecdf4eebce0
54+
uses: paritytech/revive-differential-tests/.github/actions/run-differential-tests@0e41f054405c054c37d524e5172ef8c514852e6b
4355
with:
4456
platform: ${{ matrix.platform }}
4557
cargo-command: "forklift cargo"
46-
revive-differential-tests-ref: "be448d78bd83a755fdcab96849971ecdf4eebce0"
47-
resolc-version: "0.5.0"
58+
revive-differential-tests-ref: "0e41f054405c054c37d524e5172ef8c514852e6b"
59+
resolc-path: ${{ steps.download.outputs.resolc-path }}
4860
expectations-file-path: ./.github/assets/${{ matrix.platform }}.json
4961

5062
evm-test-suite:

bridges/modules/beefy/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ pub type BridgedBlockHash<T, I> = bp_runtime::HashOf<BridgedChain<T, I>>;
5858
/// Pallet initialization data.
5959
pub type InitializationDataOf<T, I> =
6060
InitializationData<BridgedBlockNumber<T, I>, bp_beefy::MmrHashOf<BridgedChain<T, I>>>;
61-
/// BEEFY commitment hasher, used by configured bridged chain.
62-
pub type BridgedBeefyCommitmentHasher<T, I> = bp_beefy::BeefyCommitmentHasher<BridgedChain<T, I>>;
6361
/// BEEFY validator id, used by configured bridged chain.
6462
pub type BridgedBeefyAuthorityId<T, I> = bp_beefy::BeefyAuthorityIdOf<BridgedChain<T, I>>;
6563
/// BEEFY validator set, used by configured bridged chain.

bridges/modules/beefy/src/mock.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
use crate as beefy;
1818
use crate::{
1919
utils::get_authorities_mmr_root, BridgedBeefyAuthoritySet, BridgedBeefyAuthoritySetInfo,
20-
BridgedBeefyCommitmentHasher, BridgedBeefyMmrLeafExtra, BridgedBeefySignedCommitment,
21-
BridgedMmrHash, BridgedMmrHashing, BridgedMmrProof,
20+
BridgedBeefyMmrLeafExtra, BridgedBeefySignedCommitment, BridgedMmrHash, BridgedMmrHashing,
21+
BridgedMmrProof,
2222
};
2323

2424
use bp_beefy::{BeefyValidatorSignatureOf, ChainWithBeefy, Commitment, MmrDataOrHash};
@@ -33,7 +33,7 @@ use sp_runtime::{
3333
};
3434

3535
pub use sp_consensus_beefy::ecdsa_crypto::{AuthorityId as BeefyId, Pair as BeefyPair};
36-
use sp_core::crypto::Wraps;
36+
use sp_consensus_beefy::test_utils::BeefySignerAuthority;
3737
use sp_runtime::traits::Keccak256;
3838

3939
pub type TestAccountId = u64;
@@ -44,7 +44,6 @@ pub type TestBridgedAuthoritySetInfo = BridgedBeefyAuthoritySetInfo<TestRuntime,
4444
pub type TestBridgedValidatorSet = BridgedBeefyAuthoritySet<TestRuntime, ()>;
4545
pub type TestBridgedCommitment = BridgedBeefySignedCommitment<TestRuntime, ()>;
4646
pub type TestBridgedValidatorSignature = BeefyValidatorSignatureOf<TestBridgedChain>;
47-
pub type TestBridgedCommitmentHasher = BridgedBeefyCommitmentHasher<TestRuntime, ()>;
4847
pub type TestBridgedMmrHashing = BridgedMmrHashing<TestRuntime, ()>;
4948
pub type TestBridgedMmrHash = BridgedMmrHash<TestRuntime, ()>;
5049
pub type TestBridgedBeefyMmrLeafExtra = BridgedBeefyMmrLeafExtra<TestRuntime, ()>;
@@ -105,7 +104,6 @@ impl Chain for TestBridgedChain {
105104
}
106105

107106
impl ChainWithBeefy for TestBridgedChain {
108-
type CommitmentHasher = Keccak256;
109107
type MmrHashing = Keccak256;
110108
type MmrHash = <Keccak256 as Hash>::Output;
111109
type BeefyMmrLeafExtra = ();
@@ -184,12 +182,11 @@ pub fn sign_commitment(
184182
let random_validators =
185183
rand::seq::index::sample(&mut rand::thread_rng(), total_validators, signature_count);
186184

187-
let commitment_hash = TestBridgedCommitmentHasher::hash(&commitment.encode());
188185
let mut signatures = vec![None; total_validators];
189186
for validator_idx in random_validators.iter() {
190187
let validator = &validator_pairs[validator_idx];
191188
signatures[validator_idx] =
192-
Some(validator.as_inner_ref().sign_prehashed(commitment_hash.as_fixed_bytes()).into());
189+
Some(BeefySignerAuthority::sign(validator, &commitment.encode()));
193190
}
194191

195192
TestBridgedCommitment { commitment, signatures }

bridges/primitives/beefy/src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ use sp_std::prelude::*;
5252
/// primitives. Some of types can be configured in low-level pallets, but are constrained
5353
/// when BEEFY+MMR bundle is used.
5454
pub trait ChainWithBeefy: Chain {
55-
/// The hashing algorithm used to compute the digest of the BEEFY commitment.
56-
///
57-
/// Corresponds to the hashing algorithm, used by `sc_consensus_beefy::BeefyKeystore`.
58-
type CommitmentHasher: sp_runtime::traits::Hash;
59-
6055
/// The hashing algorithm used to build the MMR.
6156
///
6257
/// The same algorithm is also used to compute merkle roots in BEEFY
@@ -84,7 +79,7 @@ pub trait ChainWithBeefy: Chain {
8479
/// A way to identify a BEEFY validator.
8580
///
8681
/// Corresponds to the `BeefyId` field of the `pallet-beefy` configuration.
87-
type AuthorityId: BeefyAuthorityId<Self::CommitmentHasher> + Parameter;
82+
type AuthorityId: BeefyAuthorityId + Parameter;
8883

8984
/// A way to convert validator id to its raw representation in the BEEFY merkle tree.
9085
///
@@ -105,8 +100,6 @@ pub type BeefyValidatorSignatureOf<C> =
105100
/// Signed BEEFY commitment used by given Substrate chain.
106101
pub type BeefySignedCommitmentOf<C> =
107102
SignedCommitment<BlockNumberOf<C>, BeefyValidatorSignatureOf<C>>;
108-
/// Hash algorithm, used to compute the digest of the BEEFY commitment before signing it.
109-
pub type BeefyCommitmentHasher<C> = <C as ChainWithBeefy>::CommitmentHasher;
110103
/// Hash algorithm used in Beefy MMR construction by given Substrate chain.
111104
pub type MmrHashingOf<C> = <C as ChainWithBeefy>::MmrHashing;
112105
/// Hash type, used in MMR construction by given Substrate chain.

prdoc/pr_10763.prdoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
title: Make some BEEFY keystore logic more generic
2+
doc:
3+
- audience: Node Dev
4+
description: |-
5+
This PR:
6+
1. makes some BEEFY keystore methods more generic:
7+
- `sign()`
8+
- `public_keys()`
9+
This is done by implementing the specific logic in the `BeefyAuthorityId`.
10+
2. Removes the `BeefyAuthorityId::SignatureHasher` since for some algorithms it doesn't make sense to have a hasher.
11+
12+
Also since now the `BeefyAuthorityId` implements both the signing and the verification logic, we should have better consistency.
13+
14+
Related to https://github.com/paritytech/polkadot-sdk/pull/8707#discussion_r2673377834
15+
crates:
16+
- name: sp-consensus-beefy
17+
bump: major
18+
- name: sc-consensus-beefy
19+
bump: patch
20+
- name: pallet-beefy
21+
bump: patch

prdoc/pr_10907.prdoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
title: Update the resolc and retester versions
2+
doc:
3+
- audience: Runtime Dev
4+
description: |-
5+
## Summary
6+
7+
This PR allows us to use nightly versions of the resolc compiler in the differential tests CI which include fixes not yet available in the published version of the compiler. It also bumps the commit hash of differential tests used to a version that allows for gas limits to be specified manually to circumvent the issue observed in https://github.com/paritytech/contract-issues/issues/259
8+
crates: []

substrate/client/consensus/beefy/src/fisherman.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use sp_api::ProvideRuntimeApi;
2323
use sp_application_crypto::RuntimeAppPublic;
2424
use sp_blockchain::HeaderBackend;
2525
use sp_consensus_beefy::{
26-
check_double_voting_proof, AuthorityIdBound, BeefyApi, BeefySignatureHasher, DoubleVotingProof,
26+
check_double_voting_proof, AuthorityIdBound, BeefyApi, DoubleVotingProof,
2727
OpaqueKeyOwnershipProof, ValidatorSetId,
2828
};
2929
use sp_runtime::{
@@ -131,7 +131,7 @@ where
131131
(active_rounds.validators(), active_rounds.validator_set_id());
132132
let offender_id = proof.offender_id();
133133

134-
if !check_double_voting_proof::<_, _, BeefySignatureHasher>(&proof) {
134+
if !check_double_voting_proof::<_, _>(&proof) {
135135
debug!(target: LOG_TARGET, "🥩 Skipping report for bad equivocation {:?}", proof);
136136
return Ok(());
137137
}

0 commit comments

Comments
 (0)