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

Make enclave extrinsics mortal #1637

Merged
merged 11 commits into from
Nov 6, 2024
Merged

Make enclave extrinsics mortal #1637

merged 11 commits into from
Nov 6, 2024

Conversation

brenzi
Copy link
Collaborator

@brenzi brenzi commented Nov 5, 2024

closes #1475

approach:

  • separate mortality from tip
  • extend ParentchainCall type to include mortality info for each call separately
  • use parentchain last finalized header info wherever we can get it from, depending on context: either ocall or parentchain pallets
  • fall back to immortal, if last finalized header can't be obtained (is this dangerous?)

critical:

  • Stf-triggered extrinsics, most important: balance_unshield

good to have to avoid jamming the chain after downtimes:

  • enclaveBridge.confirmProcessedParentchainBlock
  • sidechain.FinalizedSidechainBlock
  • attestation

only needed for init, low prio

  • shard vault creation
  • shard config

Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

Looks good so far!

core-primitives/extrinsics-factory/src/lib.rs Show resolved Hide resolved
app-libs/stf/src/trusted_call.rs Outdated Show resolved Hide resolved
@brenzi brenzi marked this pull request as ready for review November 6, 2024 10:37
@brenzi brenzi added A0-core Affects a core part B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing labels Nov 6, 2024
@brenzi brenzi requested a review from clangenb November 6, 2024 11:23
Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

Looks good to me! Only one remark:

  • fall back to immortal, if last finalized header can't be obtained (is this dangerous?)

I don't think it is dangerous, the question is rather if it is realistic that the rest of the service if up and running well if we can't obtain it. I think the only possible scenario is if the parentchain is having finalization issues right at the time when the worker is starting up. Hence, we might consider falling back in this order: finalized head -> best head -> immortal. Not sure if it is worth implementing though.

core-primitives/types/src/lib.rs Show resolved Hide resolved
@brenzi brenzi merged commit 201dc5d into master Nov 6, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-core Affects a core part B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

configurable enclave extrinsic mortality
2 participants