Commit Graph

138 Commits

Author SHA1 Message Date
Gav Wood 91c7abd7dc Update to latest master (#137) 2019-02-13 15:36:54 +01:00
Benjamin Kampmann 9fb22ce28d Cleaning up dependencies (#125)
* cargo update
* Update to latest ctrlc crate
* Update vergen
* Update to latest pretty_assertions
* Update log
* Update parking_lot
* Update hex-rustc
2019-02-08 18:25:15 +01:00
Bastian Köcher 36034e79a2 Update to latest substrate (#120) 2019-02-04 18:58:03 -03:00
Gav Wood 82e866be42 Use new externs for eth crypto (#114)
* Add claims.

* Failing build

* Updatee to latest substrate, fix tests

* Remove unneeded

* Introduce tests with real work sig

* Use right 64 bytes of pubkey to get eth addr

* Fix for eth sig

* Fix build

* Fix wasm

* Use new externs for eth crypto.

* Bump spec version

* New runtime
2019-01-29 14:06:40 +01:00
thiolliere c363077404 set export-table link arg (#115) 2019-01-28 15:43:14 +01:00
Bastian Köcher 2b0dbd2d77 Updates substrate to latest master (#107)
* Updates substrate to latest master

* Use slot_duration and not slot

* Update to latest substrate master again to have latest CLI

* Rename iherent indentifier

* Update after master merge
2019-01-27 15:21:25 +01:00
Gav Wood c5bb21ab3c Claim yer sale DOTs (#97)
* Add claims.

* Failing build

* Updatee to latest substrate, fix tests

* Remove unneeded

* Introduce tests with real work sig

* Use right 64 bytes of pubkey to get eth addr

* Fix for eth sig

* Fix build

* Fix wasm
2019-01-25 08:43:05 +00:00
Robert Habermeier a05d422a55 Initial erasure-coding of availability data (#56)
* erasure-coding block data

* adjust error handling

* merkleize chunks and yield branches for each

* construction and proving of merkle branches

* port over to new GF(2^16) impl

* some tests for wrapped_shard

* handle extra byte from GF(2^16) better

* point to github dependency

* add issue link

* point to master for reed-solomon-erasure

* add missing license header
2019-01-24 12:31:22 -03:00
Robert Habermeier fe6351ca65 Parachain execution yields messages to send (#96)
* read head-data directly out of WASM memory

* implement ext_post_message for parachain WASM

* further refactoring of the parachain module

* add externalities error type

* accumulate posted messages when validating parachain candidate

* define Extrinsic type in primitives

* availability-store: store extrinsic data

* compute extrinsic and check against candidate

* add some egress queue tests

* grumbles & substrate update

* ensure everything builds
2019-01-22 12:32:32 +01:00
Gav Wood fc7cf99987 Merge branch 'master' of github.com:paritytech/polkadot 2019-01-18 12:57:25 +01:00
Gav Wood d0c92db92e Runtime. 2019-01-18 12:52:59 +01:00
Robert Habermeier 32cef97681 Remove availability statement (#79)
* remove availability vote type from statement-table

* expunge availability statement from consensus module

* expunge availability from duty roster

* rename StatementProducer to ParachainWork

* fix runtime tests and remove availability statement variant

* update wasm
2019-01-18 11:45:05 +01:00
Gav Wood 8f745fd217 Fixes for substrate#1404 (#76)
* Fixes for substrate#1404

* Updates for latest Substrate

* Update lock file

* Update runtime.
2019-01-16 17:50:39 +01:00
Gav Wood f66b5115fd Update to latest substrate (#66)
* Update to latest substrate

* Fix as much as I can

* Store key out of Environment::init

* Fix service compile
2019-01-08 14:08:31 +01:00
Gav Wood 5e04c22522 Alex spec 2018-12-21 14:47:19 +01:00
Gav Wood 3b1ffa2e95 PoC-3 final? 2018-12-21 14:14:41 +01:00
Gav Wood a7cd223104 Introduce sudo module 2018-12-21 12:54:16 +01:00
Gav Wood 3f70ee8ff9 Upgrade key 2018-12-20 20:06:47 +01:00
Gav Wood e8c5760180 Update lock and runtime 2018-12-20 19:15:04 +01:00
Robert Habermeier ccbae389c2 Update to latest substrate (#57)
* update to latest substrate

* update WASM and runtime

* Rename Id to ParaId in decl_{module,storage} (exported metadata type) (#58)

* Rename Id to ParaId in decla_module (exported type)

* AccountParaId -> AccountId
2018-12-20 13:43:48 +01:00
Robert Habermeier 19095168ce Authorship works again (#50)
* provide through inherent-data when authoring

* remove unneeded codec round-trip in proposer

* refactor polkadot-consensus service architecture

* integrate block authorship into polkadot service

* remove unused extern substrate-network crate in service

* write wrapper for unifying errors in consensus proposer

* extend wrapper further

* switch temporarily to macro-changing branch

* runtime compiles

* implement `inherent_extrinsics` for runtime

* block authorship works

* add GRANDPA to polkadot runtime

* get everything compiling

* use substrate master branch again

* remove some unneeded params

* update WASM

* parse only extrinsics when pruning availability store

* update recent deps

* runtime almost compiles

* need to expose trait type in build : I had to put phantomdata manually.

* finish updating authorship to latest GRANDPA and Aura

* fix tests

* update wasm
2018-12-11 17:55:04 +01:00
Robert Habermeier 7b46856159 Blocks carry full attestations for candidates (#42)
* statement table yields fully-attested candidates

* attestation types in polkadot-primitives

* propose block with fully-attested candidates in consensus

* some signature-checking logic in the runtime

* fix runtime compilation

* ensure attestations are full and without duplicate when checking

* fix consensus-service compilation

* add some tests

* use bitvec from crates.io now that it's published

* sign statements based on primitive statement's encoding

* remove some serialize bounds

* Fix error message with duplicate availability attestations

Co-Authored-By: rphmeier <rphmeier@gmail.com>
2018-11-26 17:30:04 +01:00
Gav Wood c31f8168df Make work with Substrate master (#36)
* Fix up wasm runtime build

* Fixes for runtime

* Fix.

* More fixes

* Runtime builds on native.

* Native and wasm both build without warnings.

* Fix runtime tests.

* Merge #20

* Final fix for native runtime.

* Compile polkadot wo consensus

* Reverted changes to polkadot-consensus

* reintroduce minimal subset of consensus

* reintroduce checked_block to runtime for std

* polkadot_consensus compiles without most of the code

* remove checked_block again and do more checks in parachains for runtime

* uncomment proposer

* remove offline tracker

* extract out parachain-attestation logic from proposal directly

* reintroduce transaction_pool

* write some custom aura verification logic for the block verifier

* use transaction pool in more generic way

* service compiles again

* polkadot-network and tests pass

* remove unused session_key function from router

* everything but CLI compiles due to service hell

* Fixes compilation of `polkadot_cli`

* everything compiles

* update adder wasm
2018-11-25 11:25:36 +01:00
Gav Wood 84748fccd3 Bring runtime API up to date with Substrate master (#17)
* Fixups for 646

* Fixes for API

* For for #678

* Fix runtime

* Update and build

* Tests build

* Fix tests
2018-09-12 19:36:33 +02:00
arkpar ab5e870f1c Merge branch 'master' of github.com:paritytech/polkadot into a-wasm-authoring 2018-08-31 18:06:00 +02:00
Gav 91b1a8960e Ugh. Confused. 2018-08-30 18:59:49 +02:00
Gav 268b3ea949 Fix 2018-08-30 18:25:12 +02:00
Gav d4e761ae7d No need for specific branch 2018-08-30 13:53:04 +02:00
Gav Wood a325902e57 Merge branch 'master' into a-wasm-authoring 2018-08-30 13:48:16 +02:00
Gav 4f210bbad6 Fix tests 2018-08-30 13:42:59 +02:00
Gav 1b0861a1e3 Fix build 2018-08-30 13:40:05 +02:00
Gav 57e2257a54 Merge remote-tracking branch 'origin/master' into gav-compat-629 2018-08-30 12:42:59 +02:00
Gav 74b4bc0911 Update to latest substrate 2018-08-30 11:17:48 +02:00
Gav 5138feb801 Fix up polkadot runtime 2018-08-30 09:57:09 +02:00
Gav e322657597 Initial stuff 2018-08-29 23:56:04 +02:00
Gav 79932f1975 Compat fix for substrate#624 2018-08-29 12:30:04 +02:00
Robert Habermeier 624c2ca0dc Merge remote-tracking branch 'substrate-disk/polkadot-testnet-fixes-fp' 2018-08-23 13:57:43 +02:00
arkpar aaf7bc930a Authoring with WASM runtime 2018-08-17 11:01:34 +02:00
Gav Wood f12221c4e6 Version bump, fixes (#572)
* Bump version, don't propose invalid blocks

* Fix build.

* Fixes.

* More fixes.

* Fix tests.

* Fix more tests

* More tests fixed
2018-08-15 21:50:39 +02:00
Gav Wood 314e2eeaf9 New slashing mechanism (#554)
* Slashing improvements

- unstake when balance too low
- unstake after N slashes according to val prefs
- don't early-terminate session/era unless unstaked
- offline grace period before punishment

* Fix warning

* Cleanups and ensure slash_count decays

* Bump authoring version and introduce needed authoring stub

* Rename

* Fix offline tracker

* Fix offline tracker

* Renames

* Add test

* Tests

* Tests.
2018-08-15 18:08:21 +02:00
Robert Habermeier 898c7d3138 parity-substrate -> substrate 2018-08-15 14:34:49 +02:00
Robert Habermeier 56759c781c replacing references to staging branch 2018-08-15 14:17:28 +02:00
Robert Habermeier 649bb2fdaa build new WASM 2018-08-15 13:42:34 +02:00
Robert Habermeier 670fc459b2 copy scripts 2018-08-15 13:40:49 +02:00
Robert Habermeier f85fcd4fc2 get building 2018-08-15 13:40:46 +02:00
Robert Habermeier 6e0903613b point to upstream split-substrate branch 2018-08-15 13:16:54 +02:00
Gav Wood c5e68a7b9b Refactor/substrate state machine generic (#553)
* Genric over hasher

* WIP start adding NodeCodec

* Add codec to TrieBackend

* Typechecks

* Fix error type

* Cleanup

* Tests build (and fail)

* Fix tests: don't use MemoryDB::default()

* Lockfile

* Address grumbles

* Teach environmental! about generics

* Add Finder artifacts

* whitespace

* Add a toy impl of Hasher and plug it in to Externalities

* Use `uint` and `fixed-hash` from `parity-common`
Remove unused U512
Add test to ensure H256 impls heapsizeof

* lock file updates

* Make hashes Encodable/Decodable

* lock file updates

* Impl FromIterator for TestExternalities so we can collect() and use map!

* Use rustc-hex from crates
Use rlp from master so dependencies do not mess up the scope

* Fix tests in runtime-io

* lockfile shenanigans

* Add a BlakeHasher impl

* Use BlakeHasher in runtime-io

* lockfile updates

* ws

* Add a Blake2/RLP-flavoured NodeCodec

* Use Blake-flavoured Hasher and NodeCodec

* lockfile

* Implement PartialEq and Default for TestExternalities

* Add note about limitations of environmental!

* Make it compile, but this is probably broken

* Derive Debug so tests in executor can work

* Make executor use BlakeHasher

* ws

* WIP make client generic

* typechecks

* cleanup

* client tests pass

* Fix client/db

* cleanup

* Fix network

* Fix rpc

* Fix service

* Make TestExternalities work better au lieu d'un HashMap

* Fix tests in council

* Fix tests in contract

* Fix tests in council

* Fix democracy

* Add comment about odd-looking reexports in tests

* Don't need to load branch

* Fix staking

* Fix session

* Some polkadot fixes and lockfile

* Fix executive

* fixup lockfile

* Fix polkadot/api

* Fix polkadot/service

* Fix polkadot/runtime tests

* Fix tests in test-runtime

* Test fixes

* Fix missing component in the `std` feature

* Use PhantomData and Result from core

* Fix paths
Use core

* load heapsize on wasm

* implement `HeapSizeOf` for wasm

* Add toy impl of `blake2_256` for no_std

* lockfile

* Use kvdb* from parity-common and fix errors

* rebuilt lockfile

* Add dummy impl of `on_advance_round` for rhododendron::Context

* Fix build after merge

* Add HeapSizeOf bound where needed

* Sort out dependencies for no_std

* Add HeapSizeOf bound where needed

* use temp branch pending PR merges

* Remove unneeded tests

* Lock file and wasm artifacts

* lockfile

* Use magic commit for libp2p

* Cleanup

* Implement blake2_256 for no_std

* Back on parity-common master

* missing type params

* Update Cargo.lock

* whitespace

* Rename concrete Rlp node codec "RlpCodec" and use everywhere
Implement a Keccak-flavoured Rlp NodeCodec and use everywhere
Add a KeccakHasher

* Switch to use KeccakHasher

* Lock file and runtimes

* fixup lockfile

* Fix outstanding issue using concrete types (thanks @gnunicorn)

* Cleanup

* More cleanup

* Comment out Blake2 Hasher

* implement ext_keccak256

* Address todo: FetchChecker is generic

* all tests passing
2018-08-15 13:13:11 +02:00
Robert Habermeier cfdda87d44 point things to substrate git repo 2018-08-14 18:53:12 +02:00
Robert Habermeier 74260a0847 Vote out offline authorities (#524)
* notify when an authority appears to have missed their block

* Runtime API

* offline tracker

* Move to consensus

* generating reports of offline indices

* stubbed-out evaluation logic

* Slashing data pathwat

* usize -> u32

* Slash bad validators.

* update to rhododendron 0.3

* fix compilation of polkadot-consensus

* Support offline noting in checked_block

* include offline reports in block authorship voting

* do not vote validators offline after some time

* add test for offline-tracker

* fix test build

* bump spec version

* update wasm

* Only allow validators that are possible to slash

* Fix grumble

* More idiomatic

* New Wasm.

* update rhododendron

* improve logging and reduce round time exponent

* format offline validators in ss58
2018-08-11 11:29:30 +02:00
Robert Habermeier 539650c063 Slashing for voted-offline validators. (#541)
[Backport] Vote out offline authorities
2018-08-10 16:12:17 +02:00