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

MESH-1916 Monthly 2022 12 #1387

Merged
merged 50 commits into from
Mar 16, 2023
Merged

MESH-1916 Monthly 2022 12 #1387

merged 50 commits into from
Mar 16, 2023

Conversation

Neopallium
Copy link
Contributor

@Neopallium Neopallium commented Jan 23, 2023

changelog

new features

  • Update to Substrate monthly 2022-12.
  • Move to V2 Weights (now includes a proof_size).

modified API

  • The Contract pallet RPC endpoints have been removed and can only be accessed as Runtime Calls (state_call RPC endpoint).
  • Added payment_queryFeeDetails RPC endpoint.
  • Added Runtime APIs TransactionPaymentCallApi_query_call_info and TransactionPaymentCallApi_query_call_fee_details. Used to query the cost of a call without having to first sign a transaction with that call.
  • Added event transaction-payment.TransactionFeePaid to record tx fees.

modified logic

  • The Weight type has been changed from just a single u64 to a pair (ref_time and proof_size).

data migration

  • Substrate pallet migrations in pallet_contracts, pallet_scheduler, pallet_preimage.

@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Merging #1387 (0e7e1f6) into develop (a52cc32) will increase coverage by 9.91%.
The diff coverage is 20.93%.

@@             Coverage Diff             @@
##           develop    #1387      +/-   ##
===========================================
+ Coverage    44.19%   54.11%   +9.91%     
===========================================
  Files          146      146              
  Lines        31264    31749     +485     
===========================================
+ Hits         13818    17180    +3362     
+ Misses       17446    14569    -2877     
Impacted Files Coverage Δ
pallets/asset/src/checkpoint/mod.rs 57.70% <0.00%> (+2.75%) ⬆️
pallets/base/src/lib.rs 51.78% <0.00%> (ø)
pallets/common/src/traits/asset.rs 0.00% <ø> (ø)
pallets/common/src/traits/external_agents.rs 0.00% <ø> (ø)
pallets/common/src/traits/group.rs 49.27% <0.00%> (ø)
pallets/common/src/traits/identity.rs 3.65% <0.00%> (ø)
pallets/common/src/traits/mod.rs 0.00% <ø> (ø)
pallets/common/src/traits/nft.rs 0.00% <ø> (ø)
pallets/common/src/traits/portfolio.rs 0.00% <ø> (ø)
pallets/common/src/traits/relayer.rs 0.00% <ø> (ø)
... and 80 more

... and 8 files with indirect coverage changes

@Neopallium
Copy link
Contributor Author

Neopallium commented Jan 23, 2023

TODO:

  • Publish new versions of confidential-identity-* crates.
  • Check that no new migrations are needed between Substrate monthly 11 and 12.
  • Test Substrate migrations by upgrading a development chain. (do two runtime upgrades, to make sure migrations don't run multiple times).
  • Need to check that a node with the newer Substrate monthly release can still do a full sync of Testnet and Mainnet. This is to check if ed25519_verify change hasn't caused a problem.
  • Re-run benchmarks to update pallets missed last time.

Copy link
Contributor

@HenriqueNogara HenriqueNogara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I was expecting even more changes

@Neopallium
Copy link
Contributor Author

Most of the changes were the Runtime prefix and V2 Weights, which covers a lot of files/code. The biggest function change was moving to a different JSON-RPC crate created by paritytech.

@Neopallium Neopallium mentioned this pull request Jan 31, 2023
8 tasks
@Neopallium Neopallium changed the title Monthly 2022 12 [WIP] Monthly 2022 12 Feb 7, 2023
@Neopallium
Copy link
Contributor Author

FYI, marking as WIP to block merging until the NFT PR is merged and we are ready for this.

@Neopallium Neopallium changed the title [WIP] Monthly 2022 12 [WIP] MESH-1916 Monthly 2022 12 Mar 2, 2023
@Neopallium Neopallium changed the title [WIP] MESH-1916 Monthly 2022 12 MESH-1916 Monthly 2022 12 Mar 15, 2023
@adamdossa adamdossa merged commit cbfe877 into develop Mar 16, 2023
@adamdossa adamdossa deleted the monthly-2022-12 branch March 16, 2023 14:36
adamdossa added a commit that referenced this pull request Apr 13, 2023
* Substrate monthly update.

* Apply substrate monthly 2022-11 changes.

* Apply more monthly 2022-11 changes.

* cargo fmt and update `clap`

* Fix no_std build errors.

* Fix benchmarks.

* Fix compiling of tests.

* Fix staking & transaction-payment tests.

* Allow use of deprecated remove_prefix.

* Fix benchmarks.

* Cargo fmt

* Fixup.

* FIXUP: Settlement weights.

* Fix issue with schedule weight limit.

* Fix contracts GAS_LIMIT to include a proof_size.

* Fix expected bridge weights in tests.

* Add missing migrations.

* Fixup: transaction payment RPC endpoints.

* Apply commit
paritytech/substrate@419924c

To our fork.

* Add more changes from Substrate balances pallet.

* Update benchmark weights template.

* Update weights type name.

* Charge minimal fee if the caller is not authorized.

* Update weights.

* Update weights in bridge tests.

* Update Substrate crates.

* Code cleanup in transaction-payment.

Make the code closer to Substrate's transaction-payment code.

* Fix issue with events in transaction-payment.

* Update Substrate again.

* Add missing RuntimeEvent.

* Apply commit paritytech/substrate#12633

* Allow use of remove_prefix.

* Cargo fmt

* Fix event count in tests.

* Update to Substrate monthly 2022-12.

* Remove local parity-db patch

* Fix issue with curve25519-dalek-ng

* Update Substrate again.

* Re-run benchmarks with new template.

* Fix bridge wieghts in tests.

* Update substrate monthly.

* Apply Substrate changes to new NFT code.

* allow remove_prefix.

* Fix timestamp in NFT tests.

* Fixup NFT rpc endpoints.

* Bump sp-arithmetic to the correct version.

* Use published confidential identity crates.

* Update to 5.4

* Update version in Cargo.lock

---------

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants