Account Numbers for Replay Protection with Account Pruning (#1077)

* in progress
* passes current tests
* added tests and got working
* changelog and docs
* removed prints
* oops
* works!
* issue in test_cli
* number 9 number 9 number 9
* at least it does only the 9 issue now
* hallelujah it works!
* removed print statement
* rebased
* gah
This commit is contained in:
Sunny Aggarwal
2018-06-12 04:30:54 +02:00
committed by Christopher Goes
parent 1b20adcd22
commit 161cb474d4
28 changed files with 337 additions and 173 deletions
+6 -4
View File
@@ -232,12 +232,14 @@ a standard form:
type StdSignature struct {
crypto.PubKey // optional
crypto.Signature
Sequence int64
AccountNumber int64
Sequence int64
}
It contains the signature itself, as well as the corresponding account's
sequence number. The sequence number is expected to increment every time a
message is signed by a given account. This prevents "replay attacks", where
It contains the signature itself, as well as the corresponding account's account and
sequence numbers. The sequence number is expected to increment every time a
message is signed by a given account. The account number stays the same and is assigned
when the account is first generated. These prevent "replay attacks", where
the same message could be executed over and over again.
The ``StdSignature`` can also optionally include the public key for verifying the