Documentation ¶
Overview ¶
Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Index ¶
- func BadgerDB(path string) (*badgerDB, error)
- func LeafIndex(value uint64) (res *leafIndex)
- func MemoryDb() (res *blockDb)
- func Mmr(hasher Hasher, db IStore) *mmr
- func NodeIndex(value uint64) (res *nodeIndex)
- type BlockData
- type Hash
- type Hasher
- type IBlockIndex
- type IMountainRange
- type IStore
- type MmrProof
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IBlockIndex ¶
type IBlockIndex interface { //Returns left hand branch from current GetLeftBranch() IBlockIndex //Get Peak Block from current GetTop() IBlockIndex //Get upper block navigating by right mountain side //If current block is left side - return nli RightUp() IBlockIndex //Check if current block is right side sibling IsRight() bool //Returns sibling // If current brunch is left - return right sibling // If current brunch is right - return left sibling GetSibling() IBlockIndex //Get height of this block GetHeight() uint64 //Get Index of the block // if it's a leaf - returns leaf index // if it's a node - returns node index Index() uint64 //Get Block data Value(mmr *mmr) (*BlockData, bool) //Set block value SetValue(mmr *mmr, data *BlockData) }
MMR Blocks navigation abstraction Might be two types of MMR block
- Leafs. It's a bottom layer, representing block data
- Nodes. It's a Mountain nodes data, representing aggregation of bottom layers