2

I don't see any real documentaiton on what these are or to what they refer.

Here is the structure in the config file:

// Various consensus engines
Ethash *EthashConfig `json:"ethash,omitempty"`
Clique *CliqueConfig `json:"clique,omitempty"`

Can I get a technical breakdown of what they are, how they work, and what they do?

2

Ethash is the Proof-of-Work algorithm used by Ethereum. Design rationale and an explanation of the algorithm in pseudo-code can be found on the wiki (and has been discussed in previous questions - see: What proof of work function does Ethereum use?).

Clique is the protocol used in Ethereum's Proof-of-Authority testnet, named Rinkeby.

If you're really asking what those two variables equate to code-wise, then the logical conclusion, if you follow the code through in that file (i.e. config.go), is the creation of the genesis.json file, with the engine field being dependent on which type of chain you're creating it for.

// String implements the fmt.Stringer interface.
func (c *ChainConfig) String() string {
    var engine interface{}
    switch {
    case c.Ethash != nil:
        engine = c.Ethash
    case c.Clique != nil:
        engine = c.Clique
    default:
        engine = "unknown"
    }
    return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Engine: %v}",
        c.ChainId,
        c.HomesteadBlock,
        c.DAOForkBlock,
        c.DAOForkSupport,
        c.EIP150Block,
        c.EIP155Block,
        c.EIP158Block,
        c.ByzantiumBlock,
        engine,
    )
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.