Commit Graph

15841 Commits

Author SHA1 Message Date
Benjamin Kampmann e1d64b1fc7 Allow to build_upon skipped entries, but don't walk back (#635)
* Allow to build_upon skipped entries, but don't walk back

* Use existing calculated version
2018-08-31 12:51:40 +02:00
Gav 91b1a8960e Ugh. Confused. 2018-08-30 18:59:49 +02:00
Gav 07c72ea8e7 Rejig serialisation 2018-08-30 18:57:59 +02:00
Gav Wood 8281618e50 Separate out staking module into balances and payment (#629)
* Initial commit.

* Split out balances module

* Minimise Balances trait requirements

* Fix up balances, remove balances stuff from staking

* Split off and fix up staking module

* Fix executive tests

* Fix up democracy module

* make council work again

* Remove unneeded cruft from democracy

* Fix up contract module

* Fix up rest of tests

* Fix minor TODOs

* Fix tests

* Remove superfluous code

* Move offline inherents to consensus module.

Fixes #630

* Version needs Decode.

* Move Decode back

* Fix nits

* Refactor to allow custom message
2018-08-30 18:43:38 +02:00
Gav 268b3ea949 Fix 2018-08-30 18:25:12 +02:00
Denis S. Soldatov aka General-Beck 6ae3204f17 Update .gitlab-ci.yml (#633)
it is necessary to test.
You will probably have to create a cron-job for the nightly assembly of the master branch
2018-08-30 15:21:42 +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 Wood aa6340c2fd Merge pull request #7 from paritytech/rh-testnet-fp
Forward-port of various testnet fixes
2018-08-30 12:41:44 +02:00
Gav Wood 96c269ad08 Merge branch 'master' into rh-testnet-fp 2018-08-30 12:37:24 +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 7aff0dc99b Merge branch 'gav-compat-624' into gav-compat-629 2018-08-29 23:57:53 +02:00
Gav 11b9d9495a Merge branch 'master' into gav-compat-624 2018-08-29 23:57:35 +02:00
Gav e322657597 Initial stuff 2018-08-29 23:56:04 +02:00
ddorgan bcdb2d7ba0 Do not attempt to rustup if in CI. This is taken care of by the base (#621)
image.
2018-08-29 15:24:24 +02:00
Arkadiy Paronyan ee9779abd5 Merge pull request #9 from gguoss/arrange
Delete not use dependecies in polkadot/cli
2018-08-29 13:36:02 +02:00
Arkadiy Paronyan 2a27dc1a69 Merge pull request #6 from paritytech/a-ext-pool
More generic extrinsic pool
2018-08-29 12:33:45 +02:00
Gav 79932f1975 Compat fix for substrate#624 2018-08-29 12:30:04 +02:00
Gav Wood 28b48842a8 Avoid need for ident strings in storage (#624)
* Remove need for ident strings for storage items

* Fixes

* Fix tests

* Minor change to macro grammer
2018-08-29 12:29:16 +02:00
Guanqun Lu 6c943bada2 rename to panic_handler as panic_implementation is deprecated in nightly (#626) 2018-08-29 11:27:14 +02:00
Sergey Pepyakin 283eb383c0 5 random fixes (#2) (#623)
* Tabs instead of spaces.

* Remove double spaces.

* Add spaces between ID and the following {

* Update to nightly 2018-08-27

* Align wat code properly
2018-08-29 11:26:44 +02:00
Guanqun Lu 5c8b52ba16 fix one typo in README (#627) 2018-08-29 11:25:20 +02:00
Guanghua Guo 758c7bb0be Misspelled words (#625)
* Misspelled words

* Update native_executor.rs
2018-08-29 11:24:35 +02:00
Sergey Pepyakin 20655af97b Contracts: Per block gas limit (#506)
* Add block gas limit check

* Fix formatting

* Add block_gas_limit test.

* Use ExtBuilder in tests

* Docs and clean-up.

* Correct style
2018-08-28 16:58:27 +01:00
Tomasz Drwięga 3e63009ac7 Make sure to ban invalid transactions. (#615) (#620) 2018-08-28 16:47:02 +01:00
Robert Habermeier a0069f5fe2 Forward-port BFT fixes from v0.2 and restructure agreement cancelling (#619)
* more accurate consensus superseding logic

* mild revision to `can_build_on` logic

* fix a deadlock when spawning agreement as non-authority

* dropping BFT future before poll doesn't lead to service deadlock

* push cancel to BFTfuture rather than waiting for task
2018-08-28 12:28:28 +01:00
Pierre Krieger eb10c392ce Allow specifying listening multiaddresses (#577) 2018-08-28 12:16:51 +01:00
Gav Wood 278a054b81 Introduce Runtime Events (#607)
* Squashed commit.

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.
Remove accidental merge files.
Merge remote-tracking branch 'origin/master' into gav-new-pos
Version bump, fixes (#572)  …
* Bump version, don't propose invalid blocks
* Fix build.
* Fixes.
* More fixes.
* Fix tests.
* Fix more tests
* More tests fixed
Fix merge
Fix accidental merge bug
Fixes.
Staking failsafes  …
- Don't slash/unstake/change session when too few staking participants
- Introduce set_balance PrivCall
Make minimum validator count dynamic.
test fixes
Fix tests.
Fix tests
Fix tests, update readme.
Merge remote-tracking branch 'origin/master' into gav-new-pos
Test with release.
Use safe math when dealing with total stake
Fix test again.
Introduce events into runtime.
Fix tests
Add events for account new/reap
Integration-style tests for events.

* Remove old code
2018-08-28 12:11:40 +01:00
Guanghua Guo f5c684dca6 update substrate/extrinsic-pool (#616) 2018-08-28 10:54:22 +01:00
Guanqun Lu 3a58595a85 add a new unit test for extrinsic pool (#611) 2018-08-28 10:53:59 +01:00
Guanqun Lu 98f3f80e70 set the current repo in Cargo.toml (#610) 2018-08-28 10:53:45 +01:00
Guanqun Lu 25450dc87d add cli for purge chain (#609) 2018-08-28 10:53:28 +01:00
gguoss 0b2ef109c5 Delete not use dependecies in polkadot/cli 2018-08-28 10:50:32 +08:00
Gav Wood f59bcd15da New slashing logic (#570)
* 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.

* Remove accidental merge files.

* Version bump, fixes (#572)

* Bump version, don't propose invalid blocks

* Fix build.

* Fixes.

* More fixes.

* Fix tests.

* Fix more tests

* More tests fixed

* Fix merge

* Fix accidental merge bug

* Fixes.

* Staking failsafes

- Don't slash/unstake/change session when too few staking participants
- Introduce set_balance PrivCall

* Make minimum validator count dynamic.

* test fixes

* Fix tests.

* Fix tests

* Fix tests, update readme.

* Test with release.

* Use safe math when dealing with total stake

* Fix test again.

* Fix grumbles.
2018-08-27 17:11:04 +02:00
Sergey Pepyakin 4e9f40840c Contract signatures checking (#478)
* Convert T in vm::Ext to a associated type

* WIP

* Fix BTreeMap

* Extract prepare module from vm.

* Move tests as well.

* Fix doc comment.

* macro for env defintion

* Fix prepare tests.

* Clean up

* Renamings

* Refactor scan_imports

* Improve docs

* Docs.

* Add some tests for sandbox module

* Clean up

* Use Error::Instantiate instead of ::Deserialize

* Add test for imports

* Add wrong sig import

* Clean up

* Rebuild binaries.

* Use "another_module" instead of obscure "vne"

Since "vne" looks like an actual typo
2018-08-27 16:09:10 +02:00
Guanqun Lu 875ce9e6c3 extrinsic-pool: use retain() (#613) 2018-08-27 10:43:00 +02:00
Guanqun Lu 58bba89819 rename Polkadot to Substrate in the license header via following four commands (#614)
git grep -l 'This file is part of Polkadot' | xargs sed -i 's/This file is part of Polkadot/This file is part of Substrate/g'
    git grep -l 'Polkadot is free software' | xargs sed -i 's/Polkadot is free software/Substrate is free software/g'
    git grep -l 'Polkadot is distributed in the hope' | xargs sed -i 's/Polkadot is distributed in the hope/Substrate is distributed in the hope/g'
    git grep -l 'along with Polkadot' | xargs sed -i 's/along with Polkadot/along with Substrate/g'
2018-08-27 10:42:50 +02:00
Guanqun Lu e8ec3d72c9 typo fixes (#608) 2018-08-26 20:06:47 +02:00
Tomasz Drwięga 2c21f5ff30 RPC: Block number to block hash (#584)
* Return hash for given block number.

* Add some tests.

* Fix re-import.
2018-08-25 14:11:11 +02:00
Sergey Pepyakin 969fcfb97f Minor fixes for nightly 2018-08-18 (#600)
* Don't use --export-table anymore

Because it was turned on by default in the recent nightlies.

See https://github.com/rust-lang/rust/pull/53237

* use_extern_macros stabilization

With recent nightlies rustc produces a warning

```
the feature `use_extern_macros` has been stable since 1.30.0 and no longer requires an attribute to enable
```
2018-08-25 11:59:52 +02:00
Tomasz Drwięga d965e8f08e Time-based transaction banning (#594) (#602)
* Allow replacing transactions.

* Clear old transactions and ban them temporarily.

* Move to a separate module and add some tests.

* Add bound to banned transactions.

* Remove unnecessary block and double PoolRotator.
2018-08-25 00:19:36 +02:00
ddorgan 134b8f47dd cargo --force to allow CI to build. (#599) 2018-08-24 14:43:49 +02:00
Robert Habermeier 624c2ca0dc Merge remote-tracking branch 'substrate-disk/polkadot-testnet-fixes-fp' 2018-08-23 13:57:43 +02:00
Robert Habermeier 430e3920e5 Rollup of various testnet-related fixes.
fix a deadlock when spawning agreement as non-authority

fix test compilation for BFT

more accurate consensus superseding logic

mild revision to `can_build_on` logic

block evaluation without redundant initialisation

refactor BFT delay: update rhododendron and poll after delaying. (#589)

dropping BFT future before poll doesn't lead to service deadlock
2018-08-22 18:14:58 +02:00
arkpar 6a491f10a2 Bumped substrate 2018-08-21 17:29:47 +02:00
Gav Wood 2673c26414 Fix logging (#587)
* Fix logging

* Add error info
2018-08-21 12:19:11 +02:00