1. Oct 09, 2018
    • Bastian Köcher's avatar
      Runtime API clean up (#892) · 4fc8c98b
      Bastian Köcher authored
      * Rename `NewTxQueue` to `TaggedTransactionQueue`
      
      * Remove `BlockBuilder` API and support adding documentation to the API functions
      
      * Adds new `BlockBuilder` API
      
      * Fixes compilation with new `BlockBuilder` API
      
      * Some more cleanup
      
      * Cargo.lock update
      
      * Try to fix on stable
      4fc8c98b
    • Bastian Köcher's avatar
      Refactor the runtime API to use traits. (#878) · 3f467478
      Bastian Köcher authored
      * Add missing `As` imports.
      
      * Adds new API traits that will be used by the client and runtime
      
      * Switch consensus to new API's
      
      * Switches transaction-pool to new API's
      
      * Move runtime api stuff into its own crate
      
      * Adds `impl_apis!` macro for implementing the new API traits
      
      * Make `metadata` return directly a blob
      
      * Runtime replace `impl_stubs!` with `impl_apis!`
      
      * Switches to none feature based approach for declaring the different API traits
      
      * Fixes compilation error
      
      * Fixes errors
      
      * Make the `decl_apis!` trait usable from the outside
      
      * Make the `test-client` use the new API traits
      
      * Remove last `impl_stubs!` bits and move some of them into wasm executor for tests
      
      * A little bit more documentation
      3f467478
  2. Oct 05, 2018
  3. Sep 30, 2018
  4. Sep 28, 2018
    • Arkadiy Paronyan's avatar
      Integration tests (#805) · e722f09b
      Arkadiy Paronyan authored
      * Started substrate tests
      
      * Sync test
      
      * Test updates
      
      * Improved tests
      
      * Use on-chain block delay
      
      * Parallel test execution
      
      * Otimized tests
      
      * Logging
      
      * Fixed racing test
      
      * Fixed compilation
      
      * Fixed timestamp test
      
      * Removed rlp dependency
      
      * Minor fixes
      
      * Fixed tests
      
      * Removed best_block_id and resolved fdlimit issue
      
      * Whitespace
      
      * Use keyring
      
      * Style
      
      * Added API execution setting
      
      * Removed stale import
      e722f09b
  5. Sep 27, 2018
  6. Sep 25, 2018
  7. Sep 21, 2018
  8. Sep 20, 2018
    • Gav Wood's avatar
      Transaction eras (#758) · 0b72f33d
      Gav Wood authored
      * Initial groundwork
      
      * A mess.
      
      * Integrate
      
      * Fix tests
      
      * Unit tests
      
      * Tests for unchecked_extrisnic
      
      * fix tab
      
      * Improve binary format.
      
      * fix tests
      
      * Rename extrinsic-pool -> transaction-pool
      
      Closes #770
      
      * Implement unimplemented.
      
      * typo
      0b72f33d
    • Bastian Köcher's avatar
      Replace JSON metadata with custom metadata structures (#766) · 64fa981d
      Bastian Köcher authored
      * Move module metadata from json string to custom metadata
      
      * Revisit the metadata structures
      
      1. Move the structures into the metadata crate.
      2. Switch to using Cow/MaybeOwnedArray to support Encode/Decode
      
      * Adapt to new metadata structures
      
      * Convert event json metadata to new metadata structures
      
      * Convert storage json metadata to new metadata structures
      
      * Convert runtime metadata from json to new metadata structs
      
      * Implements new metadata structures in client and runtime
      
      * Fixes errors on `no_std`
      
      * Fixes errors after rebasing master
      
      * Do not use `Cow` anymore in metadata
      
      Also replace `String` with our own type definition `StringBuf`.
      This fixes compilation on `no_std`.
      
      * Wrap `RuntimeMetadata` in `RuntimeMetadataVersioned` to support versioning
      
      * Move metadata into `srml` and make core unaware of the implementation
      64fa981d
  9. Sep 19, 2018
  10. Sep 18, 2018
    • Svyatoslav Nikolsky's avatar
      Light friendly storage tracking: changes trie + extending over ranges (#628) · 95e017dd
      Svyatoslav Nikolsky authored
      * changes_trie
      
      * changs_trie: continue
      
      * changes_trie: adding tests
      
      * fixed TODO
      
      * removed obsolete ExtrinsicChanges
      
      * encodable ChangesTrieConfiguration
      
      * removed polkadot fle
      
      * fixed grumbles
      
      * ext_storage_changes_root returns u32
      
      * moved changes trie root to digest
      
      * removed commented code
      
      * read storage values from native code
      
      * fixed grumbles
      
      * fixed grumbles
      
      * missing comma
      95e017dd
  11. Sep 17, 2018
    • Gav Wood's avatar
      Generalised Transaction Queue API (#741) · cadd0558
      Gav Wood authored
      * First effort
      
      * API versioning
      
      * Introduce validate_transaction
      
      * Introduce the API plus fixes.
      
      * Docs
      
      * Typo
      
      * Add longevity parameter to transaction validity info.
      cadd0558
    • Bastian Köcher's avatar
      Implement `construct_runtime!` macro (#751) · 8b7e5526
      Bastian Köcher authored
      * Make `system` module renamable in `impl_outer_event!`
      
      * Implement `construct_runtime!` macro
      
      This macro generates code for calling all the common `impl_outer_*` macros.
      
      * Add documentation
      
      * Fixes wrong declaration of `contract`
      
      * Update dependencies to work on `no_std`
      
      * One more `Cargo.lock` update
      
      * Address comments
      8b7e5526
  12. Sep 12, 2018
    • Bastian Köcher's avatar
    • Gav Wood's avatar
      Phase 1 of repo reorg (#719) · bc276f3c
      Gav Wood authored and Arkadiy Paronyan's avatar Arkadiy Paronyan committed
      * Remove unneeded script
      
      * Rename Substrate Demo -> Substrate
      
      * Rename demo -> node
      
      * Build wasm from last rename.
      
      * Merge ed25519 into substrate-primitives
      
      * Minor tweak
      
      * Rename substrate -> core
      
      * Move substrate-runtime-support to core/runtime/support
      
      * Rename/move substrate-runtime-version
      
      * Move codec up a level
      
      * Rename substrate-codec -> parity-codec
      
      * Move environmental up a level
      
      * Move pwasm-* up to top, ready for removal
      
      * Remove requirement of s-r-support from s-r-primitives
      
      * Move core/runtime/primitives into core/runtime-primitives
      
      * Remove s-r-support dep from s-r-version
      
      * Remove dep of s-r-support from bft
      
      * Remove dep of s-r-support from node/consensus
      
      * Sever all other core deps from s-r-support
      
      * Forgot the no_std directive
      
      * Rename non-SRML modules to sr-* to avoid match clashes
      
      * Move runtime/* to srml/*
      
      * Rename substrate-runtime-* -> srml-*
      
      * Move srml to top-level
      bc276f3c
  13. Sep 11, 2018
  14. Sep 10, 2018
    • Gav Wood's avatar
      Council events (#703) · ded17fa5
      Gav Wood authored
      * Initial bits
      
      * More stuff
      
      * Cleave voting from council
      
      * More events
      
      * Rearrange council a little
      
      * Fix demo
      
      * More info in events
      ded17fa5
    • Sergey Pepyakin's avatar
      Integrate contracts into substrate-demo runtime (#675) · 265f238b
      Sergey Pepyakin authored
      * Introduce data and salt into ContractAddressFor
      
      * Accept salt arg in ext_create.
      
      * Integrate contracts into the demo runtime
      
      * Make libcontract compile to wasm
      
      * Remove salt parameter.
      
      This now is concern of userspace.
      
      * Rebuild binaries.
      265f238b
    • Svyatoslav Nikolsky's avatar
      DigestItem trait (v3) (#687) · 93cfc986
      Svyatoslav Nikolsky authored
      * DigestItem v4
      
      * tests
      
      * wording
      93cfc986
    • Bastian Köcher's avatar
      Implements `json_metadata` RPC call (#692) · 11ee362e
      Bastian Köcher authored
      * Adds `impl_json_metadata!` for generating all metadata of a runtime
      
      * Adds `json_metadata` RPC call
      
      * Adds simple test for the `json_metadata` RPC call
      
      * Implements json metadata in the demo runtime
      
      * Fix indent
      
      * Adds missing copyright headers
      
      * Dispatch json metadata renamings and improvements
      
      * Replaces `format!` & `String` with `Vec<JSONMetadata`
      
      * Implements `Encode` and `Decode` for JSONMetadata
      
      * Make `impl_json_metadata!` compileable on `no_std`
      
      * Adapt the client to decode the correct type for `json_metadata`
      
      * Fixes compile error and warning
      
      * Whitespace
      11ee362e
    • Arkadiy Paronyan's avatar
      Bring substrate-demo up to date (#658) · 68137aea
      Arkadiy Paronyan authored
      * Updating substrate-demo
      
      * Consenus fixes
      
      * Reverted toolchain change
      
      * Adjusted timeout formula
      
      * Simplfied proposal creation
      
      * Fixed tests
      
      * Fixed a few small issues
      
      * 2017->2018
      
      * Style
      
      * More style
      
      * Renamed demo executable to substrate
      
      * Style
      
      * Fixed compilation after merge
      
      * Style
      68137aea
    • Gav Wood's avatar
      Council motions for approving treasury proposals (#694) · d3070191
      Gav Wood authored
      * Treasury in runtime, generic approve/reject
      
      * Add logic for council origin
      
      * Add tests.
      
      * Configurable number of members in EnsureMembers
      
      * Fix grumbles
      
      * Fix spelling
      
      * Comment
      d3070191
    • Gav Wood's avatar
      Democracy module events (#697) · ed29fc6f
      Gav Wood authored
      * Democracy module events
      
      * Fix demo runtime
      
      * Fix
      
      * Extra event in balances
      
      * Missing event
      
      * Fix test
      
      * Fix council
      
      * Fix test
      ed29fc6f
  15. Sep 07, 2018
    • Gav Wood's avatar
      New extrinsic dispatch model (#678) · da05763e
      Gav Wood authored
      * System and Balances switched to new call model
      
      * Fixed up executive for new pardigm
      
      * Consensus works with Origin
      
      * Timestamp ported over
      
      * Session now compatible
      
      * Ported staking
      
      * Treasury compatible
      
      * Expunge MaybeEmpty
      
      * Make democracy work
      
      * Council compatible
      
      * Remove some aux-dispatch stuff and fix balances
      
      * Rename aux -> origin, fix contracts
      
      * Fix test
      
      * Fix example
      
      * Update macro to remove superfluous cruft
      
      * Make work with new macro
      
      * Tests
      
      * Fix some tests
      
      * Tests
      
      * Fix grumbles
      
      * Final grumble
      da05763e
  16. Sep 05, 2018
  17. Sep 04, 2018
    • Gav Wood's avatar
      Introduce treasury and document (#646) · 2b41b778
      Gav Wood authored
      * Introduce treasury and document
      
      * Revert bad changes
      
      * More reversions
      
      * Add example crate
      
      - Remove HasPublicAux
      - Rename Concrete -> Runtime
      
      * Actually commit stuff
      
      * Changes
      
      * Propagate block number in finalise.
      
      * Fix and build example
      
      * Fixes.
      
      * Fix compilation for treasury.
      
      * Fix the treasury test
      
      * Tests
      
      * Fix.
      
      * Fix tests
      
      * Fix a few grumbles
      
      * Fixes
      
      * Fix grumbles
      2b41b778
  18. Aug 30, 2018
    • Gav Wood's avatar
      Separate out staking module into balances and payment (#629) · 7c10a6c9
      Gav Wood authored
      * 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
      7c10a6c9
  19. Aug 28, 2018
    • Gav Wood's avatar
      Introduce Runtime Events (#607) · 221b7e17
      Gav Wood authored
      * 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
      221b7e17
  20. Aug 27, 2018
    • Gav Wood's avatar
      New slashing logic (#570) · 6b0d3453
      Gav Wood authored
      * 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.
      6b0d3453
  21. Aug 11, 2018
    • asynchronous rob's avatar
      Vote out offline authorities (#524) · 25f0c077
      asynchronous rob authored
      * 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
      25f0c077
  22. Jul 29, 2018
    • Sergey Pepyakin's avatar
      Make contract a separate runtime module (#345) · 9d7a3c1d
      Sergey Pepyakin authored
      * decl_module and extract runtime mod
      
      * Invert dependency staking←→contract
      
      * Remove CodeOf
      
      * Remove StorageOf and move double_map
      
      * Comment staking test
      
      * Clean
      
      * Add gas_price and gas_limit
      
      * Commit.
      
      * Renames
      
      * Params
      
      * WIP
      
      * Rename transfer to call
      
      * WIP
      
      * Rebuild binaries.
      
      * WIP
      
      * Backport ctro changes
      
      * Call wiring
      
      * Commit overlay.
      
      * Rename merge → commit, into_state → ..._change_set
      
      * WIP
      
      * Contract creation routines
      
      * Set code of the created account.
      
      * Fix the ID of `create` Call
      
      * Fix most of the warning.
      
      * Add the simplest test in the contract crate
      
      * Transfers work!
      
      * Add contract_create test.
      
      * Clean
      
      * Add top-level create test
      
      * Clean a bit.
      
      * Pass gas_limit and data via create.
      
      * Introduce OnAccountKill callback in staking
      
      * Hook up OnAccountKill
      
      * Comments
      
      * Pay for gas.
      
      * Refund unused gas in call
      
      * Tests for zero call and zero endownment.
      
      * Add todo about rewriting docs
      
      * Pay for gas in create transactions
      
      * Fix refunds
      
      * Clean unrelevant comments
      
      * fixup! Fix refunds
      
      * fixup! Clean unrelevant comments
      
      * Move DetermineContractAddress to contract
      
      Also restore account removal test
      
      * fixup! Clean unrelevant comments
      
      * Inline effect_transfer, remove effect_create
      
      Remove account_db!
      
      * Use own new_test_ext.
      
      * Don't account for liability
      
      * Add some docs
      
      * Move contract_fee into contract module
      
      * Take GasMeter in vm::execute
      
      * Use GasMeter throughout contract module for meter
      
      * gas module refactoring
      
      * Clean
      
      * Add base call fee
      
      * note about gas price should be taken from storage
      
      * Add base fee for create
      
      * Rename send → call
      
      * Clean
      
      * Take fee expressed in dots in gas
      
      * Add Checked{Add,Sub,Mul,Div} to SimpleArithmetic
      
      * Make Gas generic
      
      * Store {call,create}_base_fee in storage
      
      * Clean
      
      * Rename buy_gas
      
      * Store gas_price in the storage
      
      * Remove unneeded comment.
      
      * Bail out if contract already has code.
      
      * Todos
      
      * Refund even if top-level contract fails.
      
      * Fix error msg
      
      * Fix caller issue
      
      * Extract tests module
      
      * Add max_depth var in storage
      
      * Remove left over gas_left
      
      * Refactor exec
      
      * Add test oog test.
      
      * set_free_balance_creating
      
      * Docs and comments.
      
      * Update storage roots because of ContractFee move
      
      * Rebuild binaries.
      
      * Simplify vm code.
      
      * Wrapping.
      
      * Refactor a bit.
      
      * Typo
      
      * UpdateBalanceOutcome enum
      
      * Style grumbles.
      
      * Rebuild binaries.
      
      * Always consume the given amount of gas.
      
      * [skip ci] endownment → endowment
      
      * Rename `AccountId` generic in on_account_kill
      
      * Fix Cargo.lock
      
      * Refine docs for gas meter.
      
      * [skip ci] Add comments for gas module
      
      * Directly assign to `return_data` at declaration
      
      * Use slices instead of vecs to pass the input data
      
      * Add todo about passing return data without copy
      
      * Use checked_add instead of add with overflow
      
      * Use return_data directly.
      
      * Rebuild binaries.
      
      * Rebuild binaries.
      9d7a3c1d
  23. Jul 05, 2018
  24. Jul 03, 2018
    • Arkadiy Paronyan's avatar
      Runtime version (#256) · 710ae51d
      Arkadiy Paronyan authored
      * Runtime version
      
      * Updated genesis.wasm
      
      * Minor fixes
      
      * Fresh runtime
      
      * Default version for pre Poc-2; Fixed authorship interface check
      
      * Fixed authoring check
      710ae51d
    • Arkadiy Paronyan's avatar
      Serialisable genesis config (#229) · 106c1126
      Arkadiy Paronyan authored
      * Genesis serialization
      
      * Custom type for AuthorityId
      
      * Merge w master
      
      * Fixed a few minor issues
      
      * Fixed unmerged file
      
      * Renamed tag
      
      * Deferred genesis loading
      
      * Upated wasm runtime
      
      * Minor issues
      106c1126
  25. Jun 28, 2018
    • Gav Wood's avatar
      Rewards and slashing, early-exit of bad sessions (#234) · 7b1dca22
      Gav Wood authored
      * Recompile runtime.
      
      * Introduce and enforce block time
      
      * Introduce early session ending.
      
      * Report most of staking module
      
      * rewards, proper early exit and slashing
      
      * Fix build & session logic, introduce tests
      
      * Fixed staking tests.
      
      * Initial test for reward
      
      * Fix test
      
      * Tests for slashing
      
      * Update/fix preset configs
      
      * Fix some tests.
      
      * Fix some staking tests
      
      * Minor fix
      
      * minor cleanups
      
      * Fix build
      
      * Rename timestamp::Value -> Moment
      
      * Require final block of session to be timely
      7b1dca22
  26. Jun 26, 2018
    • Tomasz Drwięga's avatar
      Handle AccountIndices in transaction pool (#225) · bbd15c49
      Tomasz Drwięga authored
      * Merge remote-tracking branch 'origin/master' into gav-xts-dont-panic
      
      * Update wasm.
      
      * consensus, session and staking all panic-safe.
      
      * Democracy doesn't panic in apply.
      
      * Fix tests.
      
      * Extra helper macro, council depanicked.
      
      * Fix one test.
      
      * Fix up all council tests. No panics!
      
      * Council voting depanicked.
      
      * Dispatch returns result.
      
      * session & staking tests updated
      
      * Fix democracy tests.
      
      * Fix council tests.
      
      * Fix up polkadot parachains in runtime
      
      * Fix borked merge
      
      * More Slicable support
      
      Support general `Option` and array types.
      
      * Basic storage types.
      
      * Existential deposit for contract creation
      
      * Basic implemnetation along with removals
      
      * Fix tests.
      
      * externalities builder fix.
      
      * Tests.
      
      * Fix up the runtime.
      
      * Fix tests.
      
      * Add generic `Address` type.
      
      * Initial function integration of Address into Extrinsic.
      
      * Fix build
      
      * All tests compile.
      
      * Fix (some) tests.
      
      * Fix signing.
      
      * Push error.
      
      * transfer can accept Address
      
      * Make Address generic over AccountIndex
      
      * Fix test
      
      * Make Council use Address for dispatch.
      
      * Fix build
      
      * Bend over backwards to support braindead derive.
      
      * Repot some files.
      
      * Fix tests.
      
      * Fix grumbles
      
      * Remove Default bound
      
      * Fix build for new nightly.
      
      * Make `apply_extrinsic` never panic, return useful Result.
      
      * More merge hell
      
      * Doesn't build, but might do soon
      
      * Serde woes
      
      * get substrate-runtime-staking compiling
      
      * Polkadot builds again!
      
      * Fix all build.
      
      * Fix tests & binaries.
      
      * Reserve some extra initial byte values of address for future format changes
      
      * Make semantic of `ReservedBalance` clear.
      
      * Fix panic handler.
      
      * Integrate other balance transformations into the new model
      
      Fix up staking tests.
      
      * Fix runtime tests.
      
      * Fix panic build.
      
      * Tests for demonstrating interaction between balance types.
      
      * Repot some runtime code
      
      * Fix checkedblock in non-std builds
      
      * Get rid of `DoLookup` phantom.
      
      * Attempt to make transaction_pool work with lookups.
      
      * Remove vscode settings
      
      * New attempt at making transaction pool work.
      
      * It builds again!
      
      * --all builds
      
      * Fix tests.
      
      * New build.
      
      * Test account nonce reset.
      
      * polkadot transaction pool tests/framework.
      
      * Address grumbles.
      
      * Pool support non-verified transactions.
      
      * Revert bad `map_or`
      
      * Rebuild binaries, workaround.
      
      * Avoid casting to usize early.
      
      * Make verification use provided block_id.
      
      * Fix tests.
      
      * Alter tests to use retry.
      
      * Fix tests & add call to re-verify.
      
      * Semi-refactor.
      
      * Integrate new queue with the rest of the code.
      
      * Fix tests.
      
      * Add reverify_transaction method.
      
      * Use result.
      bbd15c49