* babe: support online configuration upgrades
* Switch to use NextConfigDescriptor instead of changing runtime interface
* Fix tests
* epoch-changes: map function that allows converting with different epoch types
* Add migration script for the epoch config change
* Fix migration tests
* Fix migration: Epoch should be EpochV0
* Update client/consensus/babe/src/lib.rs
Co-Authored-By: André Silva <123550+andresilva@users.noreply.github.com>
* Fix new epochChanges version
* Fix unused imports
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* transition treasury to configurable moduleids
* make election module id configurable
* convert runtime and pallet to accept module id config elections-phragmen
* add ModuleId to evm pallet
* change society pallet to configurable module id
* delete commented out module_id
* delete commented out code and merge in upstream master
* try and convert 4 whitespace to tab
* fix remaining space to tab conversions
* trivial cleaning
* delete comment from elections-phragrems tests
* trivial
* Update frame/elections-phragmen/src/lib.rs
* add docs for elections and elections phragmen
* make has_lock test get moduleid dynamically
* Apply suggestions from code review
Co-Authored-By: Amar Singh <asinghchrony@protonmail.com>
* make sure get is imported to evm
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
* Initial draft of the logic
* Build and tests
* Make work with new initialize infratructure.
* Update frame/scheduler/src/lib.rs
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
* Update frame/scheduler/src/lib.rs
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
* Update frame/scheduler/src/lib.rs
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
* Update frame/scheduler/src/lib.rs
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
* Fix test
* Update frame/scheduler/src/lib.rs
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
* Rejig interface to make it more useful for democracy.
* Try to get democraxy module to make use of scheduler.
* Make democracy use scheduler.
* Use actual max weight for enactent
* Remove TODO
* Fix runtime build
* Minor cleanup
* Fix scheduler.
* Fix benchmarks
* Fix
* Fix
* Fix
* More bench fixes
* Fix
* Fix.
* Add more bench constants.
* Fix cancel_queued bench.
* Fix test comment.
* Update frame/scheduler/src/lib.rs
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com>
* Batch benchmarks together with `*` notation.
* Fix short structopt conflict
* Return error if `batches` is empty
* Move fast benchmarks macro into `frame_benchmarking` (#5445)
* Move macro into `frame_benchmarking`
* Update docs
* Extra line
* Return error if `batches` is empty
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Initial skeleton for offchain phragmen
* Basic compact encoding decoding for results
* add compact files
* Bring back Self::ensure_storage_upgraded();
* Make staking use compact stuff.
* First seemingly working version of reduce, full of todos
* Everything phragmen related works again.
* Signing made easier, still issues.
* Signing from offchain compile fine 😎
* make compact work with staked asssignment
* Evaluation basics are in place.
* Move reduce into crate. Document stuff
* move reduce into no_std
* Add files
* Remove other std deps. Runtime compiles
* Seemingly it is al stable; cycle implemented but not integrated.
* Add fuzzing code.
* Cleanup reduce a bit more.
* a metric ton of tests for staking; wip 🔨
* Implement a lot more of the tests.
* wip getting the unsigned stuff to work
* A bit gleanup for unsigned debug
* Clean and finalize compact code.
* Document reduce.
* Still problems with signing
* We officaly duct taped the transaction submission stuff. 🤓
* Deadlock with keys again
* Runtime builds
* Unsigned test works 🙌
* Some cleanups
* Make all the tests compile and stuff
* Minor cleanup
* fix more merge stuff
* Most tests work again.
* a very nasty bug in reduce
* Fix all integrations
* Fix more todos
* Revamp everything and everything
* Remove bogus test
* Some review grumbles.
* Some fixes
* Fix doc test
* loop for submission
* Fix cli, keyring etc.
* some cleanup
* Fix staking tests again
* fix per-things; bring patches from benchmarking
* better score prediction
* Add fuzzer, more patches.
* Some fixes
* More docs
* Remove unused generics
* Remove max-nominator footgun
* Better fuzzer
* Disable it ❌
* Bump.
* Another round of self-review
* Refactor a lot
* More major fixes in perThing
* Add new fuzz file
* Update lock
* fix fuzzing code.
* Fix nominator retain test
* Add slashing check
* Update frame/staking/src/tests.rs
Co-Authored-By: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
* Some formatting nits
* Review comments.
* Fix cargo file
* Almost all tests work again
* Update frame/staking/src/tests.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
* Fix review comments
* More review stuff
* Some nits
* Fix new staking / session / babe relation
* Update primitives/phragmen/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
* Update primitives/phragmen/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
* Update primitives/phragmen/compact/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
* Some doc updates to slashing
* Fix derive
* Remove imports
* Remove unimplemented tests
* nits
* Remove dbg
* Better fuzzing params
* Remove unused pref map
* Deferred Slashing/Offence for offchain Phragmen (#5151)
* Some boilerplate
* Add test
* One more test
* Review comments
* Fix build
* review comments
* fix more
* fix build
* Some cleanups and self-reviews
* More minor self reviews
* Final nits
* Some merge fixes.
* opt comment
* Fix build
* Fix build again.
* Update frame/staking/fuzz/fuzz_targets/submit_solution.rs
Co-Authored-By: Gavin Wood <gavin@parity.io>
* Update frame/staking/src/slashing.rs
Co-Authored-By: Gavin Wood <gavin@parity.io>
* Update frame/staking/src/offchain_election.rs
Co-Authored-By: Gavin Wood <gavin@parity.io>
* Fix review comments
* fix test
* === 🔑 Revamp without staking key.
* final round of changes.
* Fix cargo-deny
* Update frame/staking/src/lib.rs
Co-Authored-By: Gavin Wood <gavin@parity.io>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
* Init
* Fix execute.
* Duplicate macro for instances temporarilly
* Add propose.
* Add vote, close.
* Propose from own module
* Add old members to set_members.
* Add previous proposals to propose.
* Compress a bit the macro.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Implement ext_ hashes for contracts (issue #5258)
* load cryto hash .wat from raw string literal instead of file
* update .wat contents for testing crypto hashes
* remove unnecessary 'static
* fix bug in input (call_indirect required 1+ at least it seems)
* no longer use scratch buffer for crypto hash functions
* improve doc comments of ext_ hash functions
* remove unnecessary comment in .wat test file
* add return value (const 0) to contract test to hopefully enable result buffer
* fix bug in contract assertion
* implement proper output_len in contract
* implement proper test for crypto hashes
* bump spec_version 238 -> 239
* fix COMPLEXITY description
* remove final invalid instances of scratch buffer from docs
* Version bump
* Split generate_changelog.sh into separate script
Can be run in the format `generate_changelog.sh $previous_version $version`.
* remove early exit from publish_draft_release.sh
* adding changelog
* ci: change last_github_release to also find pre-releases
Co-authored-by: Martin Pugh <pugh@s3kr.it>
* contracts: Add ext_transfer call
This call allows contracts to send balance to any account
contract or not. Previously, the only way to do that was
though ext_call.
* Apply suggestions from code review
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com>
* The define_env! macro does not allow for trailing comma
* Update frame/contracts/src/exec.rs
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com>
* Bump spec version
* Do not use nested gas meter
* Use explicit 0 or 1 as return value
* Remove superflous intermediate binding
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* split out ext_clear_storage from ext_set_storage contracts API
* update tests to adjust for the ext_set_storage changes
* adjust COMPLEXITY for the ext_set_storage API changes
* remove value_len == 0 constraint for ext_set_storage
* bump spec_version
* remove guarantee from COMPLEXITY of ext_clear_storage
Co-authored-by: Gavin Wood <gavin@parity.io>
* Use CLI to configure max instances cache
* Fix tests
* Move default value into CLI
* Use SmallVec
* Apply review comments
* Get rid of `SmallVec`
Co-authored-by: Bastian Köcher <git@kchr.de>
* add documentation and optimise payout_validator a bit
* bump spec version to be safe
this is just in case clipped exposure and exposure have different fields
own and total. This shouldn't be the case but better be safe in case
storage is wrong.
* Update frame/staking/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>