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

Remove requirement on Hash = H256, make Proposer return StorageChanges and Proof #3860

Merged
merged 46 commits into from
Jan 10, 2020

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Oct 19, 2019

So yeah, this pr started as a simple "make Proposer generate a proof on request". However, @rphmeier requested to make it also possible to import blocks without re-executing them. So, here we are, this pull request makes it possible to import self-build blocks without re-executing them.

  • Proposer now returns the build block, the StorageChanges and an optional proof.
  • The StorageChanges contain all the changes to the storage that are required to build the state for the block.
  • While working on it I came across these BlockT<Hash = H256> and it made rustc complain about my code, so I decided to remove this stuff from the whole code base. (Finally we are free to choose any hashing algorithm in the Block!)
  • In some circumstances it can happen that we need to calculate the state-root twice, e.g. when we record a proof. That is more a flaw of the current design of state-machine/Backend/ProvingBackend that could be solved with some code refactoring. I tried it, but I failed :(

The process now looks like:

  1. Proposer creates a block.
  2. We include the storage changes of the block into BlockImportParams.
  3. We check if StorageChanges are present and use them or we execute the block to get them (old behavior).

FIxes: #1232 #3624

@bkchr bkchr added the A0-please_review Pull request needs code review. label Oct 19, 2019
@bkchr bkchr requested a review from rphmeier October 19, 2019 12:58
@rphmeier
Copy link
Contributor

IMO it should not be optional, and it should be more strongly-typed. This is also important work to allow us to avoid re-executing the block proposal when importing a locally authored.

@bkchr
Copy link
Member Author

bkchr commented Oct 20, 2019

It will be more strongly typed with this pr #3834

Or what you wanted to be more strongly typed?

How would this allow us avoid re-executing the block when importing a locally build block?

@rphmeier
Copy link
Contributor

This is what I was thinking of: Computing the state root while building a block is producing a list of altered trie nodes to be written into the database. This is discarded. We should pass that through to the import of that block to avoid re-execution because it is an optimization. It's not quite the same thing as this PR, but maybe there is some possible overlap. That's what I wanted to be non-optional. Proving the storage in the parent state probably should be optional.

Vec<Vec<u8>> for storage proofs is really bad and ugly, so I'm glad there's a PR for that underway.

@bkchr
Copy link
Member Author

bkchr commented Oct 22, 2019

This is what I was thinking of: Computing the state root while building a block is producing a list of altered trie nodes to be written into the database. This is discarded. We should pass that through to the import of that block to avoid re-execution because it is an optimization.

Yeah okay, that makes sense :) I can do this.

Demi-Marie
Demi-Marie previously approved these changes Nov 13, 2019
core/client/src/client.rs Outdated Show resolved Hide resolved
@rphmeier
Copy link
Contributor

rphmeier commented Dec 18, 2019

Is there some workaround to avoid the unsafe blocks? There is no reason that unsafe code should be introduced in such large modules, since it means that you have to track the invariant in the entire module - in this case, thousands of lines of code. I don't see a good argument for raising the maintenance burden of the client to be so high.

We should avoid unsafe code whenever possible. When it's not (and I'm not convinced it is impossible here...) it needs to be wrapped in a safe API exposed by a small enclosing module.

@bkchr
Copy link
Member Author

bkchr commented Dec 18, 2019

The unsafe block is not 1000 of lines. The function is just marked as unsafe to make sure no-one easily breaks the invariant. The ApiRef invariant is that the inner type is bound by the lifetime of ApiRef. Now, when I want to consume the inner, I could also just return inner and break this invariant. To make the user aware that he should know what he is doing, the function is unsafe. You don't need to track anything outside of ApiRef to make sure the invariant holds.
I also would like to get rid of this and as always there is a RFC that would solve my problem here. However, there is maybe also a different way of solving this, but I still did not had the time to test it.

@rphmeier
Copy link
Contributor

rphmeier commented Dec 18, 2019

The unsafe block is not 1000 of lines.

