smc

package
v0.0.0-...-c85edb6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

README

Sharding Manager Contract (Deprecated)

In the original sharding approach, the system was designed to be handled via a smart contract known as sharding manager contract (SMC) on the main chain. This contract would allow for implicit finality using transactions submitting shard block headers to SMC which would then be mined onto a main chain block. However, this system is bounded by gas and the limited functionality of EVM 1.0. That is, the number of shards realistically could only grow as much as SMC could handle.

In the current approach, SMC was deprecated for beacon chain that has links to the main chain by containing hashes of canonical main chain blocks within its own block construction. Check out our design doc which summarizes our thoughts for replacing SMC with a minimal viable beacon chain and merge aspects of our current work in geth-sharding into this new beacon chain that we can use for demonstration purposes.

Documentation

Index

Constants

View Source
const SMCABI = "" /* 5423-byte string literal not displayed */

SMCABI is the input ABI used to generate the binding from.

View Source
const SMCBin = `` /* 6908-byte string literal not displayed */

SMCBin is the compiled bytecode used for deploying new contracts.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMC

type SMC struct {
	SMCCaller     // Read-only binding to the contract
	SMCTransactor // Write-only binding to the contract
	SMCFilterer   // Log filterer for contract events
}

SMC is an auto generated Go binding around an Ethereum contract.

func DeploySMC

func DeploySMC(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SMC, error)

DeploySMC deploys a new Ethereum contract, binding an instance of SMC to it.

func NewSMC

func NewSMC(address common.Address, backend bind.ContractBackend) (*SMC, error)

NewSMC creates a new instance of SMC, bound to a specific deployed contract.

type SMCAttesterDeregistered

type SMCAttesterDeregistered struct {
	Attester           common.Address
	PoolIndex          *big.Int
	DeregisteredPeriod *big.Int
	Raw                types.Log // Blockchain specific contextual infos
}

SMCAttesterDeregistered represents a AttesterDeregistered event raised by the SMC contract.

type SMCAttesterDeregisteredIterator

