1b5c33cf33
* WIP implementing state transition function * Error handling and application setup fix * Fixed error comment * Allow creation of state objects with a BaseAccount * Fixed parameters and finalise state after transaction * updated transaction signing and cli signature * Set up consistent account encoding and decoding * Update txbuilder to get sequence before generating eth tx * Added create functionality to the CLI command * Remove need to copy over context for statedb interactions * Updated account retriever * Cleaned up handler code and updated TODO * Make recoverEthSig private again * Add error check for committing to kv store * Remove commented out code * Update evm chain config for state transition * Add time in context for dapps
27 lines
847 B
Go
27 lines
847 B
Go
package types
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/params"
|
|
)
|
|
|
|
// GenerateChainConfig returns an Ethereum chainconfig for EVM state transitions
|
|
func GenerateChainConfig(chainID *big.Int) *params.ChainConfig {
|
|
// TODO: Update chainconfig to take in parameters for fork blocks
|
|
return ¶ms.ChainConfig{
|
|
ChainID: chainID,
|
|
HomesteadBlock: big.NewInt(0),
|
|
DAOForkBlock: big.NewInt(0),
|
|
DAOForkSupport: true,
|
|
EIP150Block: big.NewInt(0),
|
|
EIP150Hash: common.HexToHash("0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0"),
|
|
EIP155Block: big.NewInt(0),
|
|
EIP158Block: big.NewInt(0),
|
|
ByzantiumBlock: big.NewInt(0),
|
|
ConstantinopleBlock: big.NewInt(0),
|
|
PetersburgBlock: big.NewInt(0),
|
|
}
|
|
}
|