Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polkadot v0.9.43 #295

Merged
merged 559 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
559 commits
Select commit Hold shift + click to select a range
49ba186
Swap 'base58' with 'bs58' (#13739)
davxy Mar 29, 2023
d7b9969
proc-macro: check for non-args runtime calls added (#13742)
michalkucharczyk Mar 29, 2023
bf8e565
Clean up after debian 11 rollout (#13762)
Mar 29, 2023
e217662
[Fix] Bump tuple element number in frame-support. (#13760)
ruseinov Mar 29, 2023
9c92e49
Generic keystore internals (#13749)
davxy Mar 29, 2023
14f1a39
Application Crypto cleanup (#13746)
davxy Mar 30, 2023
4499829
Attempt to relieve pressure on `mpsc_network_worker` (#13725)
altonen Mar 30, 2023
9b8e6e7
[Enhancement] Throw an error when there are too many pallets (#13763)
ruseinov Mar 30, 2023
a0468b3
Build wasm for mvp cpu (#13758)
athei Mar 30, 2023
025325d
BEEFY: gossip finality proofs (#13727)
acatangiu Mar 30, 2023
4c7866a
Fix nomiantion pools doc render (#13748)
kianenigma Mar 30, 2023
ee38a52
sp-runtime-interface-test: Fix flaky test (#13770)
bkchr Mar 30, 2023
4bf67fb
bump zombienet version (#13772)
pepoviola Mar 30, 2023
de4cca4
[Contracts] Overflowing bounded `DeletionQueue` allows DoS against co…
pgherveou Mar 31, 2023
a7bc9c2
Refactor: extract most aura logic out to standalone module, make use …
rphmeier Mar 31, 2023
75dee3c
contracts: make test work with debugger (#13776)
pgherveou Mar 31, 2023
9b94d38
add claim_commission weight (#13774)
Apr 1, 2023
d6f278b
FRAME: Minor fix for failsafe. (#13741)
gavofyork Apr 1, 2023
db40c48
Adjustments to RPC-query docstrings. (#13698)
DamianStraszak Apr 3, 2023
be9fa62
Force upgrade snow to 0.9.2 (#13806)
bkchr Apr 3, 2023
b94d98b
Scheduler pre block limit note (#13231)
muharem Apr 3, 2023
dd45632
Disable `sign-ext` WASM feature when building runtimes (#13804)
koute Apr 3, 2023
bbcc63a
refactor: inconsistent BalanceConversion fn (#13610)
wischli Apr 4, 2023
842e651
Remove deprecated batch verification (#13799)
bkchr Apr 4, 2023
2961138
Uniform pallet warnings (#13798)
ggwpez Apr 4, 2023
1f09739
Update documentation for uniques (This PR renames classes and instanc…
simonsso Apr 4, 2023
057f2af
Implement #[pallet::composite_enum] (#13722)
KiChjang Apr 4, 2023
8548a97
Expose WASM extensions in executor semantics (#13811)
s0me0ne-unkn0wn Apr 4, 2023
7bbfe73
Deprecate V1 Weights (#13699)
ggwpez Apr 4, 2023
3b0f4b2
update links to ink! (#13819)
agryaznov Apr 5, 2023
395853a
Move registration of `ReadRuntimeVersionExt` to `ExecutionExtension` …
bkchr Apr 5, 2023
5380a9a
Mention `on_idle` round-robin logic to `trait Hooks` cargo doc (#13797)
gpestana Apr 5, 2023
5601965
ProofRecorder: Implement transactional support (#13769)
bkchr Apr 5, 2023
2bb370f
remove duplicate sync option documentation (#13828)
liamaharon Apr 6, 2023
c0793b5
Add HoldReason to the NIS pallet (#13823)
KiChjang Apr 6, 2023
a1d3d50
Fix `try-runtime follow-chain`, try-runtime upgrade tuple tests, cli …
liamaharon Apr 6, 2023
9e1fa3d
Use proper weights in the `pallet-template` (#13817)
AlexD10S Apr 6, 2023
9a07e9d
`RemovePallet` migration utility struct (#13835)
liamaharon Apr 6, 2023
e08235a
Fix typos (#13842)
piffle-rack Apr 6, 2023
851a826
Update the frame-weight-template to use PhantomData from core (#13844)
AlexD10S Apr 6, 2023
d443f14
Make blocks per request configurable (#13824)
altonen Apr 7, 2023
72dd574
WASM executor: add `OutputExceedsBounds` variant to `Error` (#13841)
mrcnski Apr 7, 2023
82e824b
Warn if pallet provided to try-state does not exist (#13858)
Szegoo Apr 8, 2023
2e94e25
refactor(sc-executor): use wasm executor builder instead of old apis …
yjhmelody Apr 9, 2023
7363dce
remove unused import (#13868)
liamaharon Apr 10, 2023
2b61b1d
chore: remove duplicated arc (#13871)
yjhmelody Apr 11, 2023
932f820
simplify some pattern matches to appease 1.68 clippy (#13833)
Apr 11, 2023
416b0f5
Metadata V15: Add Runtime API metadata (#13302)
lexnv Apr 11, 2023
a2f6e05
pallet nis: remove benchmarking hack (#13759)
ggwpez Apr 11, 2023
a1f71b8
Fix fungible and fungibles set_balance return value (#13851)
liamaharon Apr 11, 2023
ca6af5d
use stable rust toolchain in ci (#13830)
Apr 11, 2023
da9f88d
Makes storage hashers optional in dev mode (#13815)
codekitz Apr 11, 2023
32221d4
Force incrementing of consumers (#13878)
gavofyork Apr 11, 2023
2b9ca86
Fixes error message when _ is used without dev mode (#13886)
codekitz Apr 12, 2023
4d608f9
invoke clippy with `--locked` (#13882)
Apr 12, 2023
f751d63
sc-consensus-beefy: add peer reputation cost/benefit changes (#13881)
acatangiu Apr 12, 2023
ea9ce4c
[Deps] Bump scale-info to match cumulus and polkadot (#13873)
ruseinov Apr 12, 2023
b4f857e
contracts: add sr25519_verify (#13724)
pgherveou Apr 12, 2023
f0d3bbb
Globally upgrade to syn 2.x and latest quote and proc_macro2 1x versi…
sam0x17 Apr 12, 2023
07c7732
Bump zstd from 0.11.2+zstd.1.5.2 to 0.12.3+zstd.1.5.2 (#13671)
dependabot[bot] Apr 12, 2023
a6cb6d0
Bump toml from 0.5.11 to 0.7.3 (#13619)
dependabot[bot] Apr 13, 2023
be58e48
Fixes PoV over-estimation (#13766)
ggwpez Apr 13, 2023
7f930c2
stabilize call_runtime (#13901)
agryaznov Apr 13, 2023
186db7a
fix .test-refs-check-benches condition (#13906)
Apr 13, 2023
b5b5751
Disable timestamping for the crate publishing jobs (#13910)
Apr 13, 2023
a49292a
Refactor the automatic-crate-publishing logic, make triggered pipelin…
Apr 13, 2023
e155ab8
Update proc-macro-warning (#13876)
ggwpez Apr 13, 2023
4b21282
Bump h2 from 0.3.16 to 0.3.17 (#13915)
dependabot[bot] Apr 14, 2023
6a560f8
Unqueue invalid transactions when skipping (#13918)
bkchr Apr 14, 2023
b23e52d
Fail dependant checks on cargo check warnings (#13922)
Apr 14, 2023
c2f664e
Bump cargo_metadata from 0.15.3 to 0.15.4 (#13899)
dependabot[bot] Apr 14, 2023
a9f67d0
Drain all the pending messages in the channel when TracingUnboundedRe…
NingLin-P Apr 14, 2023
3f8dc9e
Updates Benchmark macro parsing to use Generic Argument (#13919)
codekitz Apr 14, 2023
f1e2fa4
sc-allocator: Do not panic on invalid header pointer (#13925)
bkchr Apr 15, 2023
35049b1
[Fix] Remove redundant stash from Stake (#13907)
ruseinov Apr 15, 2023
4e93782
Try-state for Collective pallet (#13645)
Szegoo Apr 17, 2023
15bb9c6
imp function comparison (#13928)
itmilos Apr 17, 2023
915d22c
Update links in the Referenda Readme (#13929)
rzadp Apr 17, 2023
785115b
Balances: repatriate_reserved should respect freezes (#13885)
gavofyork Apr 17, 2023
af29c6f
Poll the substream validation before polling `Notifications` (#13934)
altonen Apr 18, 2023
cb95482
babe: replace usage of SharedEpochChanges with internal RPC (#13883)
andresilva Apr 18, 2023
88e2c9e
chore(docs): improve some comments (#13937)
yjhmelody Apr 18, 2023
917f7e3
feat: pallet asset-rate (#13608)
wischli Apr 19, 2023
1fbf283
call_executor: Remove code deduplication (#13948)
bkchr Apr 19, 2023
d4802eb
Improve has good jugement (#13952)
itmilos Apr 19, 2023
37f3d58
VRF refactory (#13889)
davxy Apr 19, 2023
54ce95e
Adds example for dev_mode and updates doc (#13944)
gupnik Apr 19, 2023
50de15d
Collective pallet: max proposal weight (#13771)
muharem Apr 19, 2023
f9d10fa
`build_network` doesn't require the `MaintainedTransactionPool` bound…
bkchr Apr 20, 2023
87fd264
ci: drop skip-if-draft job (#13961)
Apr 20, 2023
532edcf
replace unused cargo-deny check with a new cargo-deny-licenses job (#…
Apr 20, 2023
d8c3209
[NFTs] Improve offchain signature validation (#13960)
jsidorenko Apr 20, 2023
9f0d54a
Keep track of the pending response for each peer individually (#13941)
altonen Apr 20, 2023
e44b43e
Evict inactive peers from `SyncingEngine` (#13829)
altonen Apr 21, 2023
dad4092
`balances` `impl_currency` WithdrawReasons note (#13964)
liamaharon Apr 21, 2023
2059dca
try-runtime: dynamic storage query sizes (#13923)
liamaharon Apr 21, 2023
471b49b
Add Freeze/Thaw events and tests (#13779)
sea212 Apr 21, 2023
35d04fb
Update macro use and optimize storage collection (#13970)
pgherveou Apr 21, 2023
2fde380
cargo upgrade --workspace kvdb-rocksdb (#13973)
ordian Apr 21, 2023
c7d26dc
Remove superflous Pair::verify_weak (#13972)
davxy Apr 21, 2023
9370f42
Adds force_origin support (#13845)
gupnik Apr 24, 2023
910bafb
Vote locks for all reasons except RESERVE (#13914)
muharem Apr 24, 2023
fff96ac
[ci] Update buildah command and version (#13989)
alvicsam Apr 24, 2023
42448c2
Bump enumflags2 from 0.7.5 to 0.7.7 (#13995)
dependabot[bot] Apr 24, 2023
2b91202
frame-support-procedural: Fix detection of the tuples feature (#13996)
bkchr Apr 24, 2023
222d118
pallet-democracy: Do not request the proposal when scheduling (#13827)
bkchr Apr 25, 2023
c92eb70
[ci] Add message to cargo-deny (#14001)
alvicsam Apr 25, 2023
b5846cc
refactor(cli): Make some run params reusable (#13870)
yjhmelody Apr 25, 2023
8cb7257
contracts Add LOG_TARGET constant (#14002)
pgherveou Apr 25, 2023
6f0f5a9
frame-support: migrate some tests from `decl_*` macros to the new `pa…
koushiro Apr 25, 2023
db6ebf5
Removes ReportsByKindIndex (#13936)
gupnik Apr 25, 2023
c4f425b
Allow missing docs for autogen weights. (#14011)
gilescope Apr 25, 2023
af504bc
[contracts] Port host functions to Weight V2 and storage deposit limi…
agryaznov Apr 26, 2023
7ddfdfb
sp-core: remove useless bounded module (#13865)
koushiro Apr 26, 2023
154448b
fix a test (#14021)
agryaznov Apr 26, 2023
943c520
Various minor fixes (#13945)
gavofyork Apr 26, 2023
2e7e628
contracts Add storage_deposit test (#14003)
pgherveou Apr 27, 2023
dce73fe
remote-externalities: batch insert key/values (#14004)
liamaharon Apr 27, 2023
587959e
collective pallet: sort genesis members and enforce max len constrain…
liamaharon Apr 27, 2023
1e4c011
sc-network-sync: Improve error reporting (#14025)
bkchr Apr 27, 2023
d5d63e9
contracts Fix store-call test path (#14028)
pgherveou Apr 27, 2023
04248e2
chore(cli): make cli display docs correctly (#14017)
yjhmelody Apr 27, 2023
58be496
improve staking interface methods (#14023)
kianenigma Apr 27, 2023
5d1b74c
try-runtime-cli: improve ci stability (#14030)
liamaharon Apr 27, 2023
f2b6680
FRAME: inherited call weight syntax (#13932)
ggwpez Apr 27, 2023
de917e9
Implements `try_state` hook in elections and EPM pallets (#13979)
gpestana Apr 27, 2023
16b2e64
Bump wasmtime from 6.0.1 to 6.0.2 (#14037)
dependabot[bot] Apr 27, 2023
e94cb0d
Improve contribution guidelines (#13902)
bkchr Apr 28, 2023
de80d01
CI: Remove crate publish check (#14044)
ggwpez Apr 28, 2023
74b2c92
fix(in_mem): fix the clone logic (#14038)
yjhmelody Apr 29, 2023
bc8f2db
Contracts: runtime_call and storage_deposit (#13990)
pgherveou Apr 29, 2023
e699560
Fix bags-list tests execution (#14047)
bkchr May 1, 2023
8904512
CI: migrate to Google Cloud (#13994)
rcny May 2, 2023
cb5be45
rpc: Use the blocks pinning API for chainHead methods (#13233)
lexnv May 2, 2023
f49b178
contracts: Make Origin information available (#13708)
juangirini May 2, 2023
7212e91
Bump clap to 4.2.5 (#14061)
May 2, 2023
c800a2c
Manual seal delayed finalize (#13999)
shunsukew May 2, 2023
f78bccc
Don't run `check-crates-publishing` job on prs (#14064)
May 3, 2023
5a81bad
Only calculate tree route during finalization when there are multiple…
skunert May 3, 2023
34301a9
test-staking-e2e: Add to main `Cargo.toml`. (#14062)
bkchr May 3, 2023
44130d5
contracts: add events to ContractResult (#13807)
juangirini May 3, 2023
71d749c
rpc server: break legacy CLI options and remove "backward compatible …
niklasad1 May 3, 2023
d3ce947
Statement store (#13701)
arkpar May 4, 2023
82f783d
CI: `cargo-check-benches`: don't merge in `master` if base ref isn't …
rcny May 4, 2023
7d6084b
Refinements to VRF types (#14036)
davxy May 4, 2023
ebe0c08
substrate-test-runtime migrated to "pure" frame runtime (#13737)
michalkucharczyk May 4, 2023
6be90cf
fungible conformance tests: Inspect and Mutate (#13852)
liamaharon May 4, 2023
b01f340
add fast unstake (#14077)
May 4, 2023
133157a
Improve handling of unset `StorageVersion` (#13417)
bkchr May 4, 2023
fb98ee1
try-runtime-cli: 'instant' snapshots, threading refactor, better prog…
liamaharon May 5, 2023
d712bd1
Upgrade wasm-opt to 0.112.0 (#13574)
brson May 5, 2023
9ee70a1
Add flawky tests report (#13654)
mateo-moon May 5, 2023
1a6fc1e
Update codeowners file (#14078)
juangirini May 5, 2023
bc8a350
Bump ci-linux to rust 1.69 (#14060)
May 5, 2023
1073f45
add error logging to call_runtime (#14082)
agryaznov May 5, 2023
9957da3
Improve `try-runtime::on_runtime_upgrade` and fix some storage versio…
bkchr May 5, 2023
da3821e
divide payload into atleast one chunk (#14086)
Ank4n May 7, 2023
529e24a
fix cli: make port Option<u16> again (#14088)
niklasad1 May 7, 2023
cf1fb89
Allow Creation of Asset Accounts That Don't Exist Yet and Add `Blocke…
joepetrowski May 8, 2023
81d732b
Re-enable `node-cli` tests in CI and fix them (#14093)
bkchr May 8, 2023
33d94c2
sc-informant: Do not show `Block history` if doing major sync (#14094)
bkchr May 8, 2023
dc398de
Bump cfg-expr from 0.10.3 to 0.15.1 (#14092)
dependabot[bot] May 8, 2023
00a7ee7
Remove manual implementation (#14096)
skunert May 8, 2023
ab8330c
Remove manual implementation (#14096)
skunert May 8, 2023
f0c14f3
frame-support-test: migrate tests from `decl_*` macros to the new `pa…
koushiro May 9, 2023
65e7ab6
Emit events related to asset mutations (#14099)
KiChjang May 9, 2023
2a148e3
Deprecate Pallet `decl_*` Macros (#13705)
ggwpez May 9, 2023
0dff96e
Add non_camel_case_types for storage_alias (#14104)
pgherveou May 9, 2023
c014d4a
Move back to ci-linux:production image after upgrade (#14105)
May 9, 2023
e92613d
BLS Core Crypto attempt #2 (#13618)
drskalman May 9, 2023
725208a
Remove the `Copy` bound on `CollectionId` in the uniques pallet (#14111)
koute May 10, 2023
14855e6
Timeout only if the referendum is not queued (#14106)
gavofyork May 10, 2023
3283a08
Include `node-template-release` in workspace (#14103)
ggwpez May 10, 2023
e2c5a56
Bump `kvdb-rocksdb` to 0.19.0 (#14113)
tdimitrov May 10, 2023
49154cc
Remove `#[pallet::generate_storage_info]` from docs (#14116)
ggwpez May 10, 2023
aee8f76
Bump `Cargo.lock` (#14121)
rcny May 10, 2023
0c696fc
Prepare `sc-network` for `ProtocolController`/`NotificationService` (…
altonen May 11, 2023
a87e56f
Benchmark pallet sudo (#13880)
Doordashcon May 11, 2023
c09f0bc
Assets: impl ContainsPair for asset and account IDs (#14119)
muharem May 11, 2023
e6a13b8
Create benchmark for the `system::set_code` instrisic (#13373)
hirschenberger May 11, 2023
8796276
Staking::{bond, set_controller} to set controllers to stash only. (#1…
May 11, 2023
4ce0b74
Upgrade to libp2p 0.51.3 (#13587)
melekes May 12, 2023
fd4c7b3
Bump parity-db (#14114)
arkpar May 12, 2023
2fc9c39
fix genesis broken gensis config doc link (#14125)
sam0x17 May 12, 2023
d3bb3e8
chore(storage-monitor): improve `free_space` calculation and cli defa…
yjhmelody May 12, 2023
1f9e3aa
remove `sp-serializer` which is not useful (#14134)
yjhmelody May 14, 2023
3919ca8
Fix staking genesis build (#14140)
ggwpez May 15, 2023
204f39a
Postpone public key creation in the test GenesisStorageBuilder (#14142)
davxy May 15, 2023
2153367
Adds integration test for slashed/chilled validator with subsequent v…
gpestana May 15, 2023
93e2cf1
Bump parity-db to 0.4.8 (#14146)
tdimitrov May 15, 2023
e4b08db
AccountTouch: deposit_required requires asset id (#14147)
muharem May 15, 2023
9dbf60c
Introduce function into frame System (#14149)
gavofyork May 15, 2023
1eb0611
fully enable `RuntimeDebug` in `feature = try-runtime` (#14136)
kianenigma May 15, 2023
be4c7cb
Tweak to avoid minor entropy loss (#14152)
gavofyork May 15, 2023
2af3ba8
expose transport, peer_info and discovery in sc-network (#14132)
klbrvik May 15, 2023
dd478bc
Move node-template Cargo.toml dependencies to workspace (#14058)
kalaninja May 16, 2023
1b8ad03
Bump tower-http from 0.3.5 to 0.4.0 (#14128)
dependabot[bot] May 16, 2023
3c10b12
Add review rules regarding the owned files (#14122)
juangirini May 16, 2023
f741f2e
Change unit test upload step (#14124)
mateo-moon May 16, 2023
1cb8fb0
Fix indent for pr-custom-review config (#14161)
alvicsam May 16, 2023
8423d2f
remove deprecated remove_prefix to clear era_info (#13460)
surajk-m May 16, 2023
bbe132e
frame-system: `uniques` remove one `encode` call (#14154)
bkchr May 16, 2023
43a130c
Max class voters for ranked collective vote tally (#13313)
muharem May 17, 2023
6507a79
Add `serde` feature flag to primitives (#13027)
haerdib May 17, 2023
f4a2e84
chore: move whitelist test to better place and add missing `Inactive …
yjhmelody May 17, 2023
bc89da2
Added serde feature to sp-consensus-aura (#14166)
michalkucharczyk May 18, 2023
7c06185
Adds ability to use default hasher in `dev_mode` for explicit key bin…
gupnik May 19, 2023
e736a97
Fix typos (#14177)
piffle-rack May 19, 2023
b938a72
Core-Fellowship: fix origin typo (#14179)
muharem May 19, 2023
2c3b923
remote-externalities: retry for get_keys (#14167)
liamaharon May 19, 2023
0046337
frame: Enable GenesisConfig in no_std (#14108)
michalkucharczyk May 20, 2023
2000147
Update the nix build configuration. (#13706)
farcaller May 20, 2023
8fca6cf
FRAME: Allow message ID to be mutated in ProcessMessage (#14183)
gavofyork May 21, 2023
691894b
RevertCmd: Expose database params via CLI (#14182)
bkchr May 21, 2023
e85188b
Improve try-state docs (#13967)
Szegoo May 21, 2023
17a99d1
test-runtime: Return hashed call as provides in unsigned validation (…
bkchr May 22, 2023
20bd05c
Revert "Optimize merkle proofs for efficient verification in Solidity…
Lederstrumpf May 22, 2023
e7229f1
Executor: Add `create_runtime_from_artifact_bytes` (#14184)
mrcnski May 22, 2023
e0de101
WarpSync: Show number of required peers in informant (#14190)
bkchr May 22, 2023
5032b8d
BREAKING - Try-runtime: Use proper error types (#13993)
Szegoo May 23, 2023
784ac7e
NFTs fractionalization (#12565)
lana-shanghai May 23, 2023
bc3ce83
Actually respect locks of zero (#14144)
gavofyork May 23, 2023
aacba0f
Remove the `Copy` bound on `AssetId` (#14158)
koute May 23, 2023
b9c9522
Split `Peerset` into `PeerStore` & `ProtocolController`s (#13611)
dmitry-markin May 23, 2023
5b08315
Add genesis config to Glutton pallet (#14188)
NachoPal May 23, 2023
820d196
Bump syn from 2.0.15 to 2.0.16 (#14196)
dependabot[bot] May 23, 2023
2e494e8
TrieCache: Fine tune the size of the local and node cache (#14191)
bkchr May 23, 2023
32ab5cb
Easy PR: Fix warnings from latest nightly (#14195)
gilescope May 23, 2023
4dd06e4
Remove wasmi backend from sc-executor (#13800)
yjhmelody May 23, 2023
dca6ebe
Migration hook fixes (#14174)
liamaharon May 23, 2023
e1345e7
wasm: Update from v6.0.2 to v8.0.1 (#14178)
lexnv May 24, 2023
bf92638
sc-client-db: add test for reverting finalized blocks (#14205)
andresilva May 24, 2023
3c8666b
Replace request-response incoming requests queue with `async-channel`…
dmitry-markin May 24, 2023
7c195bf
sc-consensus-beefy: graceful support for pallet-beefy reset (#14217)
acatangiu May 25, 2023
a2037bd
sp-api: Set correct where bound in the generated code (#14252)
bkchr May 29, 2023
5e49f6e
expose the fields of Dust type to public (#14388)
wangjj9219 Jun 18, 2023
2b3d0d8
Merge upstream polkadot-v0.9.43; fix enough stuff for cargo check to …
kacperzuk-neti Jun 23, 2023
3b58388
Fix runtime-benchmarks feature
kacperzuk-neti Jun 23, 2023
f4e1f9b
Make tests compile
kacperzuk-neti Jun 23, 2023
266c059
Fix try-runtime feature
kacperzuk-neti Jun 23, 2023
69cf3a5
Fix tests
kacperzuk-neti Jun 23, 2023
eb50257
Cargo fmt
kacperzuk-neti Jun 23, 2023
f27d53e
Fix benchmarks + regenerate weights.rs
kacperzuk-neti Jun 23, 2023
7058c05
Fix tests
kacperzuk-neti Jun 26, 2023
9c9c75d
Add upstream migrations
kacperzuk-neti Jun 26, 2023
577d056
Benchmarking for federated bridge
kacperzuk-neti Jun 26, 2023
81eb32f
Add missing benchmark in staking pallet
kacperzuk-neti Jun 26, 2023
c5eb5f7
Benchmark LLM pallet
kacperzuk-neti Jun 26, 2023
c8748cc
Cargo fmt our pallets
kacperzuk-neti Jun 26, 2023
3e0e434
Bump spec version to 11
kacperzuk-neti Jun 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bin/node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ runtime-benchmarks = [
"pallet-office/runtime-benchmarks",
"pallet-federated-bridge/runtime-benchmarks",
"pallet-liberland-legislation/runtime-benchmarks",
"pallet-llm/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
]
try-runtime = [
Expand Down
47 changes: 13 additions & 34 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 10,
spec_version: 11,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand All @@ -160,7 +160,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 10,
spec_version: 11,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -457,17 +457,6 @@ parameter_types! {
pub const MaxReserves: u32 = 50;
}

/// A reason for placing a hold on funds.
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, Debug, TypeInfo,
)]
pub enum HoldReason {
/// The NIS Pallet has reserved it for a non-fungible receipt.
Nis,
/// Used by the NFT Fractionalization Pallet.
NftFractionalization,
}

impl pallet_balances::Config for Runtime {
type MaxLocks = MaxLocks;
type MaxReserves = MaxReserves;
Expand All @@ -480,8 +469,8 @@ impl pallet_balances::Config for Runtime {
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type FreezeIdentifier = ();
type MaxFreezes = ();
type HoldIdentifier = HoldReason;
type MaxHolds = ConstU32<2>;
type HoldIdentifier = ();
type MaxHolds = ();
}

parameter_types! {
Expand Down Expand Up @@ -1340,21 +1329,6 @@ impl pallet_assets::Config for Runtime {
type BenchmarkHelper = ();
}

parameter_types! {
pub const QueueCount: u32 = 300;
pub const MaxQueueLen: u32 = 1000;
pub const FifoQueueLen: u32 = 500;
pub const NisBasePeriod: BlockNumber = 3 * DAYS;
pub const MinBid: Balance = 100 * DOLLARS;
pub const MinReceipt: Perquintill = Perquintill::from_percent(1);
pub const IntakePeriod: BlockNumber = 10;
pub MaxIntakeWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10;
pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5);
pub Target: Perquintill = Perquintill::zero();
pub const NisPalletId: PalletId = PalletId(*b"py/nis ");
pub const NisHoldReason: HoldReason = HoldReason::Nis;
}

parameter_types! {
pub const TOTALLLM: Balance = 70_000_000u128 * GRAINS_IN_LLM;
pub const PRERELEASELLM: Balance = 13_300_000u128 * GRAINS_IN_LLM;
Expand Down Expand Up @@ -1382,6 +1356,7 @@ impl pallet_llm::Config for Runtime {
HalfSenateOrigin
>;
type OnLLMPoliticsUnlock = OnLLMPoliticsUnlock;
type WeightInfo = ();
}

parameter_types! {
Expand Down Expand Up @@ -1612,6 +1587,7 @@ impl pallet_federated_bridge::Config<EthLLDBridgeInstance> for Runtime {
type WithdrawalDelay = WithdrawalDelay;
type WithdrawalRateLimit = LLDRateLimit;
type MaxTotalLocked = LLDMaxTotalLocked;
type WeightInfo = ();
}

type EthLLMBridgeInstance = pallet_federated_bridge::Instance2;
Expand All @@ -1626,6 +1602,7 @@ impl pallet_federated_bridge::Config<EthLLMBridgeInstance> for Runtime {
type WithdrawalDelay = WithdrawalDelay;
type WithdrawalRateLimit = LLMRateLimit;
type MaxTotalLocked = LLMMaxTotalLocked;
type WeightInfo = ();
}

construct_runtime!(
Expand Down Expand Up @@ -1771,7 +1748,7 @@ mod staking_v12 {
pub struct Migration<T>(sp_std::marker::PhantomData<T>);
impl<T: pallet_staking::Config> OnRuntimeUpgrade for Migration<T> {
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
frame_support::ensure!(
StorageVersion::<T>::get() == ObsoleteReleases::V7_0_0,
"Expected v7 before upgrading to v12"
Expand All @@ -1787,7 +1764,7 @@ mod staking_v12 {
}

#[cfg(feature = "try-runtime")]
fn post_upgrade(_: Vec<u8>) -> Result<(), &'static str> {
fn post_upgrade(_: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
frame_support::ensure!(
StorageVersion::<T>::get() == ObsoleteReleases::V12_0_0,
"Failed to upgrade to v12"
Expand All @@ -1801,6 +1778,8 @@ mod staking_v12 {
// `OnRuntimeUpgrade`.
type Migrations = (
pallet_contracts::Migration<Runtime>,
pallet_nfts::migration::v1::MigrateToV1<Runtime>,
pallet_offences::migration::v1::MigrateToV1<Runtime>,
);

type EventRecord = frame_system::EventRecord<
Expand Down Expand Up @@ -1830,7 +1809,6 @@ mod benches {
[pallet_child_bounties, ChildBounties]
[pallet_collective, Council]
[pallet_contracts, Contracts]
[pallet_core_fellowship, CoreFellowship]
[pallet_democracy, Democracy]
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
[pallet_election_provider_support_benchmarking, EPSBench::<Runtime>]
Expand All @@ -1855,12 +1833,13 @@ mod benches {
[pallet_transaction_storage, TransactionStorage]
[pallet_treasury, Treasury]
[pallet_nfts, Nfts]
[pallet_nft_fractionalization, NftFractionalization]
[pallet_utility, Utility]
[pallet_whitelist, Whitelist]
[pallet_registry, CompanyRegistry]
[pallet_office, IdentityOffice]
[pallet_liberland_legislation, LiberlandLegislation]
[pallet_federated_bridge, EthLLDBridge]
[pallet_llm, LLM]
);
}

Expand Down
13 changes: 13 additions & 0 deletions frame/democracy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,19 @@ impl<
> EnsureOrigin<O> for EnsureReferendumProportionAtLeast<T, N, D>
{
type Success = ();

#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
let tally = Tally::<BalanceOf<T>> {
ayes: 1u8.into(),
nays: 0u8.into(),
aye_voters: 1,
nay_voters: 0,
turnout: 1u8.into(),
};
Ok(O::from(RawOrigin::Referendum(tally, 1u8.into())))
}

fn try_origin(o: O) -> Result<Self::Success, O> {
let n: BalanceOf<T> = N.into();
let d: BalanceOf<T> = D.into();
Expand Down
8 changes: 4 additions & 4 deletions frame/democracy/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub mod v2 {

impl<T: Config> OnRuntimeUpgrade for Migration<T> {
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
assert_eq!(StorageVersion::get::<Pallet<T>>(), 1, "can only upgrade from version 1");

let props_count = v0::PublicProps::<T>::get().len();
Expand Down Expand Up @@ -312,7 +312,7 @@ pub mod v2 {
}

#[cfg(feature = "try-runtime")]
fn post_upgrade(state: Vec<u8>) -> Result<(), &'static str> {
fn post_upgrade(state: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
assert_eq!(StorageVersion::get::<Pallet<T>>(), 2, "must upgrade");

let (old_props_count, old_ref_count): (u32, u32) =
Expand All @@ -339,7 +339,7 @@ pub mod v3 {

impl<T: Config> OnRuntimeUpgrade for Migration<T> {
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
assert_eq!(StorageVersion::get::<Pallet<T>>(), 2, "can only upgrade from version 2");

let voting_of_count = v2::VotingOf::<T>::iter().count();
Expand Down Expand Up @@ -397,7 +397,7 @@ pub mod v3 {
}

#[cfg(feature = "try-runtime")]
fn post_upgrade(state: Vec<u8>) -> Result<(), &'static str> {
fn post_upgrade(state: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
assert_eq!(StorageVersion::get::<Pallet<T>>(), 3, "must upgrade");

let old_votings: u32 =
Expand Down
7 changes: 6 additions & 1 deletion frame/democracy/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use frame_support::{
use frame_system::{EnsureRoot, EnsureSigned, EnsureSignedBy};
use sp_core::H256;
use sp_runtime::{
testing::Header,
testing::{TestSignature, Header},
traits::{BadOrigin, BlakeTwo256, Hash, IdentityLookup},
Perbill,
Permill,
Expand Down Expand Up @@ -186,6 +186,7 @@ impl pallet_balances::Config for Test {
use pallet_nfts::PalletFeatures;
parameter_types! {
pub storage Features: PalletFeatures = PalletFeatures::all_enabled();
pub const MaxAttributesPerCall: u32 = 10;
}
impl pallet_nfts::Config for Test {
type RuntimeEvent = RuntimeEvent;
Expand Down Expand Up @@ -213,6 +214,9 @@ impl pallet_nfts::Config for Test {
type Helper = ();
type Citizenship = ();
type MetadataValidator = ();
type MaxAttributesPerCall = MaxAttributesPerCall;
type OffchainSignature = TestSignature;
type OffchainPublic = <TestSignature as sp_runtime::traits::Verify>::Signer;
}
parameter_types! {
pub static PreimageByteDeposit: u64 = 0;
Expand Down Expand Up @@ -261,6 +265,7 @@ impl pallet_llm::Config for Test {
type InflationEventInterval = InflationEventInterval;
type OnLLMPoliticsUnlock = ();
type SenateOrigin = EnsureRoot<u64>;
type WeightInfo = ();
}

parameter_types! {
Expand Down
4 changes: 4 additions & 0 deletions frame/democracy/src/tests/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

use super::*;

use super::types::DispatchOrigin;

#[test]
fn set_external_metadata_works() {
new_test_ext().execute_with(|| {
Expand Down Expand Up @@ -141,6 +143,7 @@ fn set_referendum_metadata_by_root() {
let index = Democracy::inject_referendum(
2,
set_balance_proposal(2),
DispatchOrigin::Root,
VoteThreshold::SuperMajorityApprove,
0,
);
Expand Down Expand Up @@ -180,6 +183,7 @@ fn clear_referendum_metadata_works() {
let index = Democracy::inject_referendum(
2,
set_balance_proposal(2),
DispatchOrigin::Root,
VoteThreshold::SuperMajorityApprove,
0,
);
Expand Down
7 changes: 6 additions & 1 deletion frame/elections-phragmen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ mod tests {
use frame_system::ensure_signed;
use sp_runtime::{
Permill,
testing::{Header, H256},
testing::{TestSignature, Header, H256},
traits::{BlakeTwo256, IdentityLookup},
BuildStorage,
};
Expand Down Expand Up @@ -1346,6 +1346,7 @@ mod tests {
use pallet_nfts::PalletFeatures;
parameter_types! {
pub storage Features: PalletFeatures = PalletFeatures::all_enabled();
pub const MaxAttributesPerCall: u32 = 10;
}
impl pallet_nfts::Config for Test {
type RuntimeEvent = RuntimeEvent;
Expand Down Expand Up @@ -1373,6 +1374,9 @@ mod tests {
type Helper = ();
type Citizenship = ();
type MetadataValidator = ();
type MaxAttributesPerCall = MaxAttributesPerCall;
type OffchainSignature = TestSignature;
type OffchainPublic = <TestSignature as sp_runtime::traits::Verify>::Signer;
}

impl pallet_assets::Config for Test {
Expand Down Expand Up @@ -1451,6 +1455,7 @@ mod tests {
type InflationEventInterval = InflationEventInterval;
type OnLLMPoliticsUnlock = ();
type SenateOrigin = EnsureRoot<u64>;
type WeightInfo = ();
}

pub struct TestChangeMembers;
Expand Down
Loading