Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Ensure relay chain parent is the relay chain head #103

Merged
merged 93 commits into from
May 27, 2020

Conversation

cecton
Copy link
Contributor

@cecton cecton commented May 19, 2020

Related to #7

cecton and others added 30 commits May 6, 2020 12:55
Forked at: 032595d
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
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
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>
cecton added 17 commits May 20, 2020 13:45
This reverts commit 0e0a464.
This reverts commit 8179b9f.
This reverts commit 526a029.
Forked at: 032595d
Parent branch: origin/master
This reverts commit 87ab4bd.
Forked at: 032595d
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
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
Copy link
Member

@bkchr bkchr left a 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 ;)

Ok(None) => {
return Err(Box::new(ClientError::UnknownBlock(relay_chain_leaf.to_string())));
},
Ok(Some(_)) => return Ok(Validation::Failure),
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

#[test]
fn check_relay_parent_does_not_fail() {
Copy link
Member

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?

Copy link
Contributor Author

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

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] => {
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

cecton added 4 commits May 26, 2020 16:46
Forked at: 032595d
Parent branch: origin/master
Forked at: 032595d
Parent branch: origin/master
Forked at: 032595d
Parent branch: origin/master
@cecton cecton merged commit 8f02e23 into master May 27, 2020
@cecton cecton deleted the cecton-ensure-replay-parent-eq-relay-head branch May 27, 2020 12:43
weichweich added a commit to KILTprotocol/cumulus that referenced this pull request Jun 23, 2020
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)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants