mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 19:50:36 +00:00
dca36e8b29
* Trace first block * Fixes for CalcTrieRoots * Timings of the CalcTrieRoot * Fix lint * Add memory profiling * Reduce allocations in StreamHash * Fix * Fix * Fix * Optimise allocations * Reuse streams * Fixes * Fix * Unit test fix * Fix lint * Reuse hashbuilder * No loop * Reuse resolver * Fixed tests * Fix test * Fix test * Fix test * Fix witness threshold * Optimise allocations in RLP transform * Optimise allocations in RLP transform * Optimise branchHash * 100 times again * Replace ToStream with Iterator * StreamMergeIterator * No streams * Amplification * Minimise the use of hashOnly * 100 times * Reduce stack operations * Reduce appends * More optimisations * More optimisations * More optimisations * local hex * Small fix * Remove test * Fix lint * Fix lint * Fix lint * Add test for empty * Fix lint * More tests * Fix lint * Add measurement of stateless exec
19 lines
394 B
Go
19 lines
394 B
Go
package rlphacks
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
// RlpSerializableTape is an abstraction for a tape that allows reading a sequence of
|
|
// RlpSerializable values.
|
|
type RlpSerializableTape interface {
|
|
Next() (RlpSerializable, error)
|
|
}
|
|
|
|
// RlpSerializable is a value that can be double-RLP coded.
|
|
type RlpSerializable interface {
|
|
ToDoubleRLP(io.Writer, []byte) error
|
|
DoubleRLPLen() int
|
|
RawBytes() []byte
|
|
}
|