Tomasz Drwięga
daa41ea5cc
Alter BEEFY primitives to prepare for potential BLS integration ( #10466 )
...
* Generalize signature.
* Fix tests.
* Introduce VersionedFinalityProof.
* cargo +nightly fmt --all
* Rework packing a tad.
2021-12-20 14:57:32 +01:00
Tomasz Drwięga
8fa5c7608a
Remove offchain workers ownership. ( #10506 )
2021-12-17 10:52:16 +00:00
Tomasz Drwięga
033fff0a38
Merge pull request #4427 from paritytech/update-bridges-subtree-r/w
...
Update bridges subtree r/w
2021-12-02 11:20:45 +01:00
Tomasz Drwięga
78e60cbc4f
Make authorship soft deadline configurable. ( #10125 )
...
* Make soft deadline configurable.
* cargo +nightly fmt --all
* Move setter where it belongs.
2021-11-18 20:12:08 +00:00
Tomasz Drwięga
9dfef89bab
Companion for #9834 (Transaction Priority) ( #3901 )
...
* Add new associated type.
* Update fee multiplier.
* Bump Substrate
2021-10-04 18:13:35 +00:00
Tomasz Drwięga
8ae18720e6
Introduce block authorship soft deadline ( #9663 )
...
* Soft limit.
* Add soft deadline tests.
* cargo +nightly fmt --all
* Fix sc-service test.
* Improving tests
2021-10-04 14:30:46 +00:00
374fb6a921
Rework Transaction Priority calculation ( #9834 )
...
* Add transaction validity docs.
* Re-work priority calculation.
* Fix tests.
* Update frame/transaction-payment/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* cargo +nightly fmt --all
* Fix an obvious mistake :)
* Re-work again.
* Fix test.
* cargo +nightly fmt --all
* Make VirtualTip dependent on the transaction size.
* cargo +nightly fmt --all
* Update frame/transaction-payment/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Fix compilation.
* Update bin/node/runtime/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-04 14:25:18 +00:00
Tomasz Drwięga
085935dd0a
Quickly skip invalid transactions during block authorship. ( #9789 )
...
* Support skipping invalid transactions in the iterator.
* Expose concrete iterator.
* cargo +nightly fmt --all
* More consistent placement.
* Update Cargo.lock
* Pass transaction to 'report_invalid'
2021-10-01 14:25:13 +00:00
Tomasz Drwięga
08c2d0d4c6
Emit log on Runtime Code change. ( #9580 )
...
* Emit digest item on Runtime Code changes.
* Add tests.
* cargo +nightly fmt --all
* Rename.
* Add comment.
* Move generic parameter to the trait.
* cargo +nightly fmt --all
* Elaborate in doc.
* Revert to RuntimeUpdated name
* cargo +nightly fmt --all
* Rename to RuntimeEnvironmentUpdated
2021-09-15 08:07:06 +00:00
Tomasz Drwięga and Bastian Köcher
d722c44248
Better RPC prometheus metrics. ( #9358 )
...
* Better RPC prometehus metrics.
* Add session metrics.
* Add counting requests as well.
* Fix type for web build.
* Fix browser-node
* Filter out unknown method names.
* Change Gauge to Counters
* Use micros instead of millis.
* cargo fmt
* Update client/rpc-servers/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* move log to separate lines.
* Fix compilation.
* cargo +nightly fmt --all
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-08-24 10:48:23 +00:00
Tomasz Drwięga
79174e0b7e
Update BEEFY+MMR integration. ( #3480 )
...
* Update MMR leaf.
* Revert to older substrate.
* Add version docs.
* Fix spellcheck.
2021-07-16 15:13:20 +02:00
f20edfa262
Transaction Pool docs ( #9056 )
...
* Add transaction pool docs.
* Extra docs.
* Apply suggestions from code review
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
* Expand on some review comments.
* Update README.md
Fixed typos / spellings
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Squirrel <gilescope@gmail.com >
2021-06-24 00:10:44 +02:00
Tomasz Drwięga
8be60821bb
Fix allocator waste assessment in docs ( #9167 )
...
* Fix allocator comment.
* Add explanations where this comes from.
* Clarify absolute values.
2021-06-22 13:20:29 +02:00
Tomasz Drwięga
4f9e25f15b
Merge pull request #2978 from paritytech/hc-bump-bridges-subtree-take-2
...
Bump Bridges Subtree
2021-05-05 16:21:32 +02:00
46095af452
subkey: display SS58 encoding of public key ( #8674 )
...
* Add SS58 public key encoding.
* [Companion] Update Cargo.toml subkey version, readme to reflect new output (#8694 )
* Update Cargo.toml
* update cargo, readme for subkey
Co-authored-by: Dan Shields <danwshields@gmail.com >
Co-authored-by: Dan Shields <35669742+NukeManDan@users.noreply.github.com >
Co-authored-by: Dan Shields <danwshields@gmail.com >
2021-04-29 15:23:03 +00:00
Tomasz Drwięga
bbb8652de0
Merge pull request #2917 from paritytech/hc-fix-bridges-subtree
...
Update Bridges Subtree
2021-04-23 20:40:56 +02:00
Tomasz Drwięga
f7ed5a2481
Off-chain indexing is independent from workers ( #8659 )
...
* Pff-chain indexing is independent from worker.
* Remove unauthorized changes.
* 🤦
2021-04-22 21:37:03 +00:00
5b77a89874
Merkle Mountain Range & BEEFY integration ( #2101 )
...
* Switch branch.
* Implement basic MMR leaf.
* Revert "Switch branch."
This reverts commit 7f4d41c67f27ca560c53fc63fd3bd06ac182403c.
* Bump substrate.
* Integrate BEEFY.
Bump all.
Fix missing imports.
* Use beefy pallet to get authorities.
* Bump BEEFY repo.
* Use next authority set instead of the current one.
* Start BEEFY service.
* Fix BEEFY start up.
* Cache BEEFY authority set.
* Add BEEFY ValidatorSetId to MMR
* Fix code.
* Apply suggestions from code review
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Review grumbles.
* Update beefy repo.
* Work-around missing protocol.
* Revert "Work-around missing protocol."
This reverts commit 0a6257a8bccc1c67e966898cdedc408c6469ffd6.
* Add beefy peers set config.
* Expose storage of BEEFY.
* Uncompress BEEFY keys for merkle tree.
* Update ordering.
* Switch to branch.
* Bump deps.
* Switch to custom beefy.
* Add MMR RuntimeApi and custom rpc.
* Add set length details.
* Fix compilation.
* Expose MmrLeaf storage.
* Expose MmrLeaf storage.
* Don't use session handler, and rather compute & cache beefy details on call.
* Don't use session handler, and rather compute & cache beefy details on call.
* Fixes.
* Update Cargo.lock.
* Switch back to master.
* Update lockfile.
* Fix xcm print issue.
* Cargo.lock.
* Use master branch.
* Remove extra dep.
* Fix tests.
* Update Cargo.lock
* Add BEEFY & MMR to westend.
* Implement session keys migration.
* Update testnet script.
* start BEEFY for all node types
* Update Cargo.lock
* fix Cargo.toml
* resolve another merge conflict
* add Westend BEEFY keys
* Apply suggestions from code review
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Update BEEFY.
* Add Rococo BEEFY keys
* resolve merge issue
* fix pallet indices
* fix Westend OldSessionKey
* remove unused imports in Westend runtime
* Fix compilation for Westend.
* address review
* start BEEFY gadget conditionally
* address review again
* fix typo
* remove duplicate
* remove another duplicate
* well
* add missing stuff
* cleanup Cargo.toml files
- revert unnecessary changes
- add missing /std dependencies
- remove unused dependencies
* runtime: remove unused structs from rococo runtime
* node: cleanup service
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: adoerr <0xad@gmx.net >
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2021-04-01 12:50:04 +02:00
Tomasz Drwięga
639dcc2e75
Companion for #8137 (MMR Custom RPC) ( #2463 )
...
* Switch branch
* Fix compilation.
* Revert "Switch branch"
This reverts commit a3bd3621772ae98618c46102d03501856b7950ba.
* Update Cargo.lock.
* Add telemetry span back.
* Fix telemetry_span issues.
* Update substrate.
2021-03-10 16:20:30 +00:00
Tomasz Drwięga
f3d4355a20
Custom RPC for Merkle Mountain Range pallet ( #8137 )
...
* Add MMR custom RPC.
* Change RuntimeApi to avoid hardcoding leaf type.
* Properly implement the new RuntimeAPI and wire up RPC.
* Extract Offchain DB as separate execution extension.
* Enable offchain DB access for offchain calls.
* Fix offchain_election tests.
* Skip block initialisation for proof generation.
* Fix integration test setup.
* Fix offchain tests. Not sure how I missed them earlier 🤷 .
* Fix long line.
* One more test missing.
* Update mock for multi-phase.
* Address review grumbbles.
* Address review grumbles.
* Fix line width of a comment
2021-03-10 15:28:56 +00:00
Tomasz Drwięga
5169155f94
Adding Bridges code as git subtree. ( #2515 )
...
* Add instructions.
* Squashed 'bridges/' content from commit 345e84a21
git-subtree-dir: bridges
git-subtree-split: 345e84a2146b56628e9888c9f5e129cb40e868a9
* Remove bridges workspace file to avoid confusing Cargo.
* Add some bridges primitives to Polkadot workspace.
* Improve docs.
2021-03-01 22:33:16 +01:00
Tomasz Drwięga
3309c4366b
Display nicer inspect results. ( #8198 )
2021-02-24 20:00:00 +01:00
Tomasz Drwięga and Hernando Castano
6c2dd28dfb
Merkle Mountain Range pallet improvements ( #7891 )
...
* Add stateless verification helper function.
* Split MMR primitives.
* Add RuntimeAPI
* RuntimeAPI with OpaqueLeaves
* Bump spec_version,.
* Move primitives back to frame.
* Fix OpaqueLeaf encoding.
* Add block number to frame_system implementation of LeafDataProvider.
* Relax leaf codec requirements and fix OpaqueLeaf
* Add root to debug line.
* Apply suggestions from code review
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
* Typo.
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
2021-01-28 10:58:52 +00:00
Tomasz Drwięga
aa2191642f
Avoid too high values. ( #7716 )
2020-12-14 12:34:41 +00:00
Tomasz Drwięga
abe119abba
Add keccak-512 to host functions. ( #7531 )
2020-12-11 16:41:18 +01:00
02f66e8823
Merkle Mountain Range pallet ( #7312 )
...
* Add MMR pallet.
* WiP
* Working on testing.
* WiP - test
* Tests passing.
* Add proof generation.
* Generate and verify proofs.
* Allow verification of older proofs.
* Move stuff to a module.
* Split MMR stuff to it's own module.
* Add docs.
* Make parent hash optional.
* LeafData failed approach.
* Finally implement Compact stuff.
* Compact encoding WiP
* Implement remaining pieces.
* Fix tests
* Add docs to compact.
* Implement for tuples.
* Fix documentation.
* Fix warnings and address review suggestion.
* Update frame/merkle-mountain-range/src/primitives.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* Address review grumbles.
* Removing missing crate.
* Fix test.
* Add some docs and test.
* Add multiple instances.
* Cargo.toml sync.
* Fix no_std compilation.
* More no_std stuff.
* Rename MMR struct.
* Addressing other grumbles.
* Fix test.
* Remove format for no_std compat.
* Add test for MMR pallet.
* Fix std feature.
* Update versions.
* Add to node/runtime.
* Add hook to insert digest.
* Make primitives public.
* Update lib.rs
tech spec/typos etc
* Use WeightInfo and benchmarks.
* Fix test.
* Fix benchmarks.
* Trait -> Config.
* Fix typo.
* Fix tests.
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Addie Wagenknecht <addie@nortd.com >
2020-12-09 16:35:13 +01:00
Tomasz Drwięga
f28333aedb
Companion for #6629 (weight params refactor) ( #1420 )
...
* Change branch.
* Update runtime.
* Revert "Change branch."
This reverts commit 841c59f3398136c27cc235a29d7d459e8a4c8ce0.
* Update substrate.
* Fix tests.
* Fix compilation.
* Fix frame system imports.
* Fix usages of system
* Fix stuff.
* Fix compilation.
* Fixes.
* Fix block_weight usage.
* Bump substrate.
2020-12-08 12:55:57 +00:00
39a776cd00
Streamline frame_system weight parametrization ( #6629 )
...
* Basic weights builder.
* Fixing WiP
* Make the tests work.
* Fix weights in node/runtime.
* WiP.
* Update pallets with new weights parameters.
* Validate returns a Result now.
* Count mandatory weight separately.
* DRY
* BREAKING: Updating state root, because of the left-over weight-tracking stuff
* Update tests affected by Mandatory tracking.
* Fixing tests.
* Fix defaults for simple_max
* Update frame/system/src/weights.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Rework the API a bit.
* Fix compilation & tests.
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Add extra docs & rename few things.
* Fix whitespace in ASCII art.
* Update frame/system/src/limits.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Fix max_extrinsic calculations.
* Fix conflicts.
* Fix compilation.
* Fix new code.
* re-remove generic asset
* Fix usage.
* Update state root.
* Update proxy.
* Fix tests.
* Move weights validity to integrity_test
* Remove redundant BlockWeights.
* Add all/non_mandatory comment
* Add test.
* Remove fn block_weights
* Make the macro prettier.
* Fix some docs.
* Make max_total behave more predictabily.
* Add BlockWeights to metadata.
* fix balances test
* Fix utility test.
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org >
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2020-12-08 13:18:34 +01:00
Tomasz Drwięga
6079fabdd3
Remove a stray file. ( #7649 )
2020-12-01 13:40:53 -05:00
Tomasz Drwięga
0e9e2ed5a8
Add extra docs to on_initialize ( #7552 )
...
* Add some extra on_initialize docs.
* Address review comments.
2020-11-18 21:10:00 +01:00
Tomasz Drwięga
2ffad62529
Make sure to use the optimized method instead of reading the storage. ( #7445 )
2020-10-28 13:48:15 +01:00
Tomasz Drwięga
330ea853e1
Remove /self from mandatory rpc reviews. ( #6507 )
2020-06-25 13:03:29 +00:00
Tomasz Drwięga
3d692491a8
CheckEra -> CheckMortality ( #1306 )
...
* CheckEra -> CheckMortality
* Update substrate.
2020-06-24 17:25:02 +02:00
Tomasz Drwięga and Bastian Köcher
fb56eacd8d
Extract frame_system SignedExtensions into separate files. ( #6474 )
...
* Split the code.
* Restructure.
* Split tests.
* Self-review.
* Break lines.
* Move tests out.
* Rename CheckEra -> CheckMortality but keep backwards compatibility
* Update frame/system/src/extensions/check_mortality.rs
* Don't rename the IDENTIFIER for now.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-06-24 17:01:42 +02:00
Tomasz Drwięga
642a8a89ff
Fix issues with Operational transactions validity and prioritization. ( #6435 )
...
* Fix weight limit for operational transactions.
* Include BlockExecutionWeight.
2020-06-21 12:39:15 +02:00
Tomasz Drwięga and Bastian Köcher
44c0ec5cf8
Use Substrate Block Proposer ( #1156 )
...
* Use Substrate block builder.
* Clean up metrics.
* Lock.
* Lock.
* Switch to newest basic authorship interface
* Update Substrate reference and polkadot spec_version
* Let's improve
Co-authored-by: Bastian Köcher <git@kchr.de >
2020-05-30 11:06:08 +02:00
Tomasz Drwięga
e08e5ff462
Companion for #6067 ( #1110 )
...
* Companion to #6067
* Fix tests?
* Use AvailableBlockLimit instead of hardcoding the value.
* Bump substrate.
2020-05-20 16:03:28 +02:00
Tomasz Drwięga
f74a7171be
Maximum extrinsic weight limit ( #6067 )
...
* Only check single extrinsics weight limit in validate_transaction.
* Add missing parameter to all pallets.
* Add tests, fix default configuration.
* Bump spec version.
* Use AvailableBlockRation to calculate MaxExtrinsicWeight
2020-05-20 15:05:16 +02:00
Tomasz Drwięga and Shawn Tabrizi
66c02fe651
Benchmarks for offences pallet. ( #5851 )
...
* really rough mock runtime
* start to work on offences
* Make sure to start the session.
* Update to latest master.
* Add verify.
* Fix on_initialize benchmark.
* Add grandpa offence.
* Add Babe offence benchmarking.
* Enable babe test.
* Address review grumbles.
* Address review grumbles.
* Address review grumbles part 1/2
* use currency trait
* features
* Check events explicitly.
* Auto-impl tuple converter.
* Removed dead code.
* add test feature flag
* dont use std
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-05-06 14:27:47 +02:00
Tomasz Drwięga
7703130e6e
Fix unsigned priority of im-online @ kusama. ( #1068 )
2020-05-05 17:41:02 +02:00
Tomasz Drwięga
ef1c2d0615
Compute weight only once. ( #5780 )
2020-04-25 12:01:21 +00:00
Tomasz Drwięga and NikVolf
bc0b8fbddf
Add performance tracing to validate_transaction ( #5671 )
...
* Validate transaction timeouts
* Add timing
* Add tracing to transaction validation.
* Fix docs.
Co-authored-by: NikVolf <nikvolf@gmail.com >
2020-04-17 08:42:50 +02:00
Tomasz Drwięga
762bcbab03
Unsigned Validation best practices ( #5563 )
...
* Configurable Unsigned Priority.
* Use the new builder.
* Fix tests.
* Fix benches.
* Remove unused import.
* Rename for_pallet
2020-04-08 11:17:21 +02:00
Tomasz Drwięga
8bdf5da0b0
Remove myself. ( #5544 )
2020-04-06 19:57:19 +02:00
Tomasz Drwięga
c8150e1d33
Transaction source ( #5366 ) companion PR ( #938 )
...
* Add transaction source.
* Bump substrate.
* Fix tests.
2020-03-26 10:38:01 +01:00
04ccb179e9
Pass transaction source to validate_transaction ( #5366 )
...
* WiP
* Support source in the runtime API.
* Finish implementation in txpool.
* Fix warning.
* Fix tests.
* Apply suggestions from code review
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Extra changes.
* Fix test and benches.
* fix test
* Fix test & benches again.
* Fix tests.
* Update bumpalo
* Fix doc test.
* Fix doctest.
* Fix doctest.
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-03-25 14:09:23 +01:00
Tomasz Drwięga and Shawn Tabrizi
e8871e0327
Un-deprecate ValidateUnsigned ( #5003 )
...
* Un-deprecate ValidateUnsigned.
* Bump runtime.
* Bump runtime.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-02-21 10:42:55 +01:00
9a0b8b5be5
Offchain Workers: Example Pallet ( #4989 )
...
* Example of offchain worker pallet.
* Fix compilation issues.
* Use serde_json to parse JSON.
* Add some basic tests.
* Working on docs.
* Fix compilation
* Finish docs for signed.
* Work on unsigned send.
* Add some tests and missing docs.
* Add example of StorageValueRef
* Add weight.
* Extra \n
* Fix im-online test.
* Bump runtime.
* Fix tests.
* Apply suggestions from code review
Co-Authored-By: Joshy Orndorff <JoshOrndorff@users.noreply.github.com >
Co-Authored-By: Gavin Wood <gavin@parity.io >
* Address review comments.
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com >
Co-authored-by: Gavin Wood <github@gavwood.com >
2020-02-20 15:21:34 +01:00
Tomasz Drwięga
a14d28150d
Inspection extension to node CLI ( #4697 )
...
* Initial inspect.
* WiP
* Add parsing tests.
* Finalize CLI.
* Update to latest substrate.
* Remove unused imports.
* Support ImportParams as well, to get the right pruning setting.
* Mention in docs that hash is no 0x.
* Move bytes above extrinsics.
* Switch to fill helper from sc_cli.
* Remove overwrite.
* Fix error.
* Fix error message.
* Remove extra allow.
* init_config
2020-02-18 17:56:52 +01:00
Tomasz Drwięga
4053201046
Remove rename for finalized event and add some docs. ( #4930 )
...
* Remove rename for finalized event.
* ADd some docs.
* Document timeout.
2020-02-15 10:41:42 +01:00
Tomasz Drwięga and Nikolay Volf
05b3e1f654
Run offchain workers at hash, not number. ( #4878 )
...
* Run offchain workers at particular hash, not number.
* Don't run if not new best.
* Don't run if not new best.
* Update client/service/src/builder.rs
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Update client/service/src/builder.rs
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Update client/service/src/builder.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-02-11 00:41:59 +01:00
Tomasz Drwięga and Gavin Wood
2f9315cc02
Refactor im-online and print more debug info. ( #4771 )
...
* Initial version.
* Fix tests.
* Refactor using StorageValueRef.
* Add tests and apply review suggestions.
* Bump runtime.
Co-authored-by: Gavin Wood <github@gavwood.com >
2020-01-31 18:59:49 +00:00
Tomasz Drwięga
fd03f4e950
Fix warnings. ( #4768 )
2020-01-29 21:37:26 +01:00
Tomasz Drwięga
e7df428274
Display has_api_with results if invalid version of Offchain Workers is detected. ( #4749 )
...
* Display error message when checking has_api.
* Cargo.lock.
2020-01-28 22:34:41 +01:00
Tomasz Drwięga and Bastian Köcher
e58dc6a293
Make sure destroy_state is called in case of errors. ( #4745 )
...
* Make sure to destroy state in case of error.
* Update client/src/call_executor.rs
* Update client/src/call_executor.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-28 16:18:09 +01:00
Tomasz Drwięga
437772be9e
Rename basic-authority to basic-authorship ( #4640 )
...
* Rename basic-authority to basic-authorship
* Revert weird tab.
* Fix rename.
2020-01-16 13:57:41 +01:00
Tomasz Drwięga
e58fafc3ef
Make offchain worker calls more future proof. ( #4618 )
...
* Add warning if offchain workers version is not supported.
* Support only v2.
* Make it a warning.
2020-01-14 22:35:35 +01:00
74d6e660c6
Add documentation to SubmitSignedTransaction and actually make it work ( #4200 )
...
* Add documentation to signed transactions and actually make them work.
* Fix naming and bounds.
* Forgotten import.
* Remove warning.
* Make accounts optional, fix logic.
* Split the method to avoid confusing type error message.
* Move executor tests to integration.
* Add submit transactions tests.
* Make `submit_transaction` tests compile
* Remove a file that was accidently committed
* Add can_sign helper function.
* Fix compilation.
* Add a key to keystore.
* Fix the tests.
* Remove env_logger.
* Fix sending multiple transactions.
* Remove commented code.
* Bring back criterion.
* Remove stray debug log.
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Make sure to initialize block correctly.
* Initialize block for offchain workers.
* Add test for transaction validity.
* Fix tests.
* Review suggestions.
* Remove redundant comment.
* Make sure to use correct block number of authoring.
* Change the runtime API.
* Support both versions.
* Bump spec version, fix RPC test.
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com >
Co-authored-by: Gavin Wood <github@gavwood.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-10 01:46:55 +01:00
Tomasz Drwięga
5986869390
Fix period of offchain transactions. ( #4521 )
...
* Fix period of offchain transactions.
* Calculate period dynamically.
* Convert to u64.
2020-01-03 20:39:46 +00:00
Tomasz Drwięga and Bastian Köcher
b214b3f3e9
Fix replace_previous of Ready Transaction Queue. ( #4488 )
...
* Fix transaction replacements.
* Test.
* Fix typo.
* Update client/transaction-pool/graph/src/ready.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2019-12-24 11:13:29 +01:00
Tomasz Drwięga
14a08d430c
Add Clone bound to the Origin. ( #4472 )
2019-12-20 18:43:04 +01:00
Tomasz Drwięga and Bastian Köcher
216f77d91f
Document TransactionStatus and fix termination conditions. ( #4446 )
...
* Document TransactionStatus and fix termination conditions.
* Update client/rpc-api/src/author/mod.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
2019-12-18 21:28:25 +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
Tomasz Drwięga
1f84d6d41d
Fix warnings when compiling runtime. ( #4332 )
...
* Remove warnings when compiling runtime.
* Remove dispatch::Result imports.
* Add missing imports.
* Fix missing vecs. #4333
* Fix oom function.
* Remove superfluous import.
* More warnings.
2019-12-10 14:21:34 +01:00
Tomasz Drwięga
638e32fa8f
Remove depenendcy on sc-consensus-slots ( #4321 )
2019-12-09 23:37:33 +01:00
Tomasz Drwięga
3805393a13
Merge txpool-runtime-api with txpool-api ( #4320 )
...
* Remove transaction-pool-runtime-api
* Merge runtime-api with transaction-pool.
2019-12-06 17:24:17 +01:00
Tomasz Drwięga
145086722d
Fix Contracts rpc output format. ( #4304 )
2019-12-05 21:04:19 +01:00
Tomasz Drwięga
7714bfca8e
Tone down warnings when resubmitting to the pool. ( #4294 )
...
* Tone down warnings.
* Fix the fix.
* Add some debug info.
* More logs.
* Update logging.
2019-12-05 13:02:21 +01:00
Tomasz Drwięga
c42cdf185c
Use balance capped to u64 for transaction payment RPC. ( #4290 )
...
* Use balance capped to u64
* Add debug.
2019-12-05 13:01:40 +01:00
Tomasz Drwięga
1628ba3388
Revalidate some transactions on every block import. ( #4292 )
...
* Revalidate some transactions on every block import.
* Fix endless loop in revalidate_ready.
* Clean up logging a bit.
* More clean ups.
* Print status after resubmitting.
* Remove env_logger.
* Remove redundant log.
2019-12-04 19:16:00 +01:00
Tomasz Drwięga
3b21f7fdc3
Rename OffchainWorker internal method. ( #4267 )
...
* Rename generate_extrinsics to offchain_worker
* Some doc improvements.
2019-12-03 18:03:27 +01:00
Tomasz Drwięga
a401acc690
Add some logs, fix reorg import. ( #4250 )
2019-12-01 10:14:01 +01:00
Tomasz Drwięga and Pierre Krieger
f78b83e363
Handle Grafana server bind errors gracefuly. ( #4241 )
...
* Fix error handling for grafana sever start.
* Update client/grafana-data-source/src/server.rs
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com >
2019-11-28 11:16:54 +00:00
Tomasz Drwięga
77d0c065d3
Hard-cap the execution time of custom contract calls. ( #4226 )
...
* Reject call requests that allocate too high gas limit.
* Lower to 5x
2019-11-27 18:23:55 +00:00
Tomasz Drwięga
cfb590ac4b
Allow batch query for block hash. ( #4210 )
2019-11-26 18:07:31 +01:00
Tomasz Drwięga
309c6c70d8
Remove keystore when doing calls and producing a proof ( #4196 )
...
* Remove keystore parameter.
* Fix tests.
2019-11-25 19:55:21 +01:00
Tomasz Drwięga
86b6ac5571
Offchain execution extensions ( #4145 )
...
* Pass Extensions instead of individual objects.
* Move TransactionPool to a separate ExternalitiesExtension.
* Fix compilation.?
* Clean up.
* Refactor testing utilities.
* Add docs, fix tests.
* Fix doctest.
* Fix formatting and add some logs.
* Add some docs.
* Remove unused files.
2019-11-22 17:10:23 +01:00
Tomasz Drwięga
872c04b304
Revert "Fix serialization of transaction_paymentInfo" ( #4166 )
...
* Revert "Fix serialization of `transaction_paymentInfo` (#4146 )"
This reverts commit 613b5e7e2d .
* Revert chain-spec too.
* Bring back camelCase and test.
2019-11-21 16:08:54 +01:00
Tomasz Drwięga
309f694f4f
Move the bounds from where to trait definition. ( #4044 )
2019-11-20 09:49:16 +01:00
Tomasz Drwięga
613b5e7e2d
Fix serialization of transaction_paymentInfo ( #4146 )
...
* Add serialization test for u128
* Fix crash on serde of u128
2019-11-19 18:42:35 +01:00
Tomasz Drwięga
57ab3aeb82
Typed chain state queries over rpc. ( #4079 )
...
* Create typed client helpers for querying chain state storage items declared by
'decl_storage!'.
* Update substrate-rpc-custom functions to use async await syntax.
* The implementation of substrate-rpc-custom was a bit verbose and repetitive.
This commit makes the implementation simpler by intruducing a struct which
represents query for a typed value in storage. The new struct is called
StorageQuery. A StorageQuery wraps a raw StorageKey but is not directy
constructable. To construct a StorageQuery, the user must supply an
implementation of a srml_support::storage::generator trait such as
StorageValue or StorageMap.
A type implementing one of the generator traits can be aquired by:
A) marking a storage item as pub within a call to decl_storage (recommended)
or B) implementing one of the generator types manually.
While option B may sometimes me necessary, it's not recommended because
separate manual implementaions may lose sync with the original definition.
* drop unused dependency
* fmt
* Remove unnecessary pub from Authorities field in test-runtime storage
declaration.
This field was added to support a test in an earlier commit. The
test no longer relies on test-runtime so the change can be reverted.
* Move it to srml as support extension.
* Fix long lines.
* Fix.
2019-11-11 02:01:15 +01:00
Tomasz Drwięga
f5f4c2d480
Change max width to 100. ( #4072 )
2019-11-10 13:01:44 +01:00
Tomasz Drwięga
b5469c6e0c
Additional logging for the transaction pool. ( #4068 )
...
* Additional logging for the pool.
* Long line.
2019-11-09 13:22:21 +01:00
Tomasz Drwięga
c3f6e5bd40
Introduce thread pool for transaction validation. ( #4051 )
2019-11-08 21:34:30 +01:00
Tomasz Drwięga
dcee91412c
Check polkadot compilation. ( #3980 )
...
* Check polkadot compilation.
* Fix git grep.
* Make sure to update properly. Use commit hash instead.
2019-11-07 12:05:22 +01:00
Tomasz Drwięga
279391f9c1
Limit longevity of im-online heartbeats. ( #4011 )
...
* Limit longevity of im-online heartbeats.
* Unused import.
* Use parameter for session duration.
2019-11-05 12:16:46 +01:00
Tomasz Drwięga
69c4e2f7f0
Deprecate ValidateUnsigned and prevent duplicate heartbeats ( #3975 )
...
* Add pre-dispatch checks for ValidateUnsigned
* Deprecate ValidateUnsigned.
* Bump specversion.
* Fix test.
2019-11-03 10:52:08 +00:00
Tomasz Drwięga
45e79d617b
Avoid sending heartbeat if we are already considered online. ( #3981 )
...
* Don't send a heartbeat if already online.
* Remove env_logger.
* Update lock.
* Bump runtime.
* Merge master
2019-11-03 10:51:33 +00:00
Tomasz Drwięga
a73334f769
Increase priority of ImOnline heartbeats ( #3972 )
...
* Make sure im-online reports are high priority.
* Bump runtime.
2019-10-30 16:19:31 -07:00
Tomasz Drwięga
06433c9889
Fix a import+prune+replace case for multi-provides transactions. ( #3939 )
...
* Fix a import+prune+replace case for multi-provides transactions.
* Fix tests.
2019-10-28 16:06:20 +01:00
Tomasz Drwięga and Bastian Köcher
cecf3a1438
Bring back SubmitSignedTransaction trait. ( #3908 )
...
* Bring back SubmitSignedTransaction.
* Fix long lines.
* Add missing docs.
* Update core/primitives/src/crypto.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update node/runtime/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update core/primitives/src/crypto.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
2019-10-25 12:24:58 +02:00
Tomasz Drwięga and Bastian Köcher
8dc443dc5b
Support account_nextIndex RPC. ( #460 )
...
* Use node-rpc extensions to support account_nextIndex.
* Remove todo.
* Update lock.
* Use new srml_system_rpc crate.
* Update to substrate=master
* Update lockfile.
* Update to polkadot-master.
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
2019-10-23 13:17:53 +02:00
Tomasz Drwięga
20a3989785
Runtime logging. ( #3821 )
...
* Implement Printable for tuples.
* Add debugging function.
* Add debug 1.
* Implement for everything.
* RuntimeDebug derive.
* Introduce RuntimeDebug.
* Add some dummy logging.
* Replace RuntimeDebug with Debug.
* Revert "Replace RuntimeDebug with Debug."
This reverts commit bc47070a8cb30241b2b590b2fa29fd195088162f.
* Working on Debug for all.
* Fix bounds.
* Add debug utils.
* Implement runtime logging.
* Add some docs and clean up.
* Clean up derives.
* Fix custom derive impl.
* Bump runtime.
* Fix long lines.
* Fix doc test.
* Use CARGO_CFG_STD.
* Revert "Use CARGO_CFG_STD."
This reverts commit ea429566de18ed0fa052571b359eb9826a64a9f4.
* Use parse_macro_input
* Update lockfile.
* Apply review suggestions.
* Remove stray re-export.
* Add no-std impl.
* Update lockfile.
2019-10-22 14:13:44 +02:00
Tomasz Drwięga
16a5d43807
Improve logging for offchain transaction submission. ( #3871 )
2019-10-22 10:29:44 +02:00
Tomasz Drwięga
1111d79ac1
Fix deserialization of Bytes ( #3866 )
...
* Update impl-serde to patch RPC.
* Add test.
* Fix long line.
2019-10-22 03:09:39 +02:00
Tomasz Drwięga and Bastian Köcher
dc92631180
Move srml RPC extensions to separate crates ( #3791 )
...
* Move srml-system RPC out.
* Fix tests for system-rpc module.
* Contracts RPC moved.
* Fix rpc test.
* Clean up.
* Update lockfile.
* Bump runtime version.
* Update srml/contracts/rpc/runtime-api/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Bump impl version.
2019-10-16 12:40:35 +02:00
Tomasz Drwięga
9fe8ee4197
Fix asynchronous transaction rejections. ( #3817 )
...
* Fix handling transaction pool errors.
* Add test.
* Review suggestions.
2019-10-15 11:16:10 +02:00
Tomasz Drwięga
90df6b3c6c
Move offchain worker http helpers to sr-primitives. ( #3733 )
...
* Move offchain helpers to sr-primitives.
* Add some docs and fix tests.
* Refresh cargo.lock
* Bump runtime.
* Don't run offchain http example.
2019-10-02 10:03:18 +02:00
Tomasz Drwięga
667ee95f5d
ChainSpec extensions ( #3692 )
...
* Add some chainspec tests and make sure we validate it.
* Manual implementation of Extension + Forks definitions.
* Move chain spec to separate crate.
* Allow using ChainSpec with extensions.
* Renames.
* Implement Extension derive.
* Implement Extension for Forks.
* Support specifying fork blocks.
* make for_blocks work
* Support forks correctly.
* Add a bunch of docs.
* Make fork blocks optional.
* Add missing docs.
* Fix build.
* Use struct for check_block params.
* Fix tests?
* Clean up.
2019-09-29 01:05:36 +08:00
Tomasz Drwięga and Bastian Köcher
668acca9ed
Force new era only if 1/3 validators is disabled. ( #3533 )
...
* Force new era only when over third validators is disabled.
* Update srml/session/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update srml/staking/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Parametrize the threshold.
* Bump runtime version.
* Update node/runtime/src/lib.rs
* Fix build.
* Fix im-online test.
2019-09-19 18:04:48 +08:00