Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeRoundHash(nodeId crypto.Hash, number uint64, snapshots []*common.Snapshot) (uint64, uint64, crypto.Hash)
- func LoadRoundGraph(store storage.Store, networkId, idForNetwork crypto.Hash) (map[crypto.Hash]*CacheRound, map[crypto.Hash]*FinalRound, error)
- func TestMockDiff(at time.Duration)
- func TestMockReset()
- type CNode
- type CNodeWork
- type CacheRound
- type Chain
- func (chain *Chain) AddSnapshot(final *FinalRound, cache *CacheRound, s *common.Snapshot, ...) error
- func (chain *Chain) AggregateMintWork()
- func (chain *Chain) AppendCosiAction(m *CosiAction) error
- func (chain *Chain) AppendFinalSnapshot(peerId crypto.Hash, s *common.Snapshot) error
- func (chain *Chain) AppendSelfEmpty(s *common.Snapshot) error
- func (chain *Chain) ConsensusKeys(round, timestamp uint64) ([]crypto.Hash, []*crypto.Key)
- func (chain *Chain) ConsumeFinalActions()
- func (chain *Chain) IsPledging() bool
- func (chain *Chain) QueuePollSnapshots()
- func (chain *Chain) StateCopy() (*CacheRound, *FinalRound)
- func (chain *Chain) StepForward()
- func (chain *Chain) Teardown()
- type ChainRound
- type ChainState
- type CosiAction
- type CosiAggregator
- type CosiChainData
- type CosiVerifier
- type FinalRound
- type Genesis
- type Node
- func (node *Node) Authenticate(msg []byte) (crypto.Hash, string, error)
- func (node *Node) BuildAuthenticationMessage() []byte
- func (node *Node) BuildGraph() []*network.SyncPoint
- func (node *Node) CachePutTransaction(peerId crypto.Hash, tx *common.VersionedTransaction) error
- func (node *Node) CacheVerify(snap crypto.Hash, sig crypto.Signature, pub crypto.Key) bool
- func (node *Node) CacheVerifyCosi(snap crypto.Hash, sig *crypto.CosiSignature, cids []crypto.Hash, ...) ([]crypto.Hash, bool)
- func (node *Node) CheckBroadcastedToPeers() bool
- func (node *Node) CheckCatchUpWithPeers() bool
- func (node *Node) ConsensusReady(cn *CNode, timestamp uint64) bool
- func (node *Node) ConsensusThreshold(timestamp uint64) int
- func (node *Node) CosiAggregateSelfCommitments(peerId crypto.Hash, snap crypto.Hash, commitment *crypto.Key, wantTx bool) error
- func (node *Node) CosiAggregateSelfResponses(peerId crypto.Hash, snap crypto.Hash, response *[32]byte) error
- func (node *Node) CosiQueueExternalAnnouncement(peerId crypto.Hash, s *common.Snapshot, commitment *crypto.Key) error
- func (node *Node) CosiQueueExternalChallenge(peerId crypto.Hash, snap crypto.Hash, cosi *crypto.CosiSignature, ...) error
- func (node *Node) ElectionLoop()
- func (node *Node) GetAcceptedOrPledgingNode(id crypto.Hash) *CNode
- func (node *Node) GetCacheStore() *fastcache.Cache
- func (node *Node) GetOrCreateChain(id crypto.Hash) *Chain
- func (node *Node) Import(configDir string, source storage.Store) error
- func (node *Node) ListMintWorks(batch uint64) (map[crypto.Hash][2]uint64, error)
- func (node *Node) ListenNeighbors() error
- func (node *Node) LoadAllChains(store storage.Store, networkId crypto.Hash) error
- func (node *Node) LoadCacheToQueue() error
- func (node *Node) LoadConsensusNodes() error
- func (node *Node) LoadGenesis(configDir string) error
- func (node *Node) LoadNodeConfig()
- func (node *Node) Loop() error
- func (node *Node) MintLoop()
- func (node *Node) NetworkId() crypto.Hash
- func (node *Node) NodesListWithoutState(threshold uint64, acceptedOnly bool) []*CNode
- func (node *Node) PingNeighborsFromConfig() error
- func (node *Node) PledgeAmount(ts uint64) common.Integer
- func (node *Node) PledgingNode(timestamp uint64) *CNode
- func (node *Node) PoolInfo() (uint64, uint64)
- func (node *Node) PoolSize() (common.Integer, error)
- func (node *Node) QueueTransaction(tx *common.VersionedTransaction) (string, error)
- func (node *Node) ReadAllNodesWithoutState() []crypto.Hash
- func (node *Node) ReadSnapshotsForNodeRound(nodeIdWithNetwork crypto.Hash, round uint64) ([]*common.SnapshotWithTopologicalOrder, error)
- func (node *Node) ReadSnapshotsSinceTopology(offset, count uint64) ([]*common.SnapshotWithTopologicalOrder, error)
- func (node *Node) SPS() float64
- func (node *Node) SendTransactionToPeer(peerId, hash crypto.Hash) error
- func (node *Node) Teardown()
- func (node *Node) TopoWrite(s *common.Snapshot, signers []crypto.Hash) *common.SnapshotWithTopologicalOrder
- func (node *Node) TopologicalOrder() uint64
- func (node *Node) UpdateNeighbors(neighbors []string) error
- func (node *Node) UpdateSyncPoint(peerId crypto.Hash, points []*network.SyncPoint)
- func (node *Node) Uptime() time.Duration
- func (node *Node) VerifyAndQueueAppendSnapshotFinalization(peerId crypto.Hash, s *common.Snapshot) error
- func (node *Node) WitnessSnapshot(s *common.SnapshotWithTopologicalOrder) *SnapshotWitness
- type PeerSnapshot
- type SnapshotWitness
- type TopologicalSequence
Constants ¶
View Source
const ( FinalPoolSlotsLimit = config.SnapshotSyncRoundThreshold * 8 FinalPoolRoundSizeLimit = 1024 CachePoolSnapshotsLimit = 8192 )
View Source
const ( CosiActionSelfEmpty = iota CosiActionSelfCommitment CosiActionSelfResponse CosiActionExternalAnnouncement CosiActionExternalChallenge CosiActionFinalization )
View Source
const ( GraphOperationClassAtomic = 0x00 GraphOperationClassNormalLedger = 0x01 MainnetNodeRemovalConsensusForkTimestamp = 1590000000000000000 )
View Source
const ( MainnetMintPeriodForkBatch = 72 MainnetMintPeriodForkTimeBegin = 6 MainnetMintPeriodForkTimeEnd = 18 MainnetMintWorkDistributionForkBatch = 729 )
View Source
const (
MainnetAcceptPeriodForkSnapshotHash = "b8855c19a38999f283d9be6daa45147aef47cc6d35007673f62390c2e137e4e1"
)
View Source
const (
MinimumNodeCount = 7
)
Variables ¶
View Source
var (
SnapshotRoundDayLeapForkHack, _ = time.Parse(time.RFC3339, "2021-02-19T00:00:00Z")
TransactionEmptyOutputsForkHack = "ed6114706e8a0491c6b254167a9812128f5b29e88594ff8656cc69f4e5b410ce"
TransactionScriptThresholdForkHack = "2a311e994281ab384f1d86fca7b7f2ef30ac34e5ba65dea16b976eb342e4f7ec"
TransactionDepositOutputsForkHacks = map[string]bool{
"5ae19842fa0d10ac13f4215a37f9eed3d7563f9af6a1b7ac3d412e05e49254b3": true,
"f0ae6ae9f615ac1fda8899e6aa57e07e679f94e65dca0439a32a80b1f0e31ac2": true,
"2c9d45385d9ebf19b87fb1bbbd638e489740cf86d10d1ca747eb09f13f5b6c12": true,
"22082e074b5e8305ff07ab85bdecc0e7db8ad7e33b73976af860d6f8e2cc3d3e": true,
"783c3a88a2e04e3a51c3870194899221bb5c5192caccc6e3eee7f34aa755a0fc": true,
"1bd2038a94b4d8eb1bb2000613cb2c13cba7580cbf4cfc5ba1e43297796bda6a": true,
"1d5a283fbee042ca6e2d2adfd5506271903c83c2d8f27e82ee5e91253d940405": true,
"98540003449eb7645a9ff870c9006aae79dd0b32954b72cccf0f95cd536f031e": true,
"59acca27ad0615296972cdcbe8c3cf350fba761ca1b25101ffeb37d25df957f5": true,
"282647c057c8dd5babdf52c2a673f5530a464f1e076c62b6fe2700064781a503": true,
"247259fed1e4fdbe9b9a0356bbf0a956b4369f11cd507a0900f32c5f988d82b7": true,
"a1e0dd89d687cd7de3782d5e6e8449a1e95b99b4ad63a584f9267fb01695547a": true,
"b22a507f975c8783a075ff6b76a2932bde730a0a48916c3b98dbc5ff5fce0b43": true,
"bdb6467e14dc10edcca5e89af4198b3ab1cdabc8a2423486103b8f6c4895645e": true,
"e37d71f64fd25fa31de4633963b3f0a15bff4718c057def74565345af8e58e86": true,
"82db9b856e4ba24846a72f47d934c7cd760a1f8db8987545908eb7176e071e3b": true,
"3db5113b4ff7435bffff4aff01f751766f2f0fc17570b437a77d63758e906e98": true,
"0204f4356a5c79339b894869cb4a9d3bae2a448a20e11fb83e065a8efa2296cb": true,
"93f7132751bb629420fa8fe37d2e387930353d87b9e3fc6dd5ff612828567230": true,
"777942079b1c32a4367d90a93980859fc61ee445b06d075e07f46cc1e80b41c0": true,
"7aae17087a36a3d039a886e550fd2b967c9e75902d9f80f09f25e30cd9ff3dd3": true,
"39eba79d23fb089c9fd91607b32792c8edb6f807d09b0d3ca32a8108030e09d6": true,
"5b9616fdc8eaca2bc139147a6c52f93abc61bf54f6e32acba2d1112476c17ff3": true,
"ce4f56e565a7f148a87a36800a2412fe3e7e5d12cfcc06cfb932478baa13cce6": true,
"a77ad863c5fc8e0c9977919036d3d48ab9e085044b6d96321c7909c5fd6da0d7": true,
"e0407dbba91b5a492d46d5e4dd0f2b49ab4080a3560ec4cf3605d96e6d6af342": true,
"6c4c52566f209f99d01f719fc8d85765389e235fa41ce6de3229e7b127c143e8": true,
"85b2008ff3ca74b541e089df1c9b65813bc84b97d78d393625cdb36440bab23f": true,
"5241897a340af1c57d1efd37781223121b5c9bc9a7690e1dcea4a72a0e2b7f56": true,
"12c90f0d5d926506fb814b52fd5997a5df076e2e68cd14d62473d4067c0e4718": true,
"8d0181131e2ad45df111d86b757818e8973c16d9819ce9024c5261a185cadae0": true,
"62d85394f05863fa62f8dcb9c2613731785378e6ab25d69af572305fd626f934": true,
"948cd6e2a42e3ff678dc46f3318590b41ffe3295d224faada8408da112c102cc": true,
"b03e942f21857437ad172453f344b3c4c437303116cb344f9a90dd0cf5bd85ed": true,
"b4bd75ff8749778a8b203e6e312f612df62c59cb8fa97e5fe715c2729499f247": true,
"75f403f6c40ff41ccedcf100c2f03b0d9b845f8b484d9f8f6ae616ddb75982ca": true,
"222fde94ab0bdd9b6e4a1edeeff5f5a6f4d4a715641b6d14e8bcb882c061ec7b": true,
"56e88f457aee1e3fb010b9d9d75eba8a5760922de4fb1066f7193689c1e558c2": true,
"d6676b1a195aa7e74eee73cac844237a138f2f6b52a8045a24c3d1958ca35a98": true,
"0bd6bd79f537a702a5940004abecf29cecab808b606b710a63ec2b88228cfe24": true,
"aeb33e2acfc96880e3a62be7f9853a89344730e3907862399bbba225b084738e": true,
"bfeceedbc15a333049d3601282511f577e0441dc052bad4f0ba021dd7b294466": true,
"3e06d73ff94dfa9e2424c5f329f4783b124a4b2efc1ca334e17eda929a267232": true,
"920c11fc4314488c6a917285ef9112c69e16691d2cdfa35d4e966526f87f31d8": true,
"95bef697b5f42b880da76d5ad76b8678a310a085ae3eb5a33f72b7b2e6ad1490": true,
"ce98b2e73a2275aa33936a2dddb4eb85a4adaf7ed31cb37546e9e114d3ca14b8": true,
"43fb2c892adce56955b5d175d33d0cc8c1636fb4dc35e9ccce84c19fa0114a0a": true,
"7dd37bb332bd29a7444b6852e1a66bad98b2391968801a270f721f6a30a1385a": true,
"f13cb53fdfb02ff6063b25c088fb458912d5137bfdb5c26ad643a57790e187e1": true,
"9a089d8bc03f03e3373ea8602def58a677d219ccfede2a370201be98dbdcbe0e": true,
"57e821b9daf6bf6a703c07bf53236538938eb0977dd0a04a832341a29267f0a9": true,
"dedb3b62b85e6e973bec219b97c513a1ff77562e519c1c29c68b4d7f4d6a59bb": true,
"255139774fa9a0c21ea6133f7fb5663170d37de4c45adec9a883883e5ccbf3c8": true,
"52191a55ea52e350d253bc899279c76fb9dddb077d2d474b3723515e991175a7": true,
"6fa11c9afc7d05c44372616d7e0c385d960dd9aa18f38086a2df22e58faacf40": true,
"8fd5b64b1ca49a6982f7eeb8291c85aa31ab66b84413005668c1594ad6bd820f": true,
"98a533cebd2babcf0275e506cfb0cf336f1a81cddbea4fd5fc4f2fad98537b39": true,
"418204438add112369b08f22dd2941e10ec176aafd9ee39dd1931e1646e6f7d8": true,
"9ec41718bdf7e9cb4a9acae833bafb44a083d53677d65822d56c0925f6e50266": true,
"920f4907ca379f97a3e4e2a86b260990007abdfe54537a4020571ef9949f5b65": true,
"128d814d659d367054d670296a192e4e4f01aa1d22871b72f2765a660bbb1eb9": true,
"5df7bb239e84b53fca5652e2a333a446b9f9e4102593ef4360467997db9d9f44": true,
"713f4d6e9f40e6f7abd108a484d45b3ec464ebd3cef2fb0c4109345979fea6e7": true,
"2ea11629e2eb73988c996e63b1e4eeb743cb37279d9ad635588fcf47127b4ee4": true,
"8218347433ed554f82747b442b469062b9a8fa75b0a3480432bb1819f158c898": true,
"4f07e8e961793234be9aea766d2f4ffa101ec8caef346ff1941338394767a615": true,
"2d2b9c931a7db30d5daac2ffdbee524053b3dd9e8d3611de1e67e07b3df2b4da": true,
"f7b92c29d6eb1352008218af78cb55628112e21df70c52b9e65d4aa47b2619ac": true,
"5f248587bcdc55bd6bbf891aed124cec4989b2f5388331352f3802b3069dd854": true,
"aae1f18dbbe814ee232b9d10222af17d434d2efe62ac0818cba284cc0e03d2bc": true,
"5155bdff11442ba5c98ef0f4dac7ed44e2d19044de87944791064a5baddf8ee2": true,
"6423ba4d6f33283bba3ac6a2d6754f0c98834d6abe1265ea5e59ecd09ac7255b": true,
"887dfc1ed552a9cde3d205a08c0060c91f3bf627f056e561bdc604e97c47ae2f": true,
"fa5adb8581d3b8a0eb64ddd9f891e31b9a1cc59ee5b010521488158827eed0b8": true,
"07d0a66bd5b05797d2c9a70791e42c1a30d6a9645a25efcba6dc6bd7d3b06be0": true,
"33f41344055525169f2539a48ba9a42fb5a925308ce5c5412fe03dcd703aad62": true,
"f4e04c67673fdf9e99c78246b6260270e674a64a2f7c294530d518fb904b8aae": true,
"b1fed05c2d88dd733cfe31583c6e8fb72d33e1a78fa4ae3d456f2bad87d0c03e": true,
"e4a5687ec341e1612b162f01ebb1c20f394b3edca28cc2ac1547d2c0fb92aff4": true,
"d8e22fd9d4f3ddd2f702f9bba8904581a097bd7d2bdac228f7dbf76de642435b": true,
"960b5199b4f5fe8387d59736d8565daae7c2017d24e8604c03eeed7b30db0c3e": true,
"f492c42d001f62ccd610202e2e913200967ec1d07fb0b4b2775c3026c6eed9ea": true,
"b2120a5183057ec8f009450b5726202b653fa61d665f72585cf1c6548759199e": true,
"7afb727d67a50b7f5547172cd61c22de26835e886e2fa526045cbffbf33ddf1f": true,
"f55b2765a57e3ce2082dd552e5ca5e4a2074e63e4c9675a9588e7ace335921bb": true,
"2325114ba2114e22498500e99dd01df660d5b71647ac7945be7a879c91dccc6a": true,
"ba2ce228ccd13b191bc931a858c3f4ccdd86cf5de3a031df45b9d2f7ee6b075e": true,
"326ac7c9e77883614ff00ea647fedbe27d521c69041f92828b1cb0a03129ee88": true,
"265449a27a185ae1487c2de8d43c63e15c4558a23e358be32ecd25eecf4ebe53": true,
"d8723431ac2c27d87f6469b4f00415ec3613167d758b2e07195a85acfee99d55": true,
"e4a6533905ebdb0e97a817b97976726f7f942512fc91dfe3087b7ed2cba76d53": true,
"655df34bcd57361ab695a56ad0b898c06ca5db654a7dc7ca82daec4c939c0a1b": true,
"acc4062a171fbe3281d438e785646b7be5b45bb1ab5de90d293bc40b27fea094": true,
"dd5a37fec8e7dd694ffcea6e982706c14c25c505a0679ac97fdcef0c2f0d53c7": true,
"70366a6aff2b87e5aced02b3144a2469c323ebb21382b8592d9e9fec513b6cb4": true,
"9d5f214422716dbbefa1b66cea7fd4fcd80e37994f8f91791c638353511dec2c": true,
"96075f3f66c05734df94efe821f5830c70c10bcc51a1cd17161d6f6722cfe0de": true,
"4d964cb6b6ac2673541012b53f372711f7d844aebad0d44dad45ff9d690996c4": true,
"eac44543714a457e12e6fed45878afdac77c80b5b77ff55019a3a8295ec93a55": true,
"6f11a227f925986c2309854ad8c9947be3a6f7a7b5c149f1afc2809eb85c0702": true,
}
)
View Source
var ( MintPool common.Integer MintLiquidity common.Integer MintYearBatches int MintNodeMaximum int )
View Source
var ( MainnetRollingRemovalForkTransactionMap = map[string]bool{ "d5af53561d99eb52af2b98b57d3fb0cc8ae4c6449ec6c89d8427201051a947a2": true, "aef48f91a3d6ffebc2dd0178d47de66cee222e48827adbf339d4197d5eee8af9": true, "f77436fd09c2248b79a8f54321e0332d247af489b26d4a4216d8eeb3596e8d4b": true, "b1ccc15b4e6c97e1d41ccaffc2c933368c03c9d0ef80c45f9fa41d013b23be22": true, "e369448593bdb04c1ab9dd9d6536ea6ac91a49e1b8fdb8374ea1d896034267bc": true, "6182da6d3e7bcee9d7a215edc04015aac1c6a9d4a84cef34e6c4fcbbd8d6cadf": true, "5447772e29a35487fc42e6d10ba2b7ea6a7d77f99181b8a6f7ae25e964ff0994": true, "246de39853bcffeb885aa27df9e6df0e19ddfcee1967b29c2c81e86b386affde": true, "04f7ba291b44f838e8e784e76561455e9f068c0dedd750870e16169cdfb6a660": true, "3d3f223aaeab0bc54ded3420c9949b1c871d1b0e245c3f53362cf99ccaadf337": true, "c3c46410adfd1ebf8a3753d5d685fffd31a3c72c62118a678731e6292b2a426d": true, "b26b3accf232512924087fc810a3ace700d8ccfd75a392e7403471465bc1a886": true, "1c5883bc30f0caec912cc94011aa4ade2131cd63d21e652fdc8e49d62d79d73f": true, "356c9511de0a621f87cb6c98be7bc8ace90a7c8021ea02ba7cfe71f94c8348c3": true, "86cbbefd4b1a4ebf84fa6c7429c278032bf79cef0ce00ec0bb4c7bbb081dde72": true, "ad1d3884c9335580ccea6cfb2a66cfb95f9bb77431cf5fda80c66028d796963e": true, "46001500b12a3247e4a00fb32ac42f865f8bf320e01f55eee76aefe898b1cbb6": true, "4a0ddc369fe4cf60118bb5dc58729841c356c807ca9cc6c2cc62516576d65fb2": true, "98bcb9acfebcbd666a423f9f4628a2946ce1939e9f3ba5653270774686d6df1b": true, "7fa19dbf5c014d37485412d90b2d60e14b4778c969c0b5da253d2538795cb0e3": true, "35ba9f06bcf68ffab52d4fddfab6be11a7eddd8cf94baf10500a289ea97031af": true, "46ae3d3d5c173f0b691250d7a3b24ba02731d7b9eae1808c655c0ca031b70cb6": true, "ba7c57177d12c7a598bb1ac5ffc1c0ac52926f170da6baf438098b607d15f5c1": true, "23e5e0b13eec7413116011b78a1a2bac0bc2070f02a6999d69a5c604e555b9b1": true, "3e85d0329530a04c0132cb69c50b59103e7db405865de3dce41854d203778184": true, "c3918ece3f938448e2a573ec88b0a5cedd2449d6fb2af21804a1dd24fa9b4c29": true, "65da3f839b795bd57a52638767621ec9bc764b929a23ca26ebfc5cf49686b28e": true, "a133c2b154e8103b39bca963acb7f545838e06f784dcfaa761fc6ef2163b850e": true, "494a9b4326ffb2d22e53cd62945a349b2c205a2a1f3288ca8bee47446e535af8": true, "b99fb0d60318c48d793840700789009ff34ff4632e788a7e71138bdae4772d59": true, "0213977d3c00a91de68904fb03ce3982e139200a2ce2e6f5332c9c3fb83743c5": true, "d598c36ed84b4318dffbeb81efac93be2bfd22a76f5099eef8e6a5b508628a8a": true, } )
Functions ¶
func ComputeRoundHash ¶ added in v0.2.10
func LoadRoundGraph ¶
func TestMockDiff ¶ added in v0.6.2
func TestMockReset ¶ added in v0.8.3
func TestMockReset()
Types ¶
type CacheRound ¶
type CacheRound struct { NodeId crypto.Hash Number uint64 Timestamp uint64 References *common.RoundLink Snapshots []*common.Snapshot `msgpack:"-"` }
func (*CacheRound) Copy ¶
func (c *CacheRound) Copy() *CacheRound
func (*CacheRound) Gap ¶
func (c *CacheRound) Gap() (uint64, uint64)
func (*CacheRound) ValidateSnapshot ¶
func (c *CacheRound) ValidateSnapshot(s *common.Snapshot) error
type Chain ¶ added in v0.9.0
type Chain struct { sync.RWMutex ChainId crypto.Hash ConsensusInfo *CNode State *ChainState CosiAggregators map[crypto.Hash]*CosiAggregator CosiVerifiers map[crypto.Hash]*CosiVerifier CachePool *util.RingBuffer FinalPool [FinalPoolSlotsLimit]*ChainRound FinalIndex int FinalCount int // contains filtered or unexported fields }
func (*Chain) AddSnapshot ¶ added in v0.9.1
func (chain *Chain) AddSnapshot(final *FinalRound, cache *CacheRound, s *common.Snapshot, signers []crypto.Hash) error
func (*Chain) AggregateMintWork ¶ added in v0.11.0
func (chain *Chain) AggregateMintWork()
func (*Chain) AppendCosiAction ¶ added in v0.9.0
func (chain *Chain) AppendCosiAction(m *CosiAction) error
func (*Chain) AppendFinalSnapshot ¶ added in v0.9.0
func (*Chain) AppendSelfEmpty ¶ added in v0.9.0
func (*Chain) ConsensusKeys ¶ added in v0.9.1
func (*Chain) ConsumeFinalActions ¶ added in v0.9.0
func (chain *Chain) ConsumeFinalActions()
func (*Chain) IsPledging ¶ added in v0.9.1
func (*Chain) QueuePollSnapshots ¶ added in v0.9.0
func (chain *Chain) QueuePollSnapshots()
func (*Chain) StateCopy ¶ added in v0.9.1
func (chain *Chain) StateCopy() (*CacheRound, *FinalRound)
func (*Chain) StepForward ¶ added in v0.9.0
func (chain *Chain) StepForward()
type ChainRound ¶ added in v0.9.0
type ChainRound struct { Number uint64 Size int Timestamp uint64 Snapshots [FinalPoolRoundSizeLimit]*PeerSnapshot // contains filtered or unexported fields }
type ChainState ¶ added in v0.9.0
type ChainState struct { CacheRound *CacheRound FinalRound *FinalRound RoundHistory []*FinalRound RoundLinks map[crypto.Hash]uint64 }
type CosiAction ¶ added in v0.5.0
type CosiAggregator ¶ added in v0.5.0
type CosiChainData ¶ added in v0.9.1
type CosiChainData struct { PN *CNode CN *CNode TX *common.VersionedTransaction F bool }
type CosiVerifier ¶ added in v0.5.0
type FinalRound ¶
type FinalRound struct { NodeId crypto.Hash Number uint64 Start uint64 End uint64 Hash crypto.Hash }
func (*FinalRound) Common ¶ added in v0.9.4
func (f *FinalRound) Common() *common.Round
func (*FinalRound) Copy ¶
func (f *FinalRound) Copy() *FinalRound
type Genesis ¶
type Genesis struct { Epoch int64 `json:"epoch"` Nodes []struct { Signer common.Address `json:"signer"` Payee common.Address `json:"payee"` Balance common.Integer `json:"balance"` } `json:"nodes"` Domains []struct { Signer common.Address `json:"signer"` Balance common.Integer `json:"balance"` } `json:"domains"` }
type Node ¶
type Node struct { IdForNetwork crypto.Hash Signer common.Address Listener string Peer *network.Peer TopoCounter *TopologicalSequence SyncPoints *syncMap GraphTimestamp uint64 Epoch uint64 // contains filtered or unexported fields }
func (*Node) BuildAuthenticationMessage ¶
func (*Node) BuildGraph ¶
func (*Node) CachePutTransaction ¶
func (*Node) CacheVerify ¶
func (*Node) CacheVerifyCosi ¶ added in v0.5.0
func (*Node) CheckBroadcastedToPeers ¶ added in v0.2.12
func (*Node) CheckCatchUpWithPeers ¶ added in v0.2.12
func (*Node) ConsensusReady ¶ added in v0.9.1
An accepted node can sign transactions only when it satisfies either: 1. It is a genesis node. 2. It has been accepted more than 12 hours.
func (*Node) ConsensusThreshold ¶ added in v0.5.0
func (*Node) CosiAggregateSelfCommitments ¶ added in v0.5.0
func (*Node) CosiAggregateSelfResponses ¶ added in v0.5.0
func (*Node) CosiQueueExternalAnnouncement ¶ added in v0.5.0
func (*Node) CosiQueueExternalChallenge ¶ added in v0.5.0
func (node *Node) CosiQueueExternalChallenge(peerId crypto.Hash, snap crypto.Hash, cosi *crypto.CosiSignature, ver *common.VersionedTransaction) error
func (*Node) ElectionLoop ¶ added in v0.3.5
func (node *Node) ElectionLoop()
func (*Node) GetAcceptedOrPledgingNode ¶ added in v0.9.1
func (*Node) GetCacheStore ¶ added in v0.2.18
func (*Node) GetOrCreateChain ¶ added in v0.9.0
func (*Node) ListMintWorks ¶ added in v0.11.1
func (*Node) ListenNeighbors ¶
func (*Node) LoadAllChains ¶ added in v0.9.0
func (*Node) LoadCacheToQueue ¶
func (*Node) LoadConsensusNodes ¶
func (*Node) LoadGenesis ¶
func (*Node) LoadNodeConfig ¶ added in v0.2.15
func (node *Node) LoadNodeConfig()
func (*Node) NodesListWithoutState ¶ added in v0.9.1
func (*Node) PingNeighborsFromConfig ¶ added in v0.7.25
func (*Node) PledgeAmount ¶ added in v0.11.1
func (*Node) PledgingNode ¶ added in v0.9.1
func (*Node) QueueTransaction ¶ added in v0.1.2
func (node *Node) QueueTransaction(tx *common.VersionedTransaction) (string, error)
func (*Node) ReadAllNodesWithoutState ¶ added in v0.9.1
func (*Node) ReadSnapshotsForNodeRound ¶
func (*Node) ReadSnapshotsSinceTopology ¶
func (node *Node) ReadSnapshotsSinceTopology(offset, count uint64) ([]*common.SnapshotWithTopologicalOrder, error)
func (*Node) SendTransactionToPeer ¶
func (*Node) TopologicalOrder ¶ added in v0.1.2
func (*Node) UpdateNeighbors ¶ added in v0.8.3
func (*Node) UpdateSyncPoint ¶
func (*Node) VerifyAndQueueAppendSnapshotFinalization ¶ added in v0.5.0
func (*Node) WitnessSnapshot ¶ added in v0.9.7
func (node *Node) WitnessSnapshot(s *common.SnapshotWithTopologicalOrder) *SnapshotWitness
type PeerSnapshot ¶ added in v0.9.0
type SnapshotWitness ¶ added in v0.9.7
type TopologicalSequence ¶
func (*TopologicalSequence) TopoStats ¶ added in v0.9.0
func (topo *TopologicalSequence) TopoStats()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.