type SMCAttesterDeregisteredIterator struct {
	Event *SMCAttesterDeregistered // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SMCAttesterDeregisteredIterator is returned from FilterAttesterDeregistered and is used to iterate over the raw logs and unpacked data for AttesterDeregistered events raised by the SMC contract.

func (*SMCAttesterDeregisteredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*SMCAttesterDeregisteredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*SMCAttesterDeregisteredIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type SMCAttesterRegistered

type SMCAttesterRegistered struct {
	Attester  common.Address
	PoolIndex *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

SMCAttesterRegistered represents a AttesterRegistered event raised by the SMC contract.

type SMCAttesterRegisteredIterator

type SMCAttesterRegisteredIterator struct {
	Event *SMCAttesterRegistered // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SMCAttesterRegisteredIterator is returned from FilterAttesterRegistered and is used to iterate over the raw logs and unpacked data for AttesterRegistered events raised by the SMC contract.

func (*SMCAttesterRegisteredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*SMCAttesterRegisteredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*SMCAttesterRegisteredIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type SMCAttesterReleased

type SMCAttesterReleased struct {
	Attester  common.Address
	PoolIndex *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

SMCAttesterReleased represents a AttesterReleased event raised by the SMC contract.

type SMCAttesterReleasedIterator

type SMCAttesterReleasedIterator struct {
	Event *SMCAttesterReleased // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SMCAttesterReleasedIterator is returned from FilterAttesterReleased and is used to iterate over the raw logs and unpacked data for AttesterReleased events raised by the SMC contract.

func (*SMCAttesterReleasedIterator) Close

func (it *SMCAttesterReleasedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*SMCAttesterReleasedIterator) Error

func (it *SMCAttesterReleasedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*SMCAttesterReleasedIterator) Next

func (it *SMCAttesterReleasedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type SMCCaller

type SMCCaller struct {
	// contains filtered or unexported fields
}

SMCCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewSMCCaller

func NewSMCCaller(address common.Address, caller bind.ContractCaller) (*SMCCaller, error)

NewSMCCaller creates a new read-only instance of SMC, bound to a specific deployed contract.

func (*SMCCaller) AttesterPool

func (_SMC *SMCCaller) AttesterPool(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error)

AttesterPool is a free data retrieval call binding the contract method 0xa1943b42.

Solidity: function attesterPool( uint256) constant returns(address)

func (*SMCCaller) AttesterPoolLength

func (_SMC *SMCCaller) AttesterPoolLength(opts *bind.CallOpts) (*big.Int, error)

AttesterPoolLength is a free data retrieval call binding the contract method 0x375246d9.

Solidity: function attesterPoolLength() constant returns(uint256)

func (*SMCCaller) AttesterRegistry

func (_SMC *SMCCaller) AttesterRegistry(opts *bind.CallOpts, arg0 common.Address) (struct {
	DeregisteredPeriod *big.Int
	PoolIndex          *big.Int
	Balance            *big.Int
	Deposited          bool
}, error)

AttesterRegistry is a free data retrieval call binding the contract method 0xfd2943da.

Solidity: function attesterRegistry( address) constant returns(deregisteredPeriod uint256, poolIndex uint256, balance uint256, deposited bool)

func (*SMCCaller) CHALLENGEPERIOD

func (_SMC *SMCCaller) CHALLENGEPERIOD(opts *bind.CallOpts) (*big.Int, error)

CHALLENGEPERIOD is a free data retrieval call binding the contract method 0xc3a079ed.

Solidity: function CHALLENGE_PERIOD() constant returns(uint256)

func (*SMCCaller) CollationRecords

func (_SMC *SMCCaller) CollationRecords(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (struct {
	ChunkRoot [32]byte
	Proposer  common.Address
	IsElected bool
	Signature [32]byte
}, error)

CollationRecords is a free data retrieval call binding the contract method 0xe9e0b683.

Solidity: function collationRecords( uint256, uint256) constant returns(chunkRoot bytes32, proposer address, isElected bool, signature bytes32)

func (*SMCCaller) CurrentVote

func (_SMC *SMCCaller) CurrentVote(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error)

CurrentVote is a free data retrieval call binding the contract method 0x0c8da4cc.

Solidity: function currentVote( uint256) constant returns(bytes32)

func (*SMCCaller) GetAttesterInCommittee

func (_SMC *SMCCaller) GetAttesterInCommittee(opts *bind.CallOpts, _shardId *big.Int) (common.Address, error)

GetAttesterInCommittee is a free data retrieval call binding the contract method 0x7d6c5302.

Solidity: function getAttesterInCommittee(_shardId uint256) constant returns(address)

func (*SMCCaller) GetVoteCount

func (_SMC *SMCCaller) GetVoteCount(opts *bind.CallOpts, _shardId *big.Int) (*big.Int, error)

GetVoteCount is a free data retrieval call binding the contract method 0xb2c2f2e8.

Solidity: function getVoteCount(_shardId uint256) constant returns(uint256)

func (*SMCCaller) HasVoted

func (_SMC *SMCCaller) HasVoted(opts *bind.CallOpts, _shardId *big.Int, _index *big.Int) (bool, error)

HasVoted is a free data retrieval call binding the contract method 0x64390ff1.

Solidity: function hasVoted(_shardId uint256, _index uint256) constant returns(bool)

func (*SMCCaller) LastApprovedCollation

func (_SMC *SMCCaller) LastApprovedCollation(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error)

LastApprovedCollation is a free data retrieval call binding the contract method 0x97d369a2.

Solidity: function lastApprovedCollation( uint256) constant returns(uint256)

func (*SMCCaller) LastSubmittedCollation

func (_SMC *SMCCaller) LastSubmittedCollation(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error)

LastSubmittedCollation is a free data retrieval call binding the contract method 0x83ceeabe.

Solidity: function lastSubmittedCollation( uint256) constant returns(uint256)

func (*SMCCaller) ShardCount

func (_SMC *SMCCaller) ShardCount(opts *bind.CallOpts) (*big.Int, error)

ShardCount is a free data retrieval call binding the contract method 0x04e9c77a.

Solidity: function shardCount() constant returns(uint256)

type SMCCallerRaw

type SMCCallerRaw struct {
	Contract *SMCCaller // Generic read-only contract binding to access the raw methods on
}

SMCCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*SMCCallerRaw) Call

func (_SMC *SMCCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type SMCCallerSession

type SMCCallerSession struct {
	Contract *SMCCaller    // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

SMCCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*SMCCallerSession) AttesterPool

func (_SMC *SMCCallerSession) AttesterPool(arg0 *big.Int) (common.Address, error)

AttesterPool is a free data retrieval call binding the contract method 0xa1943b42.

Solidity: function attesterPool( uint256) constant returns(address)

func (*SMCCallerSession) AttesterPoolLength

func (_SMC *SMCCallerSession) AttesterPoolLength() (*big.Int, error)

AttesterPoolLength is a free data retrieval call binding the contract method 0x375246d9.

Solidity: function attesterPoolLength() constant returns(uint256)

func (*SMCCallerSession) AttesterRegistry

func (_SMC *SMCCallerSession) AttesterRegistry(arg0 common.Address) (struct {
	DeregisteredPeriod *big.Int
	PoolIndex          *big.Int
	Balance            *big.Int
	Deposited          bool
}, error)

AttesterRegistry is a free data retrieval call binding the contract method 0xfd2943da.

Solidity: function attesterRegistry( address) constant returns(deregisteredPeriod uint256, poolIndex uint256, balance uint256, deposited bool)

func (*SMCCallerSession) CHALLENGEPERIOD

func (_SMC *SMCCallerSession) CHALLENGEPERIOD() (*big.Int, error)

CHALLENGEPERIOD is a free data retrieval call binding the contract method 0xc3a079ed.

Solidity: function CHALLENGE_PERIOD() constant returns(uint256)

func (*SMCCallerSession) CollationRecords

func (_SMC *SMCCallerSession) CollationRecords(arg0 *big.Int, arg1 *big.Int) (struct {
	ChunkRoot [32]byte
	Proposer  common.Address
	IsElected bool
	Signature [32]byte
}, error)

CollationRecords is a free data retrieval call binding the contract method 0xe9e0b683.

Solidity: function collationRecords( uint256, uint256) constant returns(chunkRoot bytes32, proposer address, isElected bool, signature bytes32)

func (*SMCCallerSession) CurrentVote

func (_SMC *SMCCallerSession) CurrentVote(arg0 *big.Int) ([32]byte, error)

CurrentVote is a free data retrieval call binding the contract method 0x0c8da4cc.

Solidity: function currentVote( uint256) constant returns(bytes32)

func (*SMCCallerSession) GetAttesterInCommittee

func (_SMC *SMCCallerSession) GetAttesterInCommittee(_shardId *big.Int) (common.Address, error)

GetAttesterInCommittee is a free data retrieval call binding the contract method 0x7d6c5302.

Solidity: function getAttesterInCommittee(_shardId uint256) constant returns(address)

func (*SMCCallerSession) GetVoteCount

func (_SMC *SMCCallerSession) GetVoteCount(_shardId *big.Int) (*big.Int, error)

GetVoteCount is a free data retrieval call binding the contract method 0xb2c2f2e8.

Solidity: function getVoteCount(_shardId uint256) constant returns(uint256)

func (*SMCCallerSession) HasVoted

func (_SMC *SMCCallerSession) HasVoted(_shardId *big.Int, _index *big.Int) (bool, error)

HasVoted is a free data retrieval call binding the contract method 0x64390ff1.

Solidity: function hasVoted(_shardId uint256, _index uint256) constant returns(bool)

func (*SMCCallerSession) LastApprovedCollation

func (_SMC *SMCCallerSession) LastApprovedCollation(arg0 *big.Int) (*big.Int, error)

LastApprovedCollation is a free data retrieval call binding the contract method 0x97d369a2.

Solidity: function lastApprovedCollation( uint256) constant returns(uint256)

func (*SMCCallerSession) LastSubmittedCollation

func (_SMC *SMCCallerSession) LastSubmittedCollation(arg0 *big.Int) (*big.Int, error)

LastSubmittedCollation is a free data retrieval call binding the contract method 0x83ceeabe.

Solidity: function lastSubmittedCollation( uint256) constant returns(uint256)

func (*SMCCallerSession) ShardCount

func (_SMC *SMCCallerSession) ShardCount() (*big.Int, error)

ShardCount is a free data retrieval call binding the contract method 0x04e9c77a.

Solidity: function shardCount() constant returns(uint256)

type SMCFilterer

type SMCFilterer struct {
	// contains filtered or unexported fields
}

SMCFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewSMCFilterer

func NewSMCFilterer(address common.Address, filterer bind.ContractFilterer) (*SMCFilterer, error)

NewSMCFilterer creates a new log filterer instance of SMC, bound to a specific deployed contract.

func (*SMCFilterer) FilterAttesterDeregistered

func (_SMC *SMCFilterer) FilterAttesterDeregistered(opts *bind.FilterOpts) (*SMCAttesterDeregisteredIterator, error)

FilterAttesterDeregistered is a free log retrieval operation binding the contract event 0xd7731db8678a142362195505e228a3625ff64ce27c12ff97dd5c4b859a2346c1.

Solidity: event AttesterDeregistered(attester address, poolIndex uint256, deregisteredPeriod uint256)

func (*SMCFilterer) FilterAttesterRegistered

func (_SMC *SMCFilterer) FilterAttesterRegistered(opts *bind.FilterOpts) (*SMCAttesterRegisteredIterator, error)

FilterAttesterRegistered is a free log retrieval operation binding the contract event 0x9e36cf4a00da2cfda2c9456ba639ee573dbdf53e4487daf51b66d98232d726cc.

Solidity: event AttesterRegistered(attester address, poolIndex uint256)

func (*SMCFilterer) FilterAttesterReleased

func (_SMC *SMCFilterer) FilterAttesterReleased(opts *bind.FilterOpts) (*SMCAttesterReleasedIterator, error)

FilterAttesterReleased is a free log retrieval operation binding the contract event 0x0953df78e93a11708482200aba752831b653dcd4bc029159b6830e8e5e1099fc.

Solidity: event AttesterReleased(attester address, poolIndex uint256)

func (*SMCFilterer) FilterHeaderAdded

func (_SMC *SMCFilterer) FilterHeaderAdded(opts *bind.FilterOpts, shardId []*big.Int) (*SMCHeaderAddedIterator, error)

FilterHeaderAdded is a free log retrieval operation binding the contract event 0x2d0a86178d2fd307b47be157a766e6bee19bc26161c32f9781ee0e818636f09c.

Solidity: event HeaderAdded(shardId indexed uint256, chunkRoot bytes32, period uint256, proposerAddress address)

func (*SMCFilterer) FilterVoteSubmitted

func (_SMC *SMCFilterer) FilterVoteSubmitted(opts *bind.FilterOpts, shardId []*big.Int) (*SMCVoteSubmittedIterator, error)

FilterVoteSubmitted is a free log retrieval operation binding the contract event 0xc99370212b708f699fb6945a17eb34d0fc1ccd5b45d88f4d9682593a45d6e833.

Solidity: event VoteSubmitted(shardId indexed uint256, chunkRoot bytes32, period uint256, attesterAddress address)

func (*SMCFilterer) WatchAttesterDeregistered

func (_SMC *SMCFilterer) WatchAttesterDeregistered(opts *bind.WatchOpts, sink chan<- *SMCAttesterDeregistered) (event.Subscription, error)

WatchAttesterDeregistered is a free log subscription operation binding the contract event 0xd7731db8678a142362195505e228a3625ff64ce27c12ff97dd5c4b859a2346c1.

Solidity: event AttesterDeregistered(attester address, poolIndex uint256, deregisteredPeriod uint256)

func (*SMCFilterer) WatchAttesterRegistered

func (_SMC *SMCFilterer) WatchAttesterRegistered(opts *bind.WatchOpts, sink chan<- *SMCAttesterRegistered) (event.Subscription, error)

WatchAttesterRegistered is a free log subscription operation binding the contract event 0x9e36cf4a00da2cfda2c9456ba639ee573dbdf53e4487daf51b66d98232d726cc.

Solidity: event AttesterRegistered(attester address, poolIndex uint256)

func (*SMCFilterer) WatchAttesterReleased

func (_SMC *SMCFilterer) WatchAttesterReleased(opts *bind.WatchOpts, sink chan<- *SMCAttesterReleased) (event.Subscription, error)

WatchAttesterReleased is a free log subscription operation binding the contract event 0x0953df78e93a11708482200aba752831b653dcd4bc029159b6830e8e5e1099fc.

Solidity: event AttesterReleased(attester address, poolIndex uint256)

func (*SMCFilterer) WatchHeaderAdded

func (_SMC *SMCFilterer) WatchHeaderAdded(opts *bind.WatchOpts, sink chan<- *SMCHeaderAdded, shardId []*big.Int) (event.Subscription, error)

WatchHeaderAdded is a free log subscription operation binding the contract event 0x2d0a86178d2fd307b47be157a766e6bee19bc26161c32f9781ee0e818636f09c.

Solidity: event HeaderAdded(shardId indexed uint256, chunkRoot bytes32, period uint256, proposerAddress address)

func (*SMCFilterer) WatchVoteSubmitted

func (_SMC *SMCFilterer) WatchVoteSubmitted(opts *bind.WatchOpts, sink chan<- *SMCVoteSubmitted, shardId []*big.Int) (event.Subscription, error)

WatchVoteSubmitted is a free log subscription operation binding the contract event 0xc99370212b708f699fb6945a17eb34d0fc1ccd5b45d88f4d9682593a45d6e833.

Solidity: event VoteSubmitted(shardId indexed uint256, chunkRoot bytes32, period uint256, attesterAddress address)

type SMCHeaderAdded

type SMCHeaderAdded struct {
	ShardId         *big.Int
	ChunkRoot       [32]byte
	Period          *big.Int
	ProposerAddress common.Address
	Raw             types.Log // Blockchain specific contextual infos
}

SMCHeaderAdded represents a HeaderAdded event raised by the SMC contract.

type SMCHeaderAddedIterator

type SMCHeaderAddedIterator struct {
	Event *SMCHeaderAdded // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SMCHeaderAddedIterator is returned from FilterHeaderAdded and is used to iterate over the raw logs and unpacked data for HeaderAdded events raised by the SMC contract.

func (*SMCHeaderAddedIterator) Close

func (it *SMCHeaderAddedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*SMCHeaderAddedIterator) Error

func (it *SMCHeaderAddedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*SMCHeaderAddedIterator) Next

func (it *SMCHeaderAddedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type SMCRaw

type SMCRaw struct {
	Contract *SMC // Generic contract binding to access the raw methods on
}

SMCRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*SMCRaw) Call

func (_SMC *SMCRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*SMCRaw) Transact

func (_SMC *SMCRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*SMCRaw) Transfer

func (_SMC *SMCRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type SMCSession

type SMCSession struct {
	Contract     *SMC              // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

SMCSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*SMCSession) AddHeader

func (_SMC *SMCSession) AddHeader(_shardId *big.Int, _period *big.Int, _chunkRoot [32]byte, _signature [32]byte) (*types.Transaction, error)

AddHeader is a paid mutator transaction binding the contract method 0xc4d5f198.

Solidity: function addHeader(_shardId uint256, _period uint256, _chunkRoot bytes32, _signature bytes32) returns()

func (*SMCSession) AttesterPool

func (_SMC *SMCSession) AttesterPool(arg0 *big.Int) (common.Address, error)

AttesterPool is a free data retrieval call binding the contract method 0xa1943b42.

Solidity: function attesterPool( uint256) constant returns(address)

func (*SMCSession) AttesterPoolLength

func (_SMC *SMCSession) AttesterPoolLength() (*big.Int, error)

AttesterPoolLength is a free data retrieval call binding the contract method 0x375246d9.

Solidity: function attesterPoolLength() constant returns(uint256)

func (*SMCSession) AttesterRegistry

func (_SMC *SMCSession) AttesterRegistry(arg0 common.Address) (struct {
	DeregisteredPeriod *big.Int
	PoolIndex          *big.Int
	Balance            *big.Int
	Deposited          bool
}, error)

AttesterRegistry is a free data retrieval call binding the contract method 0xfd2943da.

Solidity: function attesterRegistry( address) constant returns(deregisteredPeriod uint256, poolIndex uint256, balance uint256, deposited bool)

func (*SMCSession) CHALLENGEPERIOD

func (_SMC *SMCSession) CHALLENGEPERIOD() (*big.Int, error)

CHALLENGEPERIOD is a free data retrieval call binding the contract method 0xc3a079ed.

Solidity: function CHALLENGE_PERIOD() constant returns(uint256)

func (*SMCSession) CollationRecords

func (_SMC *SMCSession) CollationRecords(arg0 *big.Int, arg1 *big.Int) (struct {
	ChunkRoot [32]byte
	Proposer  common.Address
	IsElected bool
	Signature [32]byte
}, error)

CollationRecords is a free data retrieval call binding the contract method 0xe9e0b683.

Solidity: function collationRecords( uint256, uint256) constant returns(chunkRoot bytes32, proposer address, isElected bool, signature bytes32)

func (*SMCSession) CurrentVote

func (_SMC *SMCSession) CurrentVote(arg0 *big.Int) ([32]byte, error)

CurrentVote is a free data retrieval call binding the contract method 0x0c8da4cc.

Solidity: function currentVote( uint256) constant returns(bytes32)

func (*SMCSession) DeregisterAttester

func (_SMC *SMCSession) DeregisterAttester() (*types.Transaction, error)

DeregisterAttester is a paid mutator transaction binding the contract method 0x07f9ccd1.

Solidity: function deregisterAttester() returns()

func (*SMCSession) GetAttesterInCommittee

func (_SMC *SMCSession) GetAttesterInCommittee(_shardId *big.Int) (common.Address, error)

GetAttesterInCommittee is a free data retrieval call binding the contract method 0x7d6c5302.

Solidity: function getAttesterInCommittee(_shardId uint256) constant returns(address)

func (*SMCSession) GetVoteCount

func (_SMC *SMCSession) GetVoteCount(_shardId *big.Int) (*big.Int, error)

GetVoteCount is a free data retrieval call binding the contract method 0xb2c2f2e8.

Solidity: function getVoteCount(_shardId uint256) constant returns(uint256)

func (*SMCSession) HasVoted

func (_SMC *SMCSession) HasVoted(_shardId *big.Int, _index *big.Int) (bool, error)

HasVoted is a free data retrieval call binding the contract method 0x64390ff1.

Solidity: function hasVoted(_shardId uint256, _index uint256) constant returns(bool)

func (*SMCSession) LastApprovedCollation

func (_SMC *SMCSession) LastApprovedCollation(arg0 *big.Int) (*big.Int, error)

LastApprovedCollation is a free data retrieval call binding the contract method 0x97d369a2.

Solidity: function lastApprovedCollation( uint256) constant returns(uint256)

func (*SMCSession) LastSubmittedCollation

func (_SMC *SMCSession) LastSubmittedCollation(arg0 *big.Int) (*big.Int, error)

LastSubmittedCollation is a free data retrieval call binding the contract method 0x83ceeabe.

Solidity: function lastSubmittedCollation( uint256) constant returns(uint256)

func (*SMCSession) RegisterAttester

func (_SMC *SMCSession) RegisterAttester() (*types.Transaction, error)

RegisterAttester is a paid mutator transaction binding the contract method 0x4f81e119.

Solidity: function registerAttester() returns()

func (*SMCSession) ReleaseAttester

func (_SMC *SMCSession) ReleaseAttester() (*types.Transaction, error)

ReleaseAttester is a paid mutator transaction binding the contract method 0x0340f4bf.

Solidity: function releaseAttester() returns()

func (*SMCSession) ShardCount

func (_SMC *SMCSession) ShardCount() (*big.Int, error)

ShardCount is a free data retrieval call binding the contract method 0x04e9c77a.

Solidity: function shardCount() constant returns(uint256)

func (*SMCSession) SubmitVote

func (_SMC *SMCSession) SubmitVote(_shardId *big.Int, _period *big.Int, _index *big.Int, _chunkRoot [32]byte) (*types.Transaction, error)

SubmitVote is a paid mutator transaction binding the contract method 0x4f33ffa0.

Solidity: function submitVote(_shardId uint256, _period uint256, _index uint256, _chunkRoot bytes32) returns()

type SMCTransactor

type SMCTransactor struct {
	// contains filtered or unexported fields
}

SMCTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewSMCTransactor

func NewSMCTransactor(address common.Address, transactor bind.ContractTransactor) (*SMCTransactor, error)

NewSMCTransactor creates a new write-only instance of SMC, bound to a specific deployed contract.

func (*SMCTransactor) AddHeader

func (_SMC *SMCTransactor) AddHeader(opts *bind.TransactOpts, _shardId *big.Int, _period *big.Int, _chunkRoot [32]byte, _signature [32]byte) (*types.Transaction, error)

AddHeader is a paid mutator transaction binding the contract method 0xc4d5f198.

Solidity: function addHeader(_shardId uint256, _period uint256, _chunkRoot bytes32, _signature bytes32) returns()

func (*SMCTransactor) DeregisterAttester

func (_SMC *SMCTransactor) DeregisterAttester(opts *bind.TransactOpts) (*types.Transaction, error)

DeregisterAttester is a paid mutator transaction binding the contract method 0x07f9ccd1.

Solidity: function deregisterAttester() returns()

func (*SMCTransactor) RegisterAttester

func (_SMC *SMCTransactor) RegisterAttester(opts *bind.TransactOpts) (*types.Transaction, error)

RegisterAttester is a paid mutator transaction binding the contract method 0x4f81e119.

Solidity: function registerAttester() returns()

func (*SMCTransactor) ReleaseAttester

func (_SMC *SMCTransactor) ReleaseAttester(opts *bind.TransactOpts) (*types.Transaction, error)

ReleaseAttester is a paid mutator transaction binding the contract method 0x0340f4bf.

Solidity: function releaseAttester() returns()

func (*SMCTransactor) SubmitVote

func (_SMC *SMCTransactor) SubmitVote(opts *bind.TransactOpts, _shardId *big.Int, _period *big.Int, _index *big.Int, _chunkRoot [32]byte) (*types.Transaction, error)

SubmitVote is a paid mutator transaction binding the contract method 0x4f33ffa0.

Solidity: function submitVote(_shardId uint256, _period uint256, _index uint256, _chunkRoot bytes32) returns()

type SMCTransactorRaw

type SMCTransactorRaw struct {
	Contract *SMCTransactor // Generic write-only contract binding to access the raw methods on
}

SMCTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*SMCTransactorRaw) Transact

func (_SMC *SMCTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*SMCTransactorRaw) Transfer

func (_SMC *SMCTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type SMCTransactorSession

type SMCTransactorSession struct {
	Contract     *SMCTransactor    // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

SMCTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*SMCTransactorSession) AddHeader

func (_SMC *SMCTransactorSession) AddHeader(_shardId *big.Int, _period *big.Int, _chunkRoot [32]byte, _signature [32]byte) (*types.Transaction, error)

AddHeader is a paid mutator transaction binding the contract method 0xc4d5f198.

Solidity: function addHeader(_shardId uint256, _period uint256, _chunkRoot bytes32, _signature bytes32) returns()

func (*SMCTransactorSession) DeregisterAttester

func (_SMC *SMCTransactorSession) DeregisterAttester() (*types.Transaction, error)

DeregisterAttester is a paid mutator transaction binding the contract method 0x07f9ccd1.

Solidity: function deregisterAttester() returns()

func (*SMCTransactorSession) RegisterAttester

func (_SMC *SMCTransactorSession) RegisterAttester() (*types.Transaction, error)

RegisterAttester is a paid mutator transaction binding the contract method 0x4f81e119.

Solidity: function registerAttester() returns()

func (*SMCTransactorSession) ReleaseAttester

func (_SMC *SMCTransactorSession) ReleaseAttester() (*types.Transaction, error)

ReleaseAttester is a paid mutator transaction binding the contract method 0x0340f4bf.

Solidity: function releaseAttester() returns()

func (*SMCTransactorSession) SubmitVote

func (_SMC *SMCTransactorSession) SubmitVote(_shardId *big.Int, _period *big.Int, _index *big.Int, _chunkRoot [32]byte) (*types.Transaction, error)

SubmitVote is a paid mutator transaction binding the contract method 0x4f33ffa0.

Solidity: function submitVote(_shardId uint256, _period uint256, _index uint256, _chunkRoot bytes32) returns()

type SMCVoteSubmitted

type SMCVoteSubmitted struct {
	ShardId         *big.Int
	ChunkRoot       [32]byte
	Period          *big.Int
	AttesterAddress common.Address
	Raw             types.Log // Blockchain specific contextual infos
}

SMCVoteSubmitted represents a VoteSubmitted event raised by the SMC contract.

type SMCVoteSubmittedIterator

type SMCVoteSubmittedIterator struct {
	Event *SMCVoteSubmitted // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SMCVoteSubmittedIterator is returned from FilterVoteSubmitted and is used to iterate over the raw logs and unpacked data for VoteSubmitted events raised by the SMC contract.

func (*SMCVoteSubmittedIterator) Close

func (it *SMCVoteSubmittedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*SMCVoteSubmittedIterator) Error

func (it *SMCVoteSubmittedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*SMCVoteSubmittedIterator) Next

func (it *SMCVoteSubmittedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL