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

Allow async backing in moonbase #2593

Merged
merged 103 commits into from
Dec 22, 2023
Merged

Allow async backing in moonbase #2593

merged 103 commits into from
Dec 22, 2023

Conversation

librelois
Copy link
Collaborator

@librelois librelois commented Dec 12, 2023

What does it do?

Runtimes part

  • Add the pallet async_backing to moonbase runtime
  • Ad runtime API UnincludedSegmentApi to moonbase runtime
  • Change the timestamp implementation for EVM (compute timestamp from the relay slot)
    • Timestamp opcode
    • call permit precompile
    • Precompiles that implement EIP-2612 (balances-erc20 and assets-erc20)
  • Add a new runtime storage item runtime.RelayTimestampNow populated with the relay timestamp at the parachain system inherent
  • Add a new type RelayTimestamp that implement the trait Time and return the value in storage item runtime.RelayTimestampNow
  • Add a wrapper to the ConsensusHook to read the relay timestamp from the relay storage proof and store it.

Before this PR, the timestamp implementation for EVM came from the pallet timestamp, we don't use this pallet anymore.

Manual Migration

A new storage item runtime.RelayGenesisTime should be populated with the genesis timestamp of the relay in milliseconds.

Client part

Refactor moonbeam node services to use the new moonkit api introduced in this PR: Moonsong-Labs/moonkit#14

What important points reviewers should know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

Base automatically changed from ahmad-upgrade-to-polkadot-v1.3.0 to master December 19, 2023 13:00
@librelois librelois changed the title WIP: Enable async backing in moonbase Allow async backing in moonbase Dec 20, 2023
@librelois librelois marked this pull request as ready for review December 20, 2023 15:43
Copy link
Contributor

github-actions bot commented Dec 21, 2023

Coverage Report

@@                   Coverage Diff                   @@
##           master   elois-async-backing      +/-   ##
=======================================================
- Coverage   81.05%                81.01%   -0.04%     
+ Files         286                   287       +1     
+ Lines       94172                 94254      +82     
=======================================================
+ Hits        76322                 76353      +31     
+ Misses      17850                 17901      +51     
Files Changed Coverage
/node/cli/src/cli.rs 34.18% (-0.44%) 🔽
/node/cli/src/command.rs 16.77% (-0.08%) 🔽
/node/service/src/lib.rs 59.47% (-4.70%) 🔽
/precompiles/call-permit/src/lib.rs 97.84% (+0.05%) 🔼
/precompiles/crowdloan-rewards/src/mock.rs 98.07% (+0.01%) 🔼
/precompiles/relay-encoder/src/mock.rs 8.94% (-0.02%) 🔽
/runtime/moonbase/src/lib.rs 50.73% (+1.45%) 🔼
/runtime/moonbase/tests/common/mod.rs 95.47% (+0.21%) 🔼
/runtime/moonbeam/src/lib.rs 47.48% (+1.36%) 🔼
/runtime/moonriver/src/lib.rs 47.47% (+1.36%) 🔼

Coverage generated Fri Dec 22 13:21:25 UTC 2023

@librelois librelois merged commit 09b8141 into master Dec 22, 2023
26 of 27 checks passed
@librelois librelois deleted the elois-async-backing branch December 22, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants