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

transaction logic for snapp transactions #5820

Merged
merged 7 commits into from
Sep 8, 2020

Conversation

imeckler
Copy link
Member

This PR implements the transaction logic for snapp transactions. Each snapp command has 1 or 2 parties (plus an optional fee payer). Associated to each party is

  • an authorization (a signature, proof, or both)
  • a predicate (a condition that must be true at the time of application, either a complex snapp_predicate or a nonce)
  • an update (a series of modifications to that party's state, including changing the balance, snapp state, and delegate)

We can apply a snapp transaction by first processing the optional fee payer, and then for each party

  • checking the authorization (this is done elsewhere, in the transaction pool and diff validation code)
  • checking the predicate
  • checking that the update is permitted according to the account's permissions
  • applying the update.

@imeckler imeckler requested a review from a team as a code owner August 31, 2020 22:17
Copy link
Member

@mrmr1993 mrmr1993 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. The TODOs will need doing, but approving assuming they will happen layer.

Base automatically changed from feature/snapp-types-rewrite to develop September 4, 2020 20:59
@imeckler imeckler added ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge-into-develop labels Sep 4, 2020
@mergify mergify bot merged commit 413e4a6 into develop Sep 8, 2020
@mergify mergify bot deleted the feature/snapp-transaction-logic-rewrite branch September 8, 2020 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge-into-develop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants