Commit Graph

237 Commits

Author SHA1 Message Date
Max Inden c5fe4295f8 *: Register network event stream for authority discovery (#4344)
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`.
2020-01-03 20:47:12 +00:00
Nikolay Volf f0e21eff09 Update kvdb-* and trie (#4483) 2020-01-03 20:46:42 +00:00
ddorgan a45aa6e1b6 Update flamingfir spec for new testnet (#4518)
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-01-03 12:25:31 +01:00
Nikolay Volf 508f94acdf Update libp2p to fix build (#4522)
* update libp2p

* update toml files also
2020-01-02 18:37:42 +01:00
Nikolay Volf 6d06a19f41 Refactor to use only chain info (#4516) 2020-01-02 12:46:07 +01:00
Bastian Köcher 56355879be Fix cli for structopt 0.3.7 and pin to that version (#4509)
* Fix cli for structopt 0.3.7 and pin to that version

This is just some hotfix to make everything compile. In the future it
will require another pr to not depend on internals of StructOpt, but
that will probably also require some additions to StructOpt itself. To
not break the code again with another StructOpt, this also pins the
StructOpt version.

* Fix benches

* Fix for fix
2019-12-28 22:52:18 +01:00
Arkadiy Paronyan 9950ea98fc Shared params in CLI API (#4466)
* Common shared parames getter

* Expose more types from `service-builder`

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2019-12-20 16:05:01 +01:00
Benjamin Kampmann 9200bfa997 Setting versions locally towards 2.0 release (#4404)
* clean up cargo.toml syntax

* bumping versions to 2.0

* bump networking to 0.8

* move consensus down to 0.8

* bump consensus pallets to 0.8.0, too

* Upping babe and aura pallets

* add remaining, missing version definitions

* missed some
2019-12-17 22:05:50 +08:00
Bastian Köcher e19f5adfb7 Fix frame_system renaming in contruct_runtime (#4412)
* Fix contruct_runtime

* Update lib.rs

* Update event.rs

* Update event.rs

* Update event.rs

* Update event.rs

* Update event.rs

* Update event.rs

* Update event.rs

Back to where we started

* Update chain_spec.rs

* Update genesis.rs

* Fix it properly
2019-12-17 10:54:50 +01:00
Svyatoslav Nikolsky cd718cd77d recover light client integration tests (#4377) 2019-12-17 08:45:04 +01:00
Tomasz Drwięga 8778ca7dc8 [big refactor] Remove crate aliasing. (#4395)
* Rename: Phase 1.

* Unify codec.

* Fixing: Phase 2

* Fixing: Phase 3.

* Fixing: Phase 4.

* Fixing: Phase 5.

* Fixing: Phase 6.

* Fixing: Phase 7.

* Fixing: Phase 8. Tests

* Fixing: Phase 9. Tests!!!

* Fixing: Phase 10. Moar tests!

* Finally done!

* More fixes.

* Rename primitives:: to sp_core::

* Apply renames in finality-grandpa.

* Fix benches.

* Fix benches 2.

* Revert node-template.

* Fix frame-system in our modules.
2019-12-16 20:36:49 +08:00
Pierre Krieger c66c191b68 Extract consensus_gossip.rs and put it in its own crate (#4284)
* Extract gossiping system from network

* Finish porting GRANDPA tests

* Try put correct engine ID

* Fix messages encoding

* Fix communication tests

* Use a threads pool to spawn stuff

* Fix compilation everywhere

* Fix bad merge conflict

* Remove dependency on async-std

* Apply suggestions from code review

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>

* More suggestions

* Remove network startup GP future

* Update to futures_timer

* adjust wait_when_behind test

* Pass correct Roles after handshake

* Revert "adjust wait_when_behind test"

This reverts commit 23cb3a0a6d25ed732c2cd648607bc44ef2ab0919.

* Crate root documentation

* Remove MessageRecipient

* Address concerns

* Fix more concerns

* Forgot Cargo.lock
2019-12-13 19:16:10 +01:00
Benjamin Kampmann 7773daaf5b Clean up crate names and locations (#4361)
* rename crate: sp-transaction-pool-api -> sp-transaction-pool

* move primitives/core/derive-debug -> primitives/derive-debug; primitives/core/storage -> primitives/storage

* rename crate sp-core-storage -> sp-storage

* rename and move: test/utils/transaction-factory -> client/transaction-factory

* move transaction-factory -> node/transaction-factory

* fix missing rename

* Move chain-spec-builder into bin/utils

* move subkey into bin/utils

* Update new subkey location

* Update docs to reflect new location for utils

* fixing import name
2019-12-11 15:33:00 +01:00
Weiliang Li 4f2cdb20c1 Rename: primitives/sr-io -> primitives/sp-io (#4328)
* primitives/sr-io -> primitives/io

* fix

* rename

* runtime-io -> sp-io

* git mv

* fix ci

* remove package name

* fix

* fix

* try minimizing diff

* try minimizing diff again

* try minimizing diff again
2019-12-10 16:08:35 +01:00
Bastian Köcher 2cb4e8db4d Don't assume a fixed length for endowed_accounts (#4330) 2019-12-09 20:26:12 +01:00
Weiliang Li 04fcc71809 Rename folder: primitives/sr-primitives -> primitives/runtime (#4280)
* primitives/sr-primitives -> primitives/runtime

* update
2019-12-09 08:49:32 +01:00
ddorgan cbd85e65b6 New protocolid for flaming fir (#4323) 2019-12-07 15:30:05 +01:00
Yuanchao Sun e2bf02f138 Minor fix toml files (#4291) 2019-12-05 13:00:45 +01:00
Bryant Eisenbach c071276187 fix: Typo granpda -> grandpa (#4286) 2019-12-04 00:05:05 +01:00
Max Inden 2de6f82b8a client: Introduce --sentry-nodes flag (#4285)
* client/authority-discovery: Add smoke tests for intervall_at

* client/authority-discovery: Fix interval_at to fire on start

* .maintain/sentry-node: Update docker compose file

* client: Introduce --sentry-nodes flag

Enable operators to specify the public addresses of sentry nodes infront
of a validator node so that the validator node can announce the sentry
node addresses instead of its own public addresses on the DHT via the
authority discovery module.

* client/authority-discovery: Break lines at 100 characters

Limit line length to 100 instead of 120 characters.
2019-12-03 18:03:08 +01:00
Keith Ingram 5edc4350b4 Council members (#4279) 2019-12-03 09:29:46 +01:00
Benjamin Kampmann 810ac845b5 Fix sc-tracing-* -> sc-transaction- (#4263)
* fixing faulty tracing-rename

* missed one
2019-12-02 12:19:53 +01:00
Benjamin Kampmann 927e13c13a The crate rename (#4223)
* Adding script for rename, could be applicable for nodes on top of it, too

* add stderr and gitlab ci features

* apply script

* fix now minor details in expected stderr

* Update the Cargo.lock

* fix name: sc-transaction -> sc-tracing

* fix rename in script, too
2019-12-02 11:23:53 +01:00
Bastian Köcher 3da736fdf6 Update kvdb-rocksdb again (#4236)
* Update kvdb-rocksdb again

* Switch to released crates

* Remove last git references
2019-11-29 11:32:44 +01:00
Bastian Köcher accc678640 Check in block authoring that we can author with current authoring version (#4201)
* Check in block authoring that we can author with current authoring version

* Update client/consensus/pow/src/lib.rs

Co-Authored-By: André Silva <andre.beat@gmail.com>

* Fix compilation
2019-11-29 11:01:11 +01:00
Arkadiy Paronyan 0b52f194f5 Fixed node binary (#4244)
* Fixed node binary

* Remove extra params
2019-11-29 09:09:12 +01:00
Arkadiy Paronyan 504e2f8bd5 Check block CLI command (#4240)
* Check block operation

* Update client/cli/src/lib.rs

* Update client/cli/src/params.rs
2019-11-28 11:24:28 +00:00
Svyatoslav Nikolsky a782021ee8 Recover transaction pool on light client (#3833)
* recover tx pool on light client

* revert local tests fix

* removed import renamings

* futures03::Future -> std::future::Future

* Update core/transaction-pool/graph/src/error.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* replace remove_from_ready with remove_invalid

* avoid excess hashing

* debug -> warn

* TransactionPool + BasicTransactionPool

* pause future tx reject when resubmitting

* bump impl_version to make CI happy

* and revert back local test fixes

* alter doc to restart CI

* Transaction::clone() -> Transaction::duplicate()

* transactions -> updated_tranasctions

* remove explicit consensus-common ref

* ::std:: -> std::

* manual set/unset flag -> calling clusore with given flag value

* removed comments

* removed force argument

* BestIterator -> Box<Iterator>

* separate crate for TxPool + Maintainer trait

* long line fix

* pos-merge fix

* fix benches compilation

* Rename txpoolapi to txpool_api

* Clean up.

* Finalize merge.

* post-merge fix

* Move transaction pool api to primitives directly.

* Consistent naming for txpool-runtime-api

* Warn about missing docs.

* Move  abstraction for offchain calls to tx-pool-api.

* Merge RPC instantiation.

* Update cargo.lock

* Post merge fixes.

* Avoid depending on client.

* Fix build
2019-11-28 00:00:54 +00:00
Benjamin Kampmann bd652793db Remove all (non-dev) client references from frame, activate dependency enforcer (#4184)
* Move transaction pool to primitives

* move backend, errors into primitives

* remove unused client depencies

* Move rpc-api into primitives

* Move peerset back to client

* Move rpc/api back to client, move palette/support/rpc into utils

* move support-rpc into subfolder

* move system-rpc into utils

* move transaction-pool  and -graph back into client

* fix broken imports

* Clean up test primitives

* Make support test utils independent of frame

* remove unnecessary node dependencies from service

* Reactivate dependency script:
 - only enforce the now achieved status quo will remain
 - allow for primitives to depend on /client for now without failing
 - more discriptive error message so people understand, what it wants
 - minor fix to differentiative between ../client and /client (which may be a subfolder)
 - don't allow this to fail anylonger.

* fix doc comment

* 'Should not' rather than 'must not'.

* Revert unwanted dependency changes

* fix faulty import

* fixup derive_more version

* fix wrong import path
2019-11-26 21:38:28 +01:00
Weiliang Li afaf66a853 Sort node/cli/Cargo.toml (#4205) 2019-11-26 18:14:18 +01:00
Bastian Köcher f0fc2d89d2 Switch to new kvdb-rocksdb (#4186)
* Switch to new rocksdb with some hacks to resolve linking errors

Rocksdb and `wasmtime-environ` both link `zstd`. In the final link step,
this leads to linking errors because of duplicate symbols. The linked
Rocksdb fixes this by using `zstd-sys` as well. However, this currently
also requires modifications in `zstd-sys`. Someone will need to come up
with a better implementation.

* Switch to new version of kvdb-rocksdb

* Update client/db/src/utils.rs

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
2019-11-23 23:28:42 +01:00
Shawn Tabrizi c9175b59ff Rename Palette to FRAME (#4182)
* palette -> frame

* PALETTE, Palette -> FRAME

* Move folder pallete -> frame

* Update docs/Structure.adoc

Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com>

* Update docs/README.adoc

Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com>

* Update README.adoc
2019-11-22 19:21:25 +01:00
Ashley 1735683cc9 Upgrade from futures-preview to futures 0.3.1, and remove futures 0.1 where currently possible (#4083)
* Migrate node and node-template

* Migrate srml

* Simple changes

* Add async-std for interval

* Fix test-runtime warning

* Small changes

* move futures01 in core/rpc to dev-deps

* Change wasm CI builds

* Switch to async-std 1.0.1

* Remove async-std dep of network

* Add modified lockfile

* Fix node cli browser build

* Remove authority-discovery async-std dep

* Add Send + Sync to interval dyn stream
2019-11-22 13:06:23 +01:00
joe petrowski 2783b44207 Rename PAINT to PALETTE (#4161)
* /paint to /palette

* rename paint to palette

* rename the modules in palette to be pallets

* update Structure.adoc

* bump impl

* fix CI directory

* Update docs/Structure.adoc

Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org>
2019-11-21 01:08:25 +01:00
Benjamin Kampmann 303843f483 Move inherents to primitives (#4126)
* Split Aura and Timestamp inherents out of paint

* fixup node depedencies

* move babe inherents to primitives

* move authorship inherents into primitives

* Move finalty tracker inherents into primitives

* fix aura primitives import
2019-11-20 12:18:36 +01:00
Pierre Krieger 621c02440a Fix the browser demo README (#4106) 2019-11-18 21:00:07 +01:00
Benjamin Kampmann 60e5011c72 Reorganising the repository - external renames and moves (#4074)
* Adding first rough ouline of the repository structure

* Remove old CI stuff

* add title

* formatting fixes

* move node-exits job's script to scripts dir

* Move docs into subdir

* move to bin

* move maintainence scripts, configs and helpers into its own dir

* add .local to ignore

* move core->client

* start up 'test' area

* move test client

* move test runtime

* make test move compile

* Add dependencies rule enforcement.

* Fix indexing.

* Update docs to reflect latest changes

* Moving /srml->/paint

* update docs

* move client/sr-* -> primitives/

* clean old readme

* remove old broken code in rhd

* update lock

* Step 1.

* starting to untangle client

* Fix after merge.

* start splitting out client interfaces

* move children and blockchain interfaces

* Move trie and state-machine to primitives.

* Fix WASM builds.

* fixing broken imports

* more interface moves

* move backend and light to interfaces

* move CallExecutor

* move cli off client

* moving around more interfaces

* re-add consensus crates into the mix

* fix subkey path

* relieve client from executor

* starting to pull out client from grandpa

* move is_decendent_of out of client

* grandpa still depends on client directly

* lemme tests pass

* rename srml->paint

* Make it compile.

* rename interfaces->client-api

* Move keyring to primitives.

* fixup libp2p dep

* fix broken use

* allow dependency enforcement to fail

* move fork-tree

* Moving wasm-builder

* make env

* move build-script-utils

* fixup broken crate depdencies and names

* fix imports for authority discovery

* fix typo

* update cargo.lock

* fixing imports

* Fix paths and add missing crates

* re-add missing crates
2019-11-14 21:51:17 +01:00