You are misunderstanding how unsafe code works. It pollutes the entire module containing it, because those are the finest-grained visibility modifiers you can write.

The function is just marked as unsafe to make sure no-one easily breaks the invariant

This is not the purpose of unsafe code. If you can't cause memory unsafety by using it wrongly, then it shouldn't be tagged unsafe. If it can be, then it should be gated off in a safe way, not thrown into a massive audit surface.

I am not saying that no unsafe code should be used. But if we do use it, it should be used correctly and in a way that makes it hard to make mistakes. I perceive this usage as one which is not minimizing possible future mistakes.

Copy link
Contributor

@gnunicorn gnunicorn left a comment

Choose a reason for hiding this comment

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

Thanks for doing this massive change–took me all day, but finally got through it. Just some minor things. Highly appreciate the decoupling from the h256 hashing!

client/block-builder/src/lib.rs Outdated Show resolved Hide resolved
client/finality-grandpa/src/light_import.rs Show resolved Hide resolved
client/src/call_executor.rs Outdated Show resolved Hide resolved
(true, Some(_), _) => {},
// We should enact state, but don't have any storage changes, so we need to execute the
// block.
(true, ref mut storage_changes @ None, Some(ref body)) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

			(true, ref mut storage_changes @ None, Some(ref body)) => {

What is this wizardry syntax?

Copy link
Member Author

Choose a reason for hiding this comment

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

I match on None in column 2 and make the column accessible as ref mut storage_changes in the match arm.

client/src/client.rs Outdated Show resolved Hide resolved
@bkchr
Copy link
Member Author

bkchr commented Dec 18, 2019

@rphmeier removed the unsafe code usage :)

Copy link
Contributor

@gnunicorn gnunicorn left a comment

Choose a reason for hiding this comment

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

YAY

@rphmeier
Copy link
Contributor

@bkchr I will merge when there is an update PR for Polkadot ready!

@gavofyork
Copy link
Member

needs resolving and polkadot PR.

