crypto/consensus: sign hashes and cache them for consensus payloads
Avoid serializing payload again and again for various purposes. To sign it, we only need a hash. Some 2.4% gain in TPS could be achieved with this.
This commit is contained in:
parent
49e9c1aa0f
commit
53c014a0bb
11 changed files with 119 additions and 42 deletions
|
@ -216,7 +216,7 @@ func TestECDSAVerify(t *testing.T) {
|
|||
|
||||
t.Run("invalid message", func(t *testing.T) {
|
||||
sign := priv.Sign(msg)
|
||||
runCase(t, false, false, sign, priv.PublicKey().Bytes(),
|
||||
runCase(t, true, false, sign, priv.PublicKey().Bytes(),
|
||||
stackitem.NewArray([]stackitem.Item{stackitem.NewByteArray(msg)}))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue