Skip to content

AIP #61 v5: NewState and Accounting #398

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

Closed
3 tasks done
elpiel opened this issue Apr 19, 2021 · 0 comments
Closed
3 tasks done

AIP #61 v5: NewState and Accounting #398

elpiel opened this issue Apr 19, 2021 · 0 comments
Labels
primitives Changes regarding the `primitives` crate

Comments

@elpiel
Copy link
Member

elpiel commented Apr 19, 2021

Sentry

NewState and Accounting should contain 2 balances maps (for earners and spenders) and we need to be able to distinguish between them:

  • balances - earners map
  • balancesSpenders - spenders map

IMPORTANT: Although there is division in 2 maps of the balances, the state_root should contain both (i.e. the should be merged into a single tree)

balancesSpenders - in order to avoid duplication when merging the two maps, spenderLeafs should be hashed by hash("spender", spender, totalSpent) (notice the string slice included when hashing to create a different hash than the earners map)

Accounting:

@elpiel elpiel added the primitives Changes regarding the `primitives` crate label Apr 19, 2021
@elpiel elpiel closed this as completed Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
primitives Changes regarding the `primitives` crate
Projects
None yet
Development

No branches or pull requests

1 participant