@gavofyork gavofyork added A7-looksgoodcantmerge and removed A0-please_review Pull request needs code review. labels Jan 3, 2020
@bkchr bkchr merged commit 4ed0ad6 into master Jan 10, 2020
@bkchr bkchr deleted the bkchr-propose-with-proof branch January 10, 2020 09:48
andresilva added a commit that referenced this pull request Jan 16, 2020
…StorageChanges` and `Proof` (#3860)"

This reverts commit 4ed0ad6.
lamafab pushed a commit to lamafab/substrate that referenced this pull request Jun 16, 2020
* Make use of `runtime_interface` for parachain externalities

This also changes the encoding of the `ValidationResult` return value to
match the default encoding used in Substrate.

* Bump versions (paritytech#655)

* Bump version

* Update Cargo lock and bump runtime version

* Remove balance transfer disabler.

* Fix checking that `get_heads` exists (paritytech#657)

* Tweak some Kusama params (paritytech#659)

* Tweak some Kusama params

- Council elections daily
- No treasury burn
- Bonding/slash defer periods of 7 days

* Bump runtime

* Bump version

* Update Substrate (paritytech#661)

* Make compat with exit-future updates

* Update exit-future entirely

* Tidy

* Bump Substrate

* Update branch

* Add back sudo and fixing compilation

* Increase nick deposit (10 KSM) and require 2 councillors to slash (paritytech#663)

* Bump Substrate (paritytech#664)

* Replace Substrate mentions in license headers with Polkadot (paritytech#674)

* Fix typo in comment (paritytech#671)

* Bump Substrate, add Identity module (paritytech#676)

* Bump Substrate, add Identity module

* Bump Substrate again

* Update futures and tokio for browser light client (paritytech#673)

* Make availability-store compile for WASM

* Use --manifest-path instead

* Make validation work on wasm!

* Switch to Spawn trait

* Migrate validation to std futures

* Migrate network to std futures

* Final changes to validation

* Tidy up network

* Tidy up validation

* Switch branch

* Migrate service

* Get polkadot to compile via wasm!

* Add browser-demo

* Add initial browser file

* Add browser-demo

* Tidy

* Temp switch back to substrate/master

* tidy

* Fix wasm build

* Re-add release flag

* Switch to polkadot-master

* Revert cli tokio version to avoid libp2p panic

* Update tokio version

* Fix availability store tests

* Fix validation tests

* Remove futures01 from availability-store

* Fix network tests

* Small changes

* Fix collator

* Fix typo

* Revert removal of tokio_executor that causes tokio version mismatch panic

* Fix adder test parachain

* Revert "Revert removal of tokio_executor that causes tokio version mismatch panic"

This reverts commit cfeb50c01d8df5e209483406a711e64761b44ae9.

* Update availability-store/src/worker.rs

Co-Authored-By: Pierre Krieger <[email protected]>

* Update network/src/lib.rs

Co-Authored-By: Pierre Krieger <[email protected]>

* Update network/src/lib.rs

Co-Authored-By: Pierre Krieger <[email protected]>

* Box pin changes

* Asyncify network functions

* Clean up browser validation worker error

* Fix av store test

* Nits

* Fix validation test

* Switch favicon

* Fix validation test again

* Revert "Asyncify network functions"

This reverts commit f20ae6548dc482cb1e75bc80641cfe55c6131a53.

* Add async blocks back in

* Fix typo in comment (paritytech#672)

* Add the /ws bootnode to the chain specs (paritytech#681)

* Revert "Revert "Revert removal of tokio_executor that causes tokio version mismatch panic"" (paritytech#685)

This reverts commit 938f411a9365e9c5fb16bfedb62aacac4403d063.

* Fix bootnodes PeerIds (paritytech#683)

* Fixes a flaky test (paritytech#675)

* Fixes a flaky test

* Renames a var

* Do not unit the errors in tests

* Bump Substrate (paritytech#686)

* update to latest renames

* Bump Substrate

* Bump substrate

* Merge some things from `ashley-compile-to-wasm` (paritytech#687)

* Make availability-store compile for WASM

* Use --manifest-path instead

* Make validation work on wasm!

* Switch to Spawn trait

* Migrate validation to std futures

* Migrate network to std futures

* Final changes to validation

* Tidy up network

* Tidy up validation

* Switch branch

* Migrate service

* Get polkadot to compile via wasm!

* Add browser-demo

* Add initial browser file

* Add browser-demo

* Tidy

* Temp switch back to substrate/master

* tidy

* Fix wasm build

* Re-add release flag

* Add the /ws bootnode to the chain specs

* Copy changes from master

* Switch branch

* Switch libp2p and add wasm-timer

* Switch back libp2p and add rand

* Fix bootnodes PeerIds

* use browser indexdb

* Reduce changeset

* Add matrix release alert script and gitlab job (paritytech#688)

* Add matrix release alert script and gitlab job

* Update .gitlab-ci.yml

Co-Authored-By: Kirill Pimenov <[email protected]>

* Rewrite some Future structs as async functions (paritytech#679)

* Squashed commit of the following:

commit e97a17157ae0887320994661e2f816275fc75b76
Author: Ashley <[email protected]>
Date:   Tue Dec 10 15:06:28 2019 +0100

    Rewrite some functions as async

commit 970e485179f1e087cf0a51c6a4e71f923e87df45
Merge: f98966ac 4782840
Author: Ashley <[email protected]>
Date:   Tue Dec 10 11:19:37 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-futures-update

commit f98966ac188067158071d1e3e243c34ea5738f56
Author: Ashley <[email protected]>
Date:   Mon Dec 9 23:40:20 2019 +0100

    Add async blocks back in

commit 7fa88af0271db659de9274c94cb8e7eead0e4289
Author: Ashley <[email protected]>
Date:   Mon Dec 9 23:17:02 2019 +0100

    Revert "Asyncify network functions"

    This reverts commit f20ae6548dc482cb1e75bc80641cfe55c6131a53.

commit 82413550cdac40bd14a09f62df12de49dd7e55af
Author: Ashley <[email protected]>
Date:   Mon Dec 9 19:09:55 2019 +0100

    Fix validation test again

commit 47e002b08369c9c775b92aea9b6f6ed81b30241b
Author: Ashley <[email protected]>
Date:   Mon Dec 9 19:07:43 2019 +0100

    Switch favicon

commit 0c5c1409078fc57120a39e40ec5cb1763d67d593
Author: Ashley <[email protected]>
Date:   Mon Dec 9 18:54:10 2019 +0100

    Fix validation test

commit 8bb6a0189fe824da09054cbf5b06f11a0f87072d
Author: Ashley <[email protected]>
Date:   Mon Dec 9 18:53:54 2019 +0100

    Nits

commit 33410f3a4910d3e688956cecfcca02cc2dfa6a7a
Author: Ashley <[email protected]>
Date:   Mon Dec 9 18:43:09 2019 +0100

    Fix av store test

commit f0c517eb240c42848cdb3305e0b554ef407bdfaa
Merge: 938f411a 60e72111
Author: Ashley <[email protected]>
Date:   Mon Dec 9 18:21:39 2019 +0100

    Merge branch 'ashley-futures-updates' into ashley-futures-update

commit 60e72111651f2b366592c1e56756c6bf5d8ce2f1
Author: Ashley <[email protected]>
Date:   Mon Dec 9 18:19:40 2019 +0100

    Clean up browser validation worker error

commit f20ae6548dc482cb1e75bc80641cfe55c6131a53
Author: Ashley <[email protected]>
Date:   Mon Dec 9 18:16:40 2019 +0100

    Asyncify network functions

commit b22758d0a3852d701923bd238484e1c9eabec5e2
Merge: 2e8b05ed ca8d5c5
Author: Ashley <[email protected]>
Date:   Mon Dec 9 17:47:26 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-futures-updates

commit 2e8b05edf1a1fadd6943f967c27b6d34675ba06a
Author: Ashley <[email protected]>
Date:   Mon Dec 9 17:45:52 2019 +0100

    Box pin changes

commit 08bfdf7f2d27721abffee49221213304ebc4fd47
Author: Ashley <[email protected]>
Date:   Mon Dec 9 17:15:38 2019 +0100

    Update network/src/lib.rs

    Co-Authored-By: Pierre Krieger <[email protected]>

commit d8be456c508d5e5a03178db45d9f272b302a8a65
Author: Ashley <[email protected]>
Date:   Mon Dec 9 17:15:32 2019 +0100

    Update network/src/lib.rs

    Co-Authored-By: Pierre Krieger <[email protected]>

commit ec7367276fdd374b19f41555fd5985454c559600
Author: Ashley <[email protected]>
Date:   Mon Dec 9 17:14:36 2019 +0100

    Update availability-store/src/worker.rs

    Co-Authored-By: Pierre Krieger <[email protected]>

commit 938f411a9365e9c5fb16bfedb62aacac4403d063
Author: Ashley <[email protected]>
Date:   Mon Dec 9 17:05:05 2019 +0100

    Revert "Revert removal of tokio_executor that causes tokio version mismatch panic"

    This reverts commit cfeb50c01d8df5e209483406a711e64761b44ae9.

commit f92f58044b4fe04bde73a60820d154080dd64b16
Author: Ashley <[email protected]>
Date:   Mon Dec 9 15:47:35 2019 +0100

    Fix adder test parachain

commit cfeb50c01d8df5e209483406a711e64761b44ae9
Author: Ashley <[email protected]>
Date:   Mon Dec 9 15:31:36 2019 +0100

    Revert removal of tokio_executor that causes tokio version mismatch panic

commit 5bcb83a122b9a30f240a238ca670c6b658f4ddf1
Author: Ashley <[email protected]>
Date:   Mon Dec 9 15:17:55 2019 +0100

    Fix typo

commit fc02b1dc16e277649677396833a8d70e8588a56c
Author: Ashley <[email protected]>
Date:   Mon Dec 9 15:02:50 2019 +0100

    Fix collator

commit 6c4ff5b3bf1084a618ffec2d864090c9c8077f0f
Author: Ashley <[email protected]>
Date:   Mon Dec 9 14:35:37 2019 +0100

    Small changes

commit e1338cb4450df5377d8c911da56445914d667472
Author: Ashley <[email protected]>
Date:   Mon Dec 9 14:24:42 2019 +0100

    Fix network tests

commit 4e458f7a91c1ed5c986795f40ed55e596d176c4b
Author: Ashley <[email protected]>
Date:   Mon Dec 9 12:25:26 2019 +0100

    Remove futures01 from availability-store

commit 5729f6cd6b53f061ff155320c815509feb02309e
Author: Ashley <[email protected]>
Date:   Mon Dec 9 12:22:33 2019 +0100

    Fix validation tests

commit a820612565b42780f8b6c09c9c1c30f06a9985ba
Author: Ashley <[email protected]>
Date:   Mon Dec 9 12:01:48 2019 +0100

    Fix availability store tests

commit 112344faeee5f8f03b3b87c6baf7036a7fcbe415
Author: Ashley <[email protected]>
Date:   Mon Dec 9 11:36:03 2019 +0100

    Update tokio version

commit d2de6d8b3f0c3682679fe437d5459ac50a3c3895
Author: Ashley <[email protected]>
Date:   Mon Dec 9 11:33:25 2019 +0100

    Revert cli tokio version to avoid libp2p panic

commit 0c5f24e0c1131ac58a947448456e7fb62c869702
Author: Ashley <[email protected]>
Date:   Mon Dec 9 11:27:13 2019 +0100

    Switch to polkadot-master

commit 2e2311e33a4af87c2c545094ea8cb595cd6cfe2d
Author: Ashley <[email protected]>
Date:   Fri Dec 6 15:07:21 2019 +0100

    Re-add release flag

commit 6adc1b6114e154a590acf82acfaf0c1265409518
Merge: 9767f832 5e9542c
Author: Ashley <[email protected]>
Date:   Fri Dec 6 13:36:35 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-compile-to-wasm

commit 9767f8325c33211065ef6830becdac0e3cf852de
Merge: c528dc6d 84ece42
Author: Ashley <[email protected]>
Date:   Wed Dec 4 17:11:39 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-compile-to-wasm

commit c528dc6df8fc31cdcbc10889636355241398debd
Author: Ashley <[email protected]>
Date:   Wed Dec 4 17:07:00 2019 +0100

    Fix wasm build

commit da233a122c678dc7767dac7cc6e2564575b15cc8
Author: Ashley <[email protected]>
Date:   Wed Dec 4 16:25:49 2019 +0100

    tidy

commit 832f8054df78afbcef1903e0f9e7e246b348c10d
Merge: 4e1da888 78e828d
Author: Ashley <[email protected]>
Date:   Wed Dec 4 15:56:56 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-compile-to-wasm

commit 4e1da8888dd2160064dd453782fb05513c65ade4
Author: Ashley <[email protected]>
Date:   Tue Dec 3 16:47:02 2019 +0100

    Temp switch back to substrate/master

commit af88a87338688797bbc52315fdd0fc22cf23c6cf
Merge: a03a980c abb5111
Author: Ashley <[email protected]>
Date:   Mon Dec 2 19:33:14 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-compile-to-wasm

commit a03a980ce417ec7b446bfcbe7a66ec0ed6458135
Merge: 31a88a93 f7d4826
Author: Ashley <[email protected]>
Date:   Mon Dec 2 13:52:37 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-compile-to-wasm

commit 31a88a930ffdf5da72b3e587ec8c0e6b00922e3e
Author: Ashley <[email protected]>
Date:   Mon Dec 2 13:52:35 2019 +0100

    Tidy

commit 5b33b7a7af08d7a3aa3853b8e4995484fb640d52
Author: Ashley <[email protected]>
Date:   Mon Dec 2 11:55:51 2019 +0100

    Add browser-demo

commit 868f6e51dfdc0a64252acd9adabe7b9ba436b1f4
Author: Ashley <[email protected]>
Date:   Mon Dec 2 10:51:57 2019 +0100

    Add initial browser file

commit e5e399c20f1dc4e1023ee57773dcdd9ab2a0a14b
Author: Ashley <[email protected]>
Date:   Mon Dec 2 10:45:02 2019 +0100

    Add browser-demo

commit 408288b05292d952944a6b8e1f2bcf9cf259a040
Author: Ashley <[email protected]>
Date:   Sun Dec 1 19:28:33 2019 +0100

    Get polkadot to compile via wasm!

commit 04ffe72e868be57841d31f01eec1b90423a595d6
Author: Ashley <[email protected]>
Date:   Sun Dec 1 19:28:16 2019 +0100

    Migrate service

commit 119f0829a53b825a3ebc9efdefa76ae7eabb04aa
Merge: 93fb6428 5422684
Author: Ashley <[email protected]>
Date:   Sun Dec 1 17:43:49 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-compile-to-wasm

commit 93fb6428501bac612a1675cf3b6e3d26f5bbc7c2
Author: Ashley <[email protected]>
Date:   Sun Dec 1 12:21:25 2019 +0100

    Switch branch

commit 0c4fe8331bdc9665ac2427eb8c795112ac728d70
Author: Ashley <[email protected]>
Date:   Sat Nov 30 11:45:59 2019 +0100

    Tidy up validation

commit 73563253d95962657108820ae130a8d3f3093ee8
Author: Ashley <[email protected]>
Date:   Sat Nov 30 11:39:09 2019 +0100

    Tidy up network

commit 1c9cf0427c0e2d15c4b6d52b91d67d4a3963e30d
Author: Ashley <[email protected]>
Date:   Sat Nov 30 01:16:35 2019 +0100

    Final changes to validation

commit 322cca5224fdca0a29d88ff91700ef704a9d0c2a
Author: Ashley <[email protected]>
Date:   Sat Nov 30 00:31:55 2019 +0100

    Migrate network to std futures

commit 96f1a99491f5ae2957effa58cc1e385014575a32
Author: Ashley <[email protected]>
Date:   Fri Nov 29 23:31:04 2019 +0100

    Migrate validation to std futures

commit aaf5e55fffd1367c05687eb34f4365a24e3a34c0
Author: Ashley <[email protected]>
Date:   Fri Nov 29 17:10:11 2019 +0100

    Switch to Spawn trait

commit 2ab282f57e8b9a55cf8d285b283cf009216511d2
Merge: cceb6b72 5598ed9
Author: Ashley <[email protected]>
Date:   Fri Nov 29 16:31:24 2019 +0100

    Merge remote-tracking branch 'parity/master' into ashley-compile-to-wasm

commit cceb6b72f5677a1c43d2cd61bd525539054f0c01
Author: Ashley <[email protected]>
Date:   Fri Nov 29 15:47:14 2019 +0100

    Make validation work on wasm!

commit b45a95cf7d829a916bf2ad6936d1e7f4b6f3ef77
Merge: 3773d5c db7eaa6b
Author: Ashley <[email protected]>
Date:   Fri Nov 29 13:57:23 2019 +0100

    Merge remote-tracking branch 'tomaka/wasm-start' into HEAD

commit db7eaa6bd5d3bbcea829570fb47ab4d06f3558ce
Merge: 6f97dbb7 2ab32da
Author: Pierre Krieger <[email protected]>
Date:   Thu Nov 28 13:58:15 2019 +0100

    Merge branch 'master' into wasm-start

commit 6f97dbb786750d854cf8f7a56c6a336ea5979228
Author: Pierre Krieger <[email protected]>
Date:   Thu Nov 28 12:47:45 2019 +0100

    Use --manifest-path instead

commit 20104e98ff1713b6c81b0251b43d060d4e672d55
Author: Pierre Krieger <[email protected]>
Date:   Thu Nov 28 10:44:51 2019 +0100

    Make availability-store compile for WASM

* Fix build

* Fix futures blocking panic in validators (again)

* Deindent

* Supercede 'Propagate Substrate#4284 to Polkadot' (paritytech#695)

* Propagate Substrate#4284 to Polkadot

* Fix tests

* Fixes

* Use hash part of fund id as child unique id.

* Add comma

* Switch branch

* run cargo update

* Update polkadot-master only

* Fix collator

* More update

* Fix compilation

* Some stylistic cleanups

* Increase the minimum treasury bond to reduce silly proposals (paritytech#701)

* Increase the minimum treasury bond to reduce silly proposals

* Bump substrate

* Bump version

* Update to latest Substrate master (paritytech#703)

* Update to latest Substrate master

* Fix tests

* Introduce an event for when transaction fees are paid (paritytech#702)

* Introduce an event for when transaction fees are paid

* Fix

Co-authored-by: Bastian Köcher <[email protected]>

* Bump to latest Substrate (paritytech#706)

* Updates, but won't build.

* Bump version.

* Fix

* Fix test

* ci: increase git cloning depth to 100 (paritytech#707)

* ci: fetch master branch for runtime diff (paritytech#708)

* Bump Substrate and runtime version (paritytech#712)

* Update to latest Substrate master

* Bump Substrate and runtime version

Co-authored-by: Bastian Köcher <[email protected]>

* ci: fix release tagging after tags are added on the master branch (paritytech#714)

* ci: fix release tagging after tags are added on the master branch

* ci: latest tag applied to latest tag

* Update kvdb version in availability-store (paritytech#709)

* update availability store

* also fix warning

* update Cargo.lock

* Support both polkadot and kusama runtimes (paritytech#704)

* Allow both polkadot and kusama runtimes

* Allow both polkadot and kusama runtimes

* Make `collator` build

* Removed kusama runtime

* Introduced common runtime

* Updated for latest substrate

* Updated CI targets

* Updated CI version check

* Removed unused dependency

* Pulled latests substrate

* Pulled latest substrate

* Fixed version

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <[email protected]>

* NEW_HEADS_IDENTIFIER moved to primitives

* Updated CI check script

* Fixed script

* Set epoch duration for polkadot

* ci: check_runtime for both runtimes

Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: gabriel klawitter <[email protected]>

* Bump Substrate & runtime version (paritytech#715)

* Bump Substrate & runtime version

* Attempt at fix

* Update runtime/kusama/src/lib.rs

Co-Authored-By: Bastian Köcher <[email protected]>

Co-authored-by: Bastian Köcher <[email protected]>

* Update copyright year (paritytech#718)

* Fixes after master merge

* service: support setting fork blocks in config (paritytech#719)

* ci: make sure master branch is available for check_runtime (paritytech#720)

* service/src/lib.rs: Register network event stream for authority disc (paritytech#678)

* service/src/lib.rs: Register network event stream for authority disc

Previously one would create a sender and receiver channel pair, pass the
sender to the build_network_future through the service builder and
funnel network events returned from polling the network service into the
sender to be consumed by the authority discovery module owning the
receiver.

With recent changes it is now possible to register an event_stream
with the network service directly, thus one does not need to make the
detour through the build_network_future.

This commit is an adjusted clone of one targeting the Substrate
repository.

* service/src/lib.rs: Fix futures::stream imports

* [TMP] *: Replace polkadot-upstream with feature branch

* Revert "[TMP] *: Replace polkadot-upstream with feature branch"

This reverts commit 0c947b04ab80488bfca16c5aeac9657b77a93a44.

* Hotfix for Kusama (paritytech#724)

* cli: revert borked kusama chain on startup

* Docs.

* cli: fix reversal of bork kusama fork

* cli: force always can author

* Version bump

* service: support setting fork blocks in config

* service: add support for bad blocks extension

* service: add badBlocks to kusama chainspec

* Bump Substrate to hotfix version.

* service: add bad block to kusama chain spec

* cleanup kusama hotfix

* add kusama grandpa hotfix

* Bump substrate

* Bump spec_version

* Rebump

* cli: remove unnecessary dependencies

* service: revert can_author_with fix

* service: remove unnecessary method

* Don't try to track polkadot runtime verion yet

* Versions

* service: better grandpa fix detection

Co-authored-by: André Silva <[email protected]>

* allow release alerts to fail (paritytech#725)

* Fix the can-author issue by defaulting to Kusama when no chainspec given. (paritytech#728)

* Fix can_author by defaulting correctly.

* Comments

* Better logging

* Bump Substrate

* Minor updates to readme.

* service: reset grandpa into a future round (not past) (paritytech#726)

* service: reset grandpa into a future round (not past)

* update substrate version

* service: create grandpa reset round variable

* service: fine grained grandpa reset on startup

Co-authored-by: Gavin Wood <[email protected]>

* Bump version (paritytech#729)

* polkadot v0.7.13 (paritytech#730)

* bump substrate version

* bump version to 0.7.13

* Fix pending-release alert script (paritytech#734)

... parity/tools doesn't have /bin/bash

* Select native runtime based on chain spec (paritytech#733)

* Select native runtime based on chain spec

* Bumped substrate

* Add sudo module to `polkadot-runtime` (paritytech#735)

* Bump versions (paritytech#736)

* Fix up Kusama balance constants

* Bump versions

* Fix for the --dev option

* remove kusama fixes (paritytech#738)

* Tweak Polkadot constants & bump Substrate (paritytech#739)

* Tweak Polkadot constants.

* Bump and remove warning

* Bump impl version

* Bump Substrate

* Bump Substrate again

* Some fixes

* Fix compilation

* Remove TODO

* Remove old dir

* Companion PR for Substrate#4585 (paritytech#748)

* Companion PR for Substrate#4394 (paritytech#723)

* service/src/lib.rs: Register network event stream for authority disc

Previously one would create a sender and receiver channel pair, pass the
sender to the build_network_future through the service builder and
funnel network events returned from polling the network service into the
sender to be consumed by the authority discovery module owning the
receiver.

With recent changes it is now possible to register an event_stream
with the network service directly, thus one does not need to make the
detour through the build_network_future.

This commit is an adjusted clone of one targeting the Substrate
repository.

* service/src/lib.rs: Fix futures::stream imports

* [TMP] *: Replace polkadot-upstream with feature branch

* Switch branch

* Small change

* Companion PR to substrate#4542

* Revert "Merge remote-tracking branch 'tomaka/companion-4542' into ashley-browser-utils"

This reverts commit 17f00afe483ee65cb3cf4a0faca27034e6d6523a, reversing
changes made to 928cbb9c55542baff56b53accd9a5a45f12f01f1.

* ashley-browser-utils -> ashley-browser-utils-polkadot

* Switch branches back

Co-authored-by: Max Inden <[email protected]>
Co-authored-by: Pierre Krieger <[email protected]>

* Companion PR to substrate#4542 (paritytech#732)

* Companion PR for Substrate#4585

Co-authored-by: Ashley <[email protected]>
Co-authored-by: Max Inden <[email protected]>
Co-authored-by: Pierre Krieger <[email protected]>

* Reset branch and make it compile

* Review feedback

* Make the bounds a bit cleaner.

Co-authored-by: Gavin Wood <[email protected]>
Co-authored-by: Stanislav Tkach <[email protected]>
Co-authored-by: Leo Arias <[email protected]>
Co-authored-by: Ashley <[email protected]>
Co-authored-by: Pierre Krieger <[email protected]>
Co-authored-by: Fedor Sakharov <[email protected]>
Co-authored-by: s3krit <[email protected]>
Co-authored-by: Kirill Pimenov <[email protected]>
Co-authored-by: gabriel klawitter <[email protected]>
Co-authored-by: Nikolay Volf <[email protected]>
Co-authored-by: Arkadiy Paronyan <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: André Silva <[email protected]>
Co-authored-by: Max Inden <[email protected]>
Co-authored-by: Tomasz Drwięga <[email protected]>
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.

Fast path for importing locally-authored or consensus-checked blocks
6 participants