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

restructure fragment application to ledger #163

Open
vincenthz opened this issue Nov 21, 2019 · 0 comments
Open

restructure fragment application to ledger #163

vincenthz opened this issue Nov 21, 2019 · 0 comments
Labels

Comments

@vincenthz
Copy link
Member

need to restructure the ledger checks / applications to separate some parts, which would give the ability to do more check on fragments ahead of application.

Errors need to splitted in two categories:

  • ErrorStateless: the fragment is not valid and never will be : e.g. structure is invalid, some cryptographic signature return Failed, ...
  • ErrorLedgerState: the fragment is not currently valid : it doesn't apply to the current ledger state (e.g. account doesn't have enough value), but could validly apply to a different ledger state.

Operations need to separate the stateless checks on a fragment from the stateful checks

Stateless:

  • Structural/Consistency checks
  • Limits
  • Hash calculation
  • Cryptographic signatures 1/2 (public key available)

Stateful:

  • Cryptographic signatures 2/2 (public key need to be retrieved from state)
  • Application to the state (e.g. spending money, creating a new entry)

strongly related to #7

@vincenthz vincenthz added the epic label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant