Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EthashSeedHash ¶
EthashSeedHash is the seed to use for generating a vrification cache and the mining dataset.
func MakeDataset ¶
MakeDataset generates a new ethash dataset and optionally stores it to disk.
Types ¶
type ChainManager ¶ added in v0.9.17
type Ethash ¶
type Ethash struct {
// contains filtered or unexported fields
}
Ethash is a PoW data struture implementing the ethash algorithm.
func (*Ethash) Hashrate ¶
Hashrate implements PoW, returning the measured rate of the search invocations per second over the last minute.
type FakePow ¶
type FakePow struct{}
FakePow is a non-validating proof of work implementation. It returns true from Verify for any block.
type PoW ¶
type PoW interface { Verify(block Block) error Search(block Block, stop <-chan struct{}) (uint64, []byte) Hashrate() float64 }
func NewFullEthash ¶
func NewFullEthash(cachedir string, cachesinmem, cachesondisk int, dagdir string, dagsinmem, dagsondisk int) PoW
NewFullEthash creates a full sized ethash PoW scheme.
func NewSharedEthash ¶
func NewSharedEthash() PoW
NewSharedEthash creates a full sized ethash PoW shared between all requesters running in the same process.
func NewTestEthash ¶
func NewTestEthash() PoW
NewTestEthash creates a small sized ethash PoW scheme useful only for testing purposes.