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

Add sapling and orchard anchors to zebra-state #1320

Closed
4 tasks
yaahc opened this issue Nov 17, 2020 · 2 comments · Fixed by #2458
Closed
4 tasks

Add sapling and orchard anchors to zebra-state #1320

yaahc opened this issue Nov 17, 2020 · 2 comments · Fixed by #2458
Assignees
Labels
C-enhancement Category: This is an improvement NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter) NU-1 Sapling Network Upgrade: Sapling specific tasks NU-5 Network Upgrade: NU5 specific tasks

Comments

@yaahc
Copy link
Contributor

yaahc commented Nov 17, 2020

Once we have implemented incremental merkle trees and can compute anchors we should:

Unanswered questions about the finalized and non-finalized state:

What keys do we need to be able to look up quickly? For transaction validation? For treestate updates?

This changes how we index treestates in the state.

The state already has sprout and sapling anchors, and sprout, sapling, and orchard nullifiers.

Are there any rules about which treestates can be used for which transactions?

This might change how we maintain (Sprout?) treestates in the non-finalized state.

For example, can Sprout, Sapling, and Orchard transactions use the previous block's treestate?
(There are a lot of references to "finalized" treestates in the rest of the RFC, but I'm not sure if they are the same as the "finalized" state.)

The rest of the RFC mentions that Sprout transactions can use the treestate of any previous transaction in the block.

Yes Sprout is an annoying outlier in that transactions can point to a previous JoinSplit treestate within the same transaction as its treestate, so we need to compute more treestates/ trees (maybe just roots, not lots of copies of trees) in order to contextually verify Sprout tx's. Sprout can also use the final treestates of previous blocks.

But there is no need to track interstitial Sprout treestates for:

  • JoinSplits in other transactions inside the same block, or
  • JoinSplits or transactions in previous blocks.

Sapling and Orchard are easier in that you can only refer to the final treestate/root of a previous block.

Related issues:

#2425

@yaahc yaahc added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Nov 17, 2020
@dconnolly dconnolly added this to the First Alpha Release milestone Nov 17, 2020
@hdevalence
Copy link
Contributor

Blocked on #1348 which introduces a PreparedBlock type to pass this data.

@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Nov 27, 2020
@teor2345 teor2345 added the S-needs-triage Status: A bug report needs triage label Dec 14, 2020
@mpguerra mpguerra removed this from the v1.0.0-alpha.1 milestone Jan 11, 2021
@dconnolly dconnolly self-assigned this Jan 11, 2021
@dconnolly dconnolly added this to the 2021 Sprint 1 milestone Jan 11, 2021
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Jan 25, 2021
@mpguerra mpguerra modified the milestones: 2021 Sprint 1, 2021 Sprint 3 Jan 25, 2021
@mpguerra mpguerra modified the milestones: 2021 Sprint 3, 2021 Sprint 4 Feb 22, 2021
@mpguerra mpguerra modified the milestones: 2021 Sprint 6, 2021 Sprint 7 Mar 22, 2021
@dconnolly dconnolly changed the title Add sprout and sapling anchors to zebra-state Add sprout and sapling and orchard anchors to zebra-state Apr 6, 2021
@dconnolly dconnolly added NU-5 Network Upgrade: NU5 specific tasks S-blocked Status: Blocked on other tasks labels Apr 6, 2021
@mpguerra mpguerra changed the title Add sprout and sapling and orchard anchors to zebra-state Add sapling and orchard anchors to zebra-state Jul 12, 2021
@mpguerra mpguerra assigned conradoplg and dconnolly and unassigned dconnolly Jul 26, 2021
@mpguerra mpguerra removed the S-blocked Status: Blocked on other tasks label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: This is an improvement NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter) NU-1 Sapling Network Upgrade: Sapling specific tasks NU-5 Network Upgrade: NU5 specific tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants