-
Notifications
You must be signed in to change notification settings - Fork 379
Ensure relay chain parent is the relay chain head #103
Conversation
Forked at: 032595d Parent branch: origin/master
Parent branch: origin/master Forked at: 032595d
Parent branch: origin/master Forked at: 032595d
Parent branch: origin/master Forked at: 032595d
Parent branch: origin/master Forked at: 032595d
Forked at: d6ab13c Parent branch: origin/master
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not have reviewed all the tests for each detail ;)
network/src/lib.rs
Outdated
Ok(None) => { | ||
return Err(Box::new(ClientError::UnknownBlock(relay_chain_leaf.to_string()))); | ||
}, | ||
Ok(Some(_)) => return Ok(Validation::Failure), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a trace log would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
network/src/tests.rs
Outdated
} | ||
|
||
#[test] | ||
fn check_relay_parent_does_not_fail() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not fail but the implementation checks for failing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah makes no sense, will rename that
network/src/tests.rs
Outdated
hash: PHash, | ||
) -> std::result::Result<Option<NumberFor<PBlock>>, sp_blockchain::Error> { | ||
Ok(match hash.as_fixed_bytes() { | ||
&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use if hash == H256::from_low_u64_be(1)
etc here. That is much shorter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
commit 1eec2cad1f92dece71a8813de18f3adaa3a3307f Author: Albrecht <14820950+weichweich@users.noreply.github.com> Date: Wed May 27 09:45:54 2020 +0200 kilt runtime in cumulus commit 05a83e8 Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Fri Jun 19 13:15:56 2020 +0200 Take storage root from parent header (paritytech#123) commit 62c22b8 Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Thu Jun 18 12:10:20 2020 +0200 Implement basic upward & downward messages (paritytech#118) * Start by replacing branch names and set `DownwardMessage` * Add the upward-message crate * Add Kusama & Polkadot * More work on getting the upward messages working * Fix build * Begin to integrate it into the test Parachain * Update * Make everything compile again * Switch to westend and print parachain account on startup * Use MultiSignature etc * Fix validate block * Some downward messages work * Update git reference * More downward messages integration * Update test runtime for downward messages * Enable downward message handler and withdraw send tokens * Add some docs * Begin to implement simple XCMP * More work * Fixes and make parachain id configurable * Make parachain ID be part of the genesis * Finishing the XCMP message demo * Update and fixes tests * Update branch commit b082e7f Author: Joshy Orndorff <JoshOrndorff@users.noreply.github.com> Date: Thu Jun 18 03:54:47 2020 -0400 Allow custom polkadot chainspec. (paritytech#122) commit 8b1fd65 Author: Cecile Tonglet <cecile@parity.io> Date: Mon Jun 15 12:40:15 2020 +0200 Update polkadot & substrate (paritytech#112) commit 41376ce Author: Cecile Tonglet <cecile@parity.io> Date: Thu Jun 11 12:39:20 2020 +0200 Prefix logs of parachain and relaychain differently + remove light client of relay chain (paritytech#109) commit b3603d1 Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Fri Jun 5 16:57:02 2020 +0200 Update to latest Substrate & Polkadot (paritytech#107) * Update to latest Substrate & Polkadot * Replace --unsafe-rpc-export with --unsafe-rpc-external * Add --rpc-methods=Unsafe Documented in substrate 24486f52929e9e518eeccbc6ad6da70e9e5bdf8a * typos * more typo * fixed rpc expose * Disable the integration test Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com> commit 4c6b959 Author: Cecile Tonglet <cecile@parity.io> Date: Wed Jun 3 17:51:49 2020 +0200 Enable mdns polkadot (paritytech#106) Fixes paritytech#57 commit 1afdba7 Author: Cecile Tonglet <cecile@parity.io> Date: Wed Jun 3 14:15:52 2020 +0200 Reject blocks without justification which don't have the best number (paritytech#105) * Initial commit Forked at: 8f02e23 Parent branch: origin/master * Reject blocks without justification * Revert "Reject blocks without justification" This reverts commit ee60e12. * WIP Forked at: 8f02e23 Parent branch: origin/master * WIP Forked at: 8f02e23 Parent branch: origin/master * WIP Forked at: 8f02e23 Parent branch: origin/master * CLEANUP Forked at: 8f02e23 Parent branch: origin/master * WIP Forked at: 8f02e23 Parent branch: origin/master * WIP Forked at: 8f02e23 Parent branch: origin/master * CLEANUP Forked at: 8f02e23 Parent branch: origin/master * WIP Forked at: 8f02e23 Parent branch: origin/master * WIP Forked at: 8f02e23 Parent branch: origin/master * Move HeadData to primitives * Update network/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update network/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * CLEANUP Forked at: 8f02e23 Parent branch: origin/master * fix * CLEANUP Forked at: 8f02e23 Parent branch: origin/master * messages * for the greater good * Update primitives/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update network/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update network/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update network/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> commit 8f02e23 Author: Cecile Tonglet <cecile@parity.io> Date: Wed May 27 14:43:45 2020 +0200 Ensure relay chain parent is the relay chain head (paritytech#103)
Related to #7