mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Get Ethereum Relay to Compile (#21)
* Update dependencies Upgrades Substrate based dependencies from v2.0.0 -> v2.0.0-alpha.1 and uses the `jsonrpsee`'s new feature flags. The actual code hasn't been updated though, so this won't compile. * Use `RawClient`s from `jsonrpsee` * Update to use jsonrpsee's new API * Hook up Ethereum Bridge Runtime, Relay, and Node Runtime * Bump `parity-crypto` from v0.4 to v0.6 Fixes error when trying to compile tests. This was caused by `parity-crypto` v0.4's use of `parity-secp256k1` over `secp256k1'. Using the Parity fork meant multiple version of the same underlying C library were being pulled in. `parity-crypto` v0.6 moved away from this, only relying on `secp256k1` thus fixing the issue.
This commit is contained in:
committed by
Bastian Köcher
parent
392582f3d5
commit
8232bdfe30
@@ -52,6 +52,7 @@ pub use frame_support::{
|
||||
traits::Randomness,
|
||||
weights::Weight,
|
||||
};
|
||||
pub use pallet_bridge_eth_poa::Call as BridgeEthPoACall;
|
||||
|
||||
/// An index to a block.
|
||||
pub type BlockNumber = u32;
|
||||
@@ -186,6 +187,10 @@ impl pallet_aura::Trait for Runtime {
|
||||
type AuthorityId = AuraId;
|
||||
}
|
||||
|
||||
impl pallet_bridge_eth_poa::Trait for Runtime {
|
||||
type OnHeadersSubmitted = ();
|
||||
}
|
||||
|
||||
impl pallet_grandpa::Trait for Runtime {
|
||||
type Event = Event;
|
||||
}
|
||||
@@ -248,6 +253,7 @@ construct_runtime!(
|
||||
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
||||
Sudo: pallet_sudo::{Module, Call, Config<T>, Storage, Event<T>},
|
||||
BridgeEthPoA: pallet_bridge_eth_poa::{Module, Call, Config, Storage},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -270,6 +276,8 @@ pub type SignedExtra = (
|
||||
frame_system::CheckWeight<Runtime>,
|
||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>
|
||||
);
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
/// Unchecked extrinsic type as expected by this runtime.
|
||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
||||
/// Extrinsic type that has already been checked.
|
||||
@@ -327,6 +335,20 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_bridge_eth_poa::EthereumHeadersApi<Block> for Runtime {
|
||||
fn best_block() -> (u64, sp_bridge_eth_poa::H256) {
|
||||
BridgeEthPoA::best_block()
|
||||
}
|
||||
|
||||
fn is_import_requires_receipts(header: sp_bridge_eth_poa::Header) -> bool {
|
||||
BridgeEthPoA::is_import_requires_receipts(header)
|
||||
}
|
||||
|
||||
fn is_known_block(hash: sp_bridge_eth_poa::H256) -> bool {
|
||||
BridgeEthPoA::is_known_block(hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
|
||||
fn validate_transaction(tx: <Block as BlockT>::Extrinsic) -> TransactionValidity {
|
||||
Executive::validate_transaction(tx)
|
||||
|
||||
Reference in New Issue
Block a user