Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added ethereum address20 support #2216

Merged
merged 9 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .github/workflows/verify-pr-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ jobs:
# with:
# path: ${{env.WASM_DIR}}/${{env.BUILT_WASM_FILENAME}}
# key: runtimes-${{runner.os}}-${{matrix.network}}-${{github.head_ref}}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
- name: Build Deterministic WASM
id: srtool_build
if: steps.cache-wasm.outputs.cache-hit != 'true'
Expand Down
31 changes: 17 additions & 14 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ serde = { version = "1.0", default-features = false }
serial_test = { version = "0.9.0", default-features = false }
base64-url = { version = "3.0.0", default-features = false }
p256 = { version = "0.13.2", default-features = false, features = ["ecdsa"] }
libsecp256k1 = { version = "0.7", default-features = false }

# substrate pallets
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }
Expand Down Expand Up @@ -159,6 +160,7 @@ substrate-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", bra

substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0" }
sp-debug-derive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.13.0", default-features = false }

[profile.release]
panic = "unwind"
Expand Down
5 changes: 4 additions & 1 deletion common/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ sp-std = { workspace = true }
numtoa = { workspace = true }
sp-externalities = { workspace = true }
sp-runtime-interface = { workspace = true }
libsecp256k1 = { workspace = true, features = ["hmac"] }
log = "0.4.22"

[features]
default = ['std']
runtime-benchmarks = []
std = [
'libsecp256k1/std',
'parity-scale-codec/std',
'frame-support/std',
'frame-system/std',
Expand All @@ -47,4 +50,4 @@ std = [
'sp-externalities/std',
'sp-runtime-interface/std'
]
test = []
test = []
3 changes: 3 additions & 0 deletions common/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ pub mod offchain;
#[cfg(feature = "runtime-benchmarks")]
/// Benchmarking helper trait
pub mod benchmarks;

/// Signature support for ethereum
pub mod signatures;
3 changes: 2 additions & 1 deletion common/primitives/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub use sp_runtime::{
};
use sp_std::{boxed::Box, vec::Vec};

use crate::signatures::UnifiedSignature;
use frame_support::dispatch::DispatchResultWithPostInfo;

/// Some way of identifying an account on the chain. We intentionally make it equivalent
Expand All @@ -31,7 +32,7 @@ pub type BlockNumber = u32;
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;

/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = MultiSignature;
pub type Signature = UnifiedSignature;

/// Index of a transaction in the chain.
pub type Index = u32;
Expand Down
Loading
Loading