Documentation ¶
Index ¶
- func BuildTxOpeningRandomize(nonce uint64, gasPrice *big.Int, randomizeAddr common.Address, ...) (*types.Transaction, error)
- func BuildTxSecretRandomize(nonce uint64, gasPrice *big.Int, randomizeAddr common.Address, ...) (*types.Transaction, error)
- func BuildTxSignBlockSigner(blockNumber *big.Int, blockHash common.Hash, nonce uint64, gasPrice *big.Int, ...) *types.Transaction
- func CreateTransactionSetOpening(chainConfig *params.ChainConfig, pool *core.TxPool, manager *accounts.Manager, ...) error
- func CreateTransactionSetSecret(chainConfig *params.ChainConfig, pool *core.TxPool, manager *accounts.Manager, ...) error
- func CreateTransactionSign(chainConfig *params.ChainConfig, pool *core.TxPool, manager *accounts.Manager, ...) error
- func Decrypt(key []byte, cryptoText string) string
- func DecryptRandomizeFromSecretsAndOpening(secrets [][32]byte, opening [32]byte) (int64, error)
- func Encrypt(key []byte, text string) string
- func GenerateM2FromRandomize(randomizes []int64, masternodes []common.Address) ([]common.Address, error)
- func GetBlockSignersFromContract(client bind.ContractBackend, blockHash common.Hash, blockNumber *big.Int) ([]common.Address, error)
- func GetBlockSignersFromState(statedb *state.StateDB, blockHash common.Hash) []common.Address
- func GetCandidateCapFromState(statedb *state.StateDB, candidate common.Address) *big.Int
- func GetCandidateOwnerFromState(statedb *state.StateDB, candidate common.Address) common.Address
- func GetCandidatesFromContract(client *ethclient.Client, blockNumber *big.Int) (map[common.Address]*big.Int, error)
- func GetCandidatesFromState(statedb *state.StateDB) []common.Address
- func GetLocDynamicArrAtElement(slotHash common.Hash, index uint64, elementSize uint64) common.Hash
- func GetLocFixedArrAtElement(slot uint64, index uint64, elementSize uint64) common.Hash
- func GetLocMappingAtKey(key common.Hash, slot uint64) *big.Int
- func GetLocOfStructElement(locOfStruct *big.Int, elementSlotInstruct *big.Int) common.Hash
- func GetLocSimpleVariable(slot uint64) common.Hash
- func GetOpeningFromState(statedb *state.StateDB, address common.Address) [32]byte
- func GetRandomizeFromContract(client bind.ContractBackend, addrMasternode common.Address, ...) (int64, error)
- func GetSecretFromState(statedb *state.StateDB, address common.Address) [][32]byte
- func GetVoterCapFromState(statedb *state.StateDB, candidate, voter common.Address) *big.Int
- func GetVotersFromState(statedb *state.StateDB, candidate common.Address) []common.Address
- func RandStringByte(n int) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTxOpeningRandomize ¶
func BuildTxOpeningRandomize(nonce uint64, gasPrice *big.Int, randomizeAddr common.Address, randomizeKey []byte) (*types.Transaction, error)
BuildTxOpeningRandomize Build tx to set opening into Randomize.
func BuildTxSecretRandomize ¶
func BuildTxSecretRandomize(nonce uint64, gasPrice *big.Int, randomizeAddr common.Address, epocNumber uint64, randomizeKey []byte) (*types.Transaction, error)
BuildTxSecretRandomize Build tx to set secret into Randomize.
func BuildTxSignBlockSigner ¶ added in v0.2.0
func BuildTxSignBlockSigner(blockNumber *big.Int, blockHash common.Hash, nonce uint64, gasPrice *big.Int, blockSigner common.Address) *types.Transaction
BuildTxSignBlockSigner Build tx to sign into BlockSigner.
func CreateTransactionSetOpening ¶ added in v0.2.0
func CreateTransactionSetOpening(chainConfig *params.ChainConfig, pool *core.TxPool, manager *accounts.Manager, header *types.Header, chainDb ethdb.Database, signer common.Address) error
CreateTransactionSetOpening Send tx set opening to smart contract randomize.
func CreateTransactionSetSecret ¶ added in v0.2.0
func CreateTransactionSetSecret(chainConfig *params.ChainConfig, pool *core.TxPool, manager *accounts.Manager, header *types.Header, chainDb ethdb.Database, signer common.Address) error
CreateTransactionSetSecret Send tx set secret to smart contract randomize.
func CreateTransactionSign ¶ added in v0.2.0
func CreateTransactionSign(chainConfig *params.ChainConfig, pool *core.TxPool, manager *accounts.Manager, eb common.Address, toSign, header *types.Header) error
CreateTransactionSign Send tx sign for block number to smart contract blockSigner.
func DecryptRandomizeFromSecretsAndOpening ¶
DecryptRandomizeFromSecretsAndOpening Decrypt randomize from secrets and opening.
func GenerateM2FromRandomize ¶ added in v0.2.2
func GenerateM2FromRandomize(randomizes []int64, masternodes []common.Address) ([]common.Address, error)
GenerateM2FromRandomize Generate m2 listing from randomize array.
func GetBlockSignersFromContract ¶ added in v0.2.2
func GetBlockSignersFromContract(client bind.ContractBackend, blockHash common.Hash, blockNumber *big.Int) ([]common.Address, error)
GetBlockSignersFromContract Get signers signed for blockHash from blockSigner contract.
func GetBlockSignersFromState ¶ added in v0.2.2
func GetCandidateCapFromState ¶ added in v0.2.0
func GetCandidateOwnerFromState ¶ added in v0.2.0
func GetCandidatesFromContract ¶ added in v0.2.2
func GetCandidatesFromContract(client *ethclient.Client, blockNumber *big.Int) (map[common.Address]*big.Int, error)
GetCandidatesFromContract get candidates and caps from contract
func GetCandidatesFromState ¶ added in v0.2.0
func GetLocDynamicArrAtElement ¶ added in v0.2.0
func GetLocFixedArrAtElement ¶ added in v0.2.0
func GetLocMappingAtKey ¶ added in v0.2.0
func GetLocOfStructElement ¶ added in v0.2.0
func GetLocSimpleVariable ¶ added in v0.2.0
func GetOpeningFromState ¶ added in v0.2.0
func GetRandomizeFromContract ¶ added in v0.2.0
func GetRandomizeFromContract(client bind.ContractBackend, addrMasternode common.Address, blockNumber *big.Int) (int64, error)
GetRandomizeFromContract random from randomize contract.
func GetSecretFromState ¶ added in v0.2.0
func GetVoterCapFromState ¶ added in v0.2.0
func GetVotersFromState ¶ added in v0.2.0
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package checkpointoracle is a an on-chain light client checkpoint oracle.
|
Package checkpointoracle is a an on-chain light client checkpoint oracle. |