Documentation ¶
Index ¶
- Constants
- Variables
- type BackedMemDb
- func (db *BackedMemDb) Close() error
- func (db *BackedMemDb) Delete(key []byte) error
- func (db *BackedMemDb) DeleteSync(key []byte) error
- func (db *BackedMemDb) Get(key []byte) ([]byte, error)
- func (db *BackedMemDb) Has(key []byte) (bool, error)
- func (db *BackedMemDb) Iterator(start, end []byte) (db.Iterator, error)
- func (db *BackedMemDb) NewBatch() db.Batch
- func (db *BackedMemDb) Print() error
- func (db *BackedMemDb) ReverseIterator(start, end []byte) (db.Iterator, error)
- func (db *BackedMemDb) Set(key []byte, value []byte) error
- func (db *BackedMemDb) SetSync(key []byte, value []byte) error
- func (db *BackedMemDb) Stats() map[string]string
- type DbAnswer
- type DbEvidenceMap
- type DbLotteryIdentity
- type DbProof
- type EpochDb
- func (edb *EpochDb) Clear()
- func (edb *EpochDb) DeleteFlipCid(cid []byte)
- func (edb *EpochDb) GetAnswerHash(address common.Address) common.Hash
- func (edb *EpochDb) GetAnswers() map[common.Address]common.Hash
- func (edb *EpochDb) GetConfirmedRespondents(start time.Time, end time.Time) []common.Address
- func (edb *EpochDb) HasAnswerHash(addr common.Address) bool
- func (edb *EpochDb) HasEvidenceMap(addr common.Address) bool
- func (edb *EpochDb) HasFlipCid(cid []byte) bool
- func (edb *EpochDb) HasSuccessfulOwnTx(txHash common.Hash) bool
- func (edb *EpochDb) IterateOverFlipCids(callback func(cid []byte))
- func (edb *EpochDb) ReadAnswers() (short []DbAnswer, long []DbAnswer)
- func (edb *EpochDb) ReadEvidenceMaps() []*DbEvidenceMap
- func (edb *EpochDb) ReadLotteryIdentities() []DbLotteryIdentity
- func (edb *EpochDb) ReadLotterySeed() []byte
- func (edb *EpochDb) ReadOwnShortAnswersBits() []byte
- func (edb *EpochDb) ReadOwnTx(txType uint16) []byte
- func (edb *EpochDb) ReadPrivateFlipKeys() []*types.PrivateFlipKeysPackage
- func (edb *EpochDb) ReadPublicFlipKeys() []*types.PublicFlipKey
- func (edb *EpochDb) RemoveAnswerHash(address common.Address)
- func (edb *EpochDb) RemoveEvidenceMap(addr common.Address)
- func (edb *EpochDb) RemoveOwnTx(txType uint16)
- func (edb *EpochDb) WriteAnswerHash(address common.Address, hash common.Hash, timestamp time.Time)
- func (edb *EpochDb) WriteAnswers(short []DbAnswer, long []DbAnswer)
- func (edb *EpochDb) WriteEvidenceMap(addr common.Address, bitmap []byte)
- func (edb *EpochDb) WriteFlipCid(cid []byte)
- func (edb *EpochDb) WriteLotteryIdentities(identities []DbLotteryIdentity)
- func (edb *EpochDb) WriteLotterySeed(seed []byte)
- func (edb *EpochDb) WriteOwnShortAnswers(answers *types.Answers)
- func (edb *EpochDb) WriteOwnTx(txType uint16, tx []byte)
- func (edb *EpochDb) WritePrivateFlipKey(key *types.PrivateFlipKeysPackage)
- func (edb *EpochDb) WritePublicFlipKey(key *types.PublicFlipKey)
- func (edb *EpochDb) WriteSuccessfulOwnTx(txHash common.Hash)
- type Repo
- func (r *Repo) AddToBlackList(txHash common.Hash)
- func (r *Repo) DeleteOutdatedBurntCoins(blockHeight uint64, blockRange uint64)
- func (r *Repo) FinishApplyingTx(txHash common.Hash)
- func (r *Repo) GetSavedEvents(contract common.Address) (events []*types.SavedEvent)
- func (r *Repo) GetSavedTxs(address common.Address, count int, token []byte) (txs []*types.SavedTransaction, nextToken []byte)
- func (r *Repo) GetTotalBurntCoins() []*types.BurntCoins
- func (r *Repo) HasApplyingTxLog(txHash common.Hash) bool
- func (r *Repo) IsInBlackList(txHash common.Hash) bool
- func (r *Repo) LastSnapshotManifest() (cidV2 []byte, root common.Hash, height uint64, fileName string)
- func (r *Repo) ReadActivity() *types.ActivityMonitor
- func (r *Repo) ReadBlockHeader(hash common.Hash) *types.Header
- func (r *Repo) ReadCanonicalHash(height uint64) common.Hash
- func (r *Repo) ReadCertificate(hash common.Hash) *types.BlockCert
- func (r *Repo) ReadConsensusVersion() uint32
- func (r *Repo) ReadHead() *types.Header
- func (r *Repo) ReadIdentityStateDiff(height uint64) []byte
- func (r *Repo) ReadIntermediateGenesis() uint64
- func (r *Repo) ReadPreliminaryConsensusVersion() uint32
- func (r *Repo) ReadPreliminaryHead() *types.Header
- func (r *Repo) ReadPreliminaryIntermediateGenesis() uint64
- func (r *Repo) ReadReceiptIndex(hash common.Hash) *types.TxReceiptIndex
- func (r *Repo) ReadTxIndex(hash common.Hash) *types.TransactionIndex
- func (r *Repo) ReadUpgradeVotes() *types.UpgradeVotes
- func (r *Repo) RemoveCanonicalHash(height uint64)
- func (r *Repo) RemoveHeader(hash common.Hash)
- func (r *Repo) RemovePreliminaryConsensusVersion(batch dbm.Batch)
- func (r *Repo) RemovePreliminaryHead(batch dbm.Batch)
- func (r *Repo) RemovePreliminaryIntermediateGenesis(batch dbm.Batch)
- func (r *Repo) SaveBurntCoins(blockHeight uint64, txHash common.Hash, address common.Address, key string, ...)
- func (r *Repo) SaveTx(address common.Address, blockHash common.Hash, timestamp int64, ...)
- func (r *Repo) SetHead(batch dbm.Batch, height uint64)
- func (r *Repo) StartApplyingTx(txHash common.Hash)
- func (r *Repo) WriteActivity(monitor *types.ActivityMonitor)
- func (r *Repo) WriteBlockHeader(header *types.Header)
- func (r *Repo) WriteCanonicalHash(height uint64, hash common.Hash)
- func (r *Repo) WriteCertificate(hash common.Hash, cert *types.BlockCert)
- func (r *Repo) WriteConsensusVersion(batch dbm.Batch, v uint32)
- func (r *Repo) WriteEvent(contract common.Address, txHash common.Hash, idx uint32, event *types.TxEvent)
- func (r *Repo) WriteFinalConsensus(hash common.Hash)
- func (r *Repo) WriteHead(batch dbm.Batch, header *types.Header)
- func (r *Repo) WriteIdentityStateDiff(height uint64, diff []byte)
- func (r *Repo) WriteIntermediateGenesis(batch dbm.Batch, height uint64)
- func (r *Repo) WriteLastSnapshotManifest(cidV2 []byte, root common.Hash, height uint64, fileNameV2 string) error
- func (r *Repo) WritePreliminaryConsensusVersion(v uint32)
- func (r *Repo) WritePreliminaryHead(header *types.Header)
- func (r *Repo) WritePreliminaryIntermediateGenesis(height uint64)
- func (r *Repo) WriteReceiptIndex(hash common.Hash, idx *types.TxReceiptIndex)
- func (r *Repo) WriteTxIndex(txHash common.Hash, index *types.TransactionIndex)
- func (r *Repo) WriteUpgradeVotes(votes *types.UpgradeVotes)
- func (r *Repo) WriteWeakCertificate(hash common.Hash)
Constants ¶
View Source
const (
MaxWeakCertificatesCount = 100
)
Variables ¶
View Source
var ( OwnShortAnswerKey = []byte("own-short") AnswerHashPrefix = []byte("hash") ShortAnswersKey = []byte("answers-short") LongShortAnswersKey = []byte("answers-long") TxOwnPrefix = []byte("tx") SuccessfulTxOwnPrefix = []byte("s-tx") EvidencePrefix = []byte("evi") LotterySeedKey = []byte("ls") FlipCidPrefix = []byte("cid") PublicFlipKeyPrefix = []byte("pubk") PrivateFlipKeyPrefix = []byte("pk") LotteryIdentities = []byte("li") )
View Source
var (
SnapshotDbPrefix = []byte("snpsht")
)
Functions ¶
This section is empty.
Types ¶
type BackedMemDb ¶
type BackedMemDb struct {
// contains filtered or unexported fields
}
func NewBackedMemDb ¶
func NewBackedMemDb(permanent db.DB) *BackedMemDb
func (*BackedMemDb) Close ¶
func (db *BackedMemDb) Close() error
func (*BackedMemDb) Delete ¶
func (db *BackedMemDb) Delete(key []byte) error
func (*BackedMemDb) DeleteSync ¶
func (db *BackedMemDb) DeleteSync(key []byte) error
func (*BackedMemDb) Iterator ¶
func (db *BackedMemDb) Iterator(start, end []byte) (db.Iterator, error)
func (*BackedMemDb) NewBatch ¶
func (db *BackedMemDb) NewBatch() db.Batch
func (*BackedMemDb) Print ¶
func (db *BackedMemDb) Print() error
func (*BackedMemDb) ReverseIterator ¶
func (db *BackedMemDb) ReverseIterator(start, end []byte) (db.Iterator, error)
func (*BackedMemDb) Stats ¶
func (db *BackedMemDb) Stats() map[string]string
type DbEvidenceMap ¶ added in v0.27.0
type DbLotteryIdentity ¶ added in v0.28.5
type EpochDb ¶
type EpochDb struct {
// contains filtered or unexported fields
}
func (*EpochDb) DeleteFlipCid ¶
func (*EpochDb) GetAnswerHash ¶
func (*EpochDb) GetConfirmedRespondents ¶
func (*EpochDb) HasFlipCid ¶
func (*EpochDb) HasSuccessfulOwnTx ¶
func (*EpochDb) IterateOverFlipCids ¶
func (*EpochDb) ReadAnswers ¶
func (*EpochDb) ReadEvidenceMaps ¶
func (edb *EpochDb) ReadEvidenceMaps() []*DbEvidenceMap
func (*EpochDb) ReadLotteryIdentities ¶ added in v0.28.5
func (edb *EpochDb) ReadLotteryIdentities() []DbLotteryIdentity
func (*EpochDb) ReadLotterySeed ¶
func (*EpochDb) ReadOwnShortAnswersBits ¶
func (*EpochDb) ReadPrivateFlipKeys ¶ added in v0.22.0
func (edb *EpochDb) ReadPrivateFlipKeys() []*types.PrivateFlipKeysPackage
func (*EpochDb) ReadPublicFlipKeys ¶ added in v0.22.0
func (edb *EpochDb) ReadPublicFlipKeys() []*types.PublicFlipKey
func (*EpochDb) RemoveAnswerHash ¶ added in v0.27.0
func (*EpochDb) RemoveEvidenceMap ¶ added in v0.27.0
func (*EpochDb) RemoveOwnTx ¶
func (*EpochDb) WriteAnswerHash ¶
func (*EpochDb) WriteAnswers ¶
func (*EpochDb) WriteEvidenceMap ¶
func (*EpochDb) WriteFlipCid ¶
func (*EpochDb) WriteLotteryIdentities ¶ added in v0.28.5
func (edb *EpochDb) WriteLotteryIdentities(identities []DbLotteryIdentity)
func (*EpochDb) WriteLotterySeed ¶
func (*EpochDb) WriteOwnShortAnswers ¶
func (*EpochDb) WriteOwnTx ¶
func (*EpochDb) WritePrivateFlipKey ¶ added in v0.22.0
func (edb *EpochDb) WritePrivateFlipKey(key *types.PrivateFlipKeysPackage)
func (*EpochDb) WritePublicFlipKey ¶ added in v0.22.0
func (edb *EpochDb) WritePublicFlipKey(key *types.PublicFlipKey)
func (*EpochDb) WriteSuccessfulOwnTx ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) AddToBlackList ¶ added in v1.0.0
func (*Repo) DeleteOutdatedBurntCoins ¶
func (*Repo) FinishApplyingTx ¶ added in v1.0.0
func (*Repo) GetSavedEvents ¶ added in v0.22.0
func (r *Repo) GetSavedEvents(contract common.Address) (events []*types.SavedEvent)
func (*Repo) GetSavedTxs ¶
func (*Repo) GetTotalBurntCoins ¶
func (r *Repo) GetTotalBurntCoins() []*types.BurntCoins
func (*Repo) HasApplyingTxLog ¶ added in v1.0.0
func (*Repo) LastSnapshotManifest ¶
func (*Repo) ReadActivity ¶
func (r *Repo) ReadActivity() *types.ActivityMonitor
func (*Repo) ReadConsensusVersion ¶ added in v0.23.0
func (*Repo) ReadIdentityStateDiff ¶
func (*Repo) ReadIntermediateGenesis ¶ added in v0.23.0
func (*Repo) ReadPreliminaryConsensusVersion ¶ added in v0.23.0
func (*Repo) ReadPreliminaryHead ¶
func (*Repo) ReadPreliminaryIntermediateGenesis ¶ added in v0.23.0
func (*Repo) ReadReceiptIndex ¶ added in v0.22.0
func (r *Repo) ReadReceiptIndex(hash common.Hash) *types.TxReceiptIndex
func (*Repo) ReadTxIndex ¶
func (r *Repo) ReadTxIndex(hash common.Hash) *types.TransactionIndex
func (*Repo) ReadUpgradeVotes ¶ added in v0.23.0
func (r *Repo) ReadUpgradeVotes() *types.UpgradeVotes
func (*Repo) RemoveCanonicalHash ¶
func (*Repo) RemoveHeader ¶
func (*Repo) RemovePreliminaryConsensusVersion ¶ added in v0.23.0
func (*Repo) RemovePreliminaryHead ¶
func (*Repo) RemovePreliminaryIntermediateGenesis ¶ added in v0.23.0
func (*Repo) SaveBurntCoins ¶
func (*Repo) StartApplyingTx ¶ added in v1.0.0
func (*Repo) WriteActivity ¶
func (r *Repo) WriteActivity(monitor *types.ActivityMonitor)
func (*Repo) WriteBlockHeader ¶
func (*Repo) WriteCanonicalHash ¶
func (*Repo) WriteCertificate ¶
func (*Repo) WriteConsensusVersion ¶ added in v0.23.0
func (*Repo) WriteEvent ¶ added in v0.22.0
func (*Repo) WriteFinalConsensus ¶
func (*Repo) WriteIdentityStateDiff ¶
func (*Repo) WriteIntermediateGenesis ¶ added in v0.23.0
func (*Repo) WriteLastSnapshotManifest ¶
func (*Repo) WritePreliminaryConsensusVersion ¶ added in v0.23.0
func (*Repo) WritePreliminaryHead ¶
func (*Repo) WritePreliminaryIntermediateGenesis ¶ added in v0.23.0
func (*Repo) WriteReceiptIndex ¶ added in v0.22.0
func (r *Repo) WriteReceiptIndex(hash common.Hash, idx *types.TxReceiptIndex)
func (*Repo) WriteTxIndex ¶
func (r *Repo) WriteTxIndex(txHash common.Hash, index *types.TransactionIndex)
func (*Repo) WriteUpgradeVotes ¶ added in v0.23.0
func (r *Repo) WriteUpgradeVotes(votes *types.UpgradeVotes)
func (*Repo) WriteWeakCertificate ¶
Click to show internal directories.
Click to hide internal directories.