Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Create Sequence module #5606

Closed
shuse2 opened this issue Aug 4, 2020 · 0 comments
Closed

Create Sequence module #5606

shuse2 opened this issue Aug 4, 2020 · 0 comments
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Aug 4, 2020

Description

  • Create SequenceModule class which extends BaseModule
  • Type should be 3
    • Move nonce validation for nonce lower than account nonce to beforeTransactionApply
    • Move nonce validation equal and increment logic from BaseTransaction to afterTransactionApply. Higher nonce should return a special error.

General concept

  • beforeTransactionApply
    • Validate transaction nonce
      • Throw error when nonce is lower than account nonce
  • afterTransactionApply
    • Validate nonce for equality
      • Throw error if not equal
      • Increment account nonce if valid

Motivation

The sequence module is a module to handle nonce for each transaction.

Acceptance criteria

  • All the unit tests are migrated to the sequence module unit test

Related Issues

#5603

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants