-
Notifications
You must be signed in to change notification settings - Fork 16
/
receipt.go
29 lines (22 loc) · 1.12 KB
/
receipt.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2017-2018 The qitmeer developers
package types
import "github.com/Qitmeer/qng/common/hash"
// block execution event, ex. validator change event
type Event []byte
type BlockReceipt struct {
BlockNumber uint64
// The merkle root of storage trie (for kv)
StorageRoot hash.Hash
// The merkle root for change logs trie
// 1.) ordered storage keys that changed the storage, k also map to tx(one or many) (how them changed)
// 2.) a parent MT also linked, which representing changes happened over the last change range of blocks.
// which refer to block(s) that caused the change rather than the tx included from the current block
// which provide proof that any group of change range blocks either don't change a storage item
// or can find out which tx exactly did.
ChangeRoot hash.Hash
// The event digest of a block, which is chain-specific, useful for light-clients.
// Events are an array of data fragments that runtime encode events for light-client
// for example authority set changes (ex. validator set changes)
// fast warp sync by tracking validator set changes trustlessly
Events []Event
}