ethereum

package
v0.0.0-...-2da98db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEthereum        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEthereum          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEthereum = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Proof

type Proof struct {
	Keys   [][]byte `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	Values [][]byte `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
}

func NewProof

func NewProof() *Proof

func (*Proof) Delete

func (m *Proof) Delete(key []byte) error

func (*Proof) Descriptor

func (*Proof) Descriptor() ([]byte, []int)

func (*Proof) Get

func (m *Proof) Get(key []byte) ([]byte, error)

func (*Proof) GetKeys

func (m *Proof) GetKeys() [][]byte

func (*Proof) GetValues

func (m *Proof) GetValues() [][]byte

func (*Proof) Has

func (m *Proof) Has(key []byte) (bool, error)

func (*Proof) Marshal

func (m *Proof) Marshal() (dAtA []byte, err error)

func (*Proof) MarshalTo

func (m *Proof) MarshalTo(dAtA []byte) (int, error)

func (*Proof) MarshalToSizedBuffer

func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Proof) ProtoMessage

func (*Proof) ProtoMessage()

func (*Proof) Put

func (m *Proof) Put(key []byte, value []byte) error

func (*Proof) Reset

func (m *Proof) Reset()

func (*Proof) Size

func (m *Proof) Size() (n int)

func (*Proof) String

func (m *Proof) String() string

func (*Proof) Unmarshal

func (m *Proof) Unmarshal(dAtA []byte) error

func (*Proof) Verify

func (m *Proof) Verify(rootHash common.Hash, key int) ([]byte, error)

Verify verifies the proof against the given root hash and key. Typically, the rootHash is from a trusted source (e.g. a trusted block header), and the key is the index of the transaction in the block.

func (*Proof) XXX_DiscardUnknown

func (m *Proof) XXX_DiscardUnknown()

func (*Proof) XXX_Marshal

func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Proof) XXX_Merge

func (m *Proof) XXX_Merge(src proto.Message)

func (*Proof) XXX_Size

func (m *Proof) XXX_Size() int

func (*Proof) XXX_Unmarshal

func (m *Proof) XXX_Unmarshal(b []byte) error

type Trie

type Trie struct {
	*trie.Trie
}

func NewTrie

func NewTrie(list types.DerivableList) Trie

NewTrie builds a trie from a DerivableList. The DerivableList must be types.Transactions or types.Receipts.

func (*Trie) GenerateProof

func (t *Trie) GenerateProof(txIndex int) (*Proof, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL