mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
Embed AuRa config into chain Config (#7307)
Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/970
This commit is contained in:
parent
96bb5d544b
commit
9b81302d9d
@ -411,7 +411,6 @@ func NewBackend(stack *node.Node, config *ethconfig.Config, logger log.Logger) (
|
||||
if chainConfig.Clique != nil {
|
||||
consensusConfig = &config.Clique
|
||||
} else if chainConfig.Aura != nil {
|
||||
config.Aura.Etherbase = config.Miner.Etherbase
|
||||
consensusConfig = &config.Aura
|
||||
} else if chainConfig.Bor != nil {
|
||||
consensusConfig = &config.Bor
|
||||
|
@ -1433,7 +1433,6 @@ func initConsensusEngine(cc *chain2.Config, datadir string, db kv.RwDB) (engine
|
||||
if cc.Clique != nil {
|
||||
consensusConfig = params.CliqueSnapshot
|
||||
} else if cc.Aura != nil {
|
||||
config.Aura.Etherbase = config.Miner.Etherbase
|
||||
consensusConfig = &config.Aura
|
||||
} else if cc.Bor != nil {
|
||||
consensusConfig = &config.Bor
|
||||
|
@ -605,7 +605,6 @@ func initConsensusEngine(cc *chain2.Config, snapshots *snapshotsync.RoSnapshots)
|
||||
if cc.Clique != nil {
|
||||
consensusConfig = params.CliqueSnapshot
|
||||
} else if cc.Aura != nil {
|
||||
config.Aura.Etherbase = config.Miner.Etherbase
|
||||
consensusConfig = &config.Aura
|
||||
} else if cc.Bor != nil {
|
||||
consensusConfig = &config.Bor
|
||||
|
@ -27,7 +27,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/c2h5oh/datasize"
|
||||
"github.com/ledgerwatch/erigon-lib/chain"
|
||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
||||
"github.com/ledgerwatch/erigon-lib/common/cmp"
|
||||
"github.com/ledgerwatch/erigon-lib/common/datadir"
|
||||
@ -1342,10 +1341,6 @@ func setClique(ctx *cli.Context, cfg *params.ConsensusSnapshotConfig, datadir st
|
||||
}
|
||||
}
|
||||
|
||||
func setAuRa(ctx *cli.Context, cfg *chain.AuRaConfig, datadir string) {
|
||||
cfg.DBPath = filepath.Join(datadir, "aura")
|
||||
}
|
||||
|
||||
func setBorConfig(ctx *cli.Context, cfg *ethconfig.Config) {
|
||||
cfg.HeimdallURL = ctx.String(HeimdallURLFlag.Name)
|
||||
cfg.WithoutHeimdall = ctx.Bool(WithoutHeimdallFlag.Name)
|
||||
@ -1500,7 +1495,6 @@ func SetEthConfig(ctx *cli.Context, nodeConfig *nodecfg.Config, cfg *ethconfig.C
|
||||
|
||||
setEthash(ctx, nodeConfig.Dirs.DataDir, cfg)
|
||||
setClique(ctx, &cfg.Clique, nodeConfig.Dirs.DataDir)
|
||||
setAuRa(ctx, &cfg.Aura, nodeConfig.Dirs.DataDir)
|
||||
setMiner(ctx, &cfg.Miner)
|
||||
setWhitelist(ctx, cfg)
|
||||
setBorConfig(ctx, cfg)
|
||||
|
@ -20,7 +20,6 @@ import (
|
||||
"bytes"
|
||||
"container/list"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"sort"
|
||||
@ -28,14 +27,14 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/golang-lru/v2"
|
||||
lru "github.com/hashicorp/golang-lru/v2"
|
||||
"github.com/holiman/uint256"
|
||||
"github.com/ledgerwatch/log/v3"
|
||||
"github.com/ledgerwatch/secp256k1"
|
||||
|
||||
"github.com/ledgerwatch/erigon-lib/chain"
|
||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
||||
"github.com/ledgerwatch/erigon-lib/kv"
|
||||
"github.com/ledgerwatch/erigon/core/rawdb"
|
||||
"github.com/ledgerwatch/log/v3"
|
||||
"github.com/ledgerwatch/secp256k1"
|
||||
|
||||
"github.com/ledgerwatch/erigon/accounts/abi"
|
||||
"github.com/ledgerwatch/erigon/common"
|
||||
@ -44,6 +43,7 @@ import (
|
||||
"github.com/ledgerwatch/erigon/consensus/aura/contracts"
|
||||
"github.com/ledgerwatch/erigon/consensus/clique"
|
||||
"github.com/ledgerwatch/erigon/consensus/ethash"
|
||||
"github.com/ledgerwatch/erigon/core/rawdb"
|
||||
"github.com/ledgerwatch/erigon/core/state"
|
||||
"github.com/ledgerwatch/erigon/core/types"
|
||||
"github.com/ledgerwatch/erigon/crypto"
|
||||
@ -275,7 +275,6 @@ func epochTransitionFor(chain consensus.ChainHeaderReader, e *NonTransactionalEp
|
||||
// AuRa
|
||||
// nolint
|
||||
type AuRa struct {
|
||||
db kv.RwDB // Database to store and retrieve snapshot checkpoints
|
||||
e *NonTransactionalEpochReader
|
||||
exitCh chan struct{}
|
||||
lock sync.RWMutex // Protects the signer fields
|
||||
@ -284,10 +283,9 @@ type AuRa struct {
|
||||
// History of step hashes recently received from peers.
|
||||
receivedStepHashes ReceivedStepHashes
|
||||
|
||||
OurSigningAddress libcommon.Address // Same as Etherbase in Mining
|
||||
cfg AuthorityRoundParams
|
||||
EmptyStepsSet *EmptyStepSet
|
||||
EpochManager *EpochManager // Mutex<EpochManager>,
|
||||
cfg AuthorityRoundParams
|
||||
EmptyStepsSet *EmptyStepSet
|
||||
EpochManager *EpochManager // Mutex<EpochManager>,
|
||||
|
||||
certifier *libcommon.Address // certifies service transactions
|
||||
certifierLock sync.RWMutex
|
||||
@ -323,12 +321,7 @@ func (pb *GasLimitOverride) Add(hash libcommon.Hash, b *uint256.Int) {
|
||||
pb.cache.ContainsOrAdd(hash, b)
|
||||
}
|
||||
|
||||
func NewAuRa(config *chain.AuRaConfig, db kv.RwDB, ourSigningAddress libcommon.Address, engineParamsJson []byte) (*AuRa, error) {
|
||||
spec := JsonSpec{}
|
||||
err := json.Unmarshal(engineParamsJson, &spec)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
func NewAuRa(spec *chain.AuRaConfig, db kv.RwDB) (*AuRa, error) {
|
||||
auraParams, err := FromJson(spec)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -395,17 +388,14 @@ func NewAuRa(config *chain.AuRaConfig, db kv.RwDB, ourSigningAddress libcommon.A
|
||||
exitCh := make(chan struct{})
|
||||
|
||||
c := &AuRa{
|
||||
db: db,
|
||||
e: newEpochReader(db),
|
||||
exitCh: exitCh,
|
||||
step: PermissionedStep{inner: step},
|
||||
OurSigningAddress: ourSigningAddress,
|
||||
cfg: auraParams,
|
||||
receivedStepHashes: ReceivedStepHashes{},
|
||||
EpochManager: NewEpochManager(),
|
||||
}
|
||||
c.step.canPropose.Store(true)
|
||||
_ = config
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
@ -1,198 +1,20 @@
|
||||
package aura_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
||||
"github.com/ledgerwatch/erigon-lib/kv"
|
||||
"github.com/ledgerwatch/erigon-lib/kv/memdb"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
||||
"github.com/ledgerwatch/erigon-lib/kv/memdb"
|
||||
|
||||
"github.com/ledgerwatch/erigon/consensus/aura"
|
||||
"github.com/ledgerwatch/erigon/consensus/aura/consensusconfig"
|
||||
"github.com/ledgerwatch/erigon/consensus/aura/test"
|
||||
"github.com/ledgerwatch/erigon/core"
|
||||
"github.com/ledgerwatch/erigon/core/rawdb"
|
||||
"github.com/ledgerwatch/erigon/core/types"
|
||||
"github.com/ledgerwatch/erigon/core/types/accounts"
|
||||
"github.com/ledgerwatch/erigon/turbo/stages"
|
||||
"github.com/ledgerwatch/erigon/turbo/trie"
|
||||
)
|
||||
|
||||
/*
|
||||
#[test]
|
||||
|
||||
fn block_reward_contract() {
|
||||
let spec = Spec::new_test_round_block_reward_contract();
|
||||
let tap = Arc::new(AccountProvider::transient_provider());
|
||||
|
||||
let addr1 = tap.insert_account(keccak("1").into(), &"1".into()).unwrap();
|
||||
|
||||
let engine = &*spec.engine;
|
||||
let genesis_header = spec.genesis_header();
|
||||
let db1 = spec
|
||||
.ensure_db_good(get_temp_state_db(), &Default::default())
|
||||
.unwrap();
|
||||
let db2 = spec
|
||||
.ensure_db_good(get_temp_state_db(), &Default::default())
|
||||
.unwrap();
|
||||
|
||||
let last_hashes = Arc::new(vec![genesis_header.hash()]);
|
||||
|
||||
let client = generate_dummy_client_with_spec(Spec::new_test_round_block_reward_contract);
|
||||
engine.register_client(Arc::downgrade(&client) as _);
|
||||
|
||||
// step 2
|
||||
let b1 = OpenBlock::new(
|
||||
engine,
|
||||
Default::default(),
|
||||
false,
|
||||
db1,
|
||||
&genesis_header,
|
||||
last_hashes.clone(),
|
||||
addr1,
|
||||
(3141562.into(), 31415620.into()),
|
||||
vec![],
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let b1 = b1.close_and_lock().unwrap();
|
||||
|
||||
// since the block is empty it isn't sealed and we generate empty steps
|
||||
engine.set_signer(Some(Box::new((tap.clone(), addr1, "1".into()))));
|
||||
assert_eq!(engine.generate_seal(&b1, &genesis_header), Seal::None);
|
||||
engine.step();
|
||||
|
||||
// step 3
|
||||
// the signer of the accumulated empty step message should be rewarded
|
||||
let b2 = OpenBlock::new(
|
||||
engine,
|
||||
Default::default(),
|
||||
false,
|
||||
db2,
|
||||
&genesis_header,
|
||||
last_hashes.clone(),
|
||||
addr1,
|
||||
(3141562.into(), 31415620.into()),
|
||||
vec![],
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let addr1_balance = b2.state.balance(&addr1).unwrap();
|
||||
|
||||
// after closing the block `addr1` should be reward twice, one for the included empty step
|
||||
// message and another for block creation
|
||||
let b2 = b2.close_and_lock().unwrap();
|
||||
|
||||
// the contract rewards (1000 + kind) for each benefactor/reward kind
|
||||
assert_eq!(
|
||||
b2.state.balance(&addr1).unwrap(),
|
||||
addr1_balance + (1000 + 0) + (1000 + 2),
|
||||
)
|
||||
}
|
||||
*/
|
||||
func TestRewardContract(t *testing.T) {
|
||||
t.Skip("not ready yet")
|
||||
auraDB, require := memdb.NewTestDB(t), require.New(t)
|
||||
engine, err := aura.NewAuRa(nil, auraDB, libcommon.Address{}, test.AuthorityRoundBlockRewardContract)
|
||||
require.NoError(err)
|
||||
m := stages.MockWithGenesisEngine(t, core.ChiadoGenesisBlock(), engine, false)
|
||||
m.EnableLogs()
|
||||
|
||||
var accBefore *accounts.Account
|
||||
err = auraDB.View(context.Background(), func(tx kv.Tx) (err error) { _, err = rawdb.ReadAccount(tx, m.Address, accBefore); return err })
|
||||
require.NoError(err)
|
||||
|
||||
chain, err := core.GenerateChain(m.ChainConfig, m.Genesis, m.Engine, m.DB, 2, func(i int, gen *core.BlockGen) {
|
||||
gen.SetCoinbase(m.Address)
|
||||
}, false /* intermediateHashes */)
|
||||
require.NoError(err)
|
||||
|
||||
err = m.InsertChain(chain)
|
||||
require.NoError(err)
|
||||
|
||||
var accAfter *accounts.Account
|
||||
err = auraDB.View(context.Background(), func(tx kv.Tx) (err error) { _, err = rawdb.ReadAccount(tx, m.Address, accAfter); return err })
|
||||
require.NoError(err)
|
||||
|
||||
fmt.Printf("balance: %d\n", accAfter.Balance.Uint64())
|
||||
/*
|
||||
|
||||
let spec = Spec::new_test_round_block_reward_contract();
|
||||
let tap = Arc::new(AccountProvider::transient_provider());
|
||||
|
||||
let addr1 = tap.insert_account(keccak("1").into(), &"1".into()).unwrap();
|
||||
|
||||
let engine = &*spec.engine;
|
||||
let genesis_header = spec.genesis_header();
|
||||
let db1 = spec
|
||||
.ensure_db_good(get_temp_state_db(), &Default::default())
|
||||
.unwrap();
|
||||
let db2 = spec
|
||||
.ensure_db_good(get_temp_state_db(), &Default::default())
|
||||
.unwrap();
|
||||
|
||||
let last_hashes = Arc::new(vec![genesis_header.hash()]);
|
||||
|
||||
let client = generate_dummy_client_with_spec(Spec::new_test_round_block_reward_contract);
|
||||
engine.register_client(Arc::downgrade(&client) as _);
|
||||
|
||||
// step 2
|
||||
let b1 = OpenBlock::new(
|
||||
engine,
|
||||
Default::default(),
|
||||
false,
|
||||
db1,
|
||||
&genesis_header,
|
||||
last_hashes.clone(),
|
||||
addr1,
|
||||
(3141562.into(), 31415620.into()),
|
||||
vec![],
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let b1 = b1.close_and_lock().unwrap();
|
||||
|
||||
// since the block is empty it isn't sealed and we generate empty steps
|
||||
engine.set_signer(Some(Box::new((tap.clone(), addr1, "1".into()))));
|
||||
assert_eq!(engine.generate_seal(&b1, &genesis_header), Seal::None);
|
||||
engine.step();
|
||||
|
||||
// step 3
|
||||
// the signer of the accumulated empty step message should be rewarded
|
||||
let b2 = OpenBlock::new(
|
||||
engine,
|
||||
Default::default(),
|
||||
false,
|
||||
db2,
|
||||
&genesis_header,
|
||||
last_hashes.clone(),
|
||||
addr1,
|
||||
(3141562.into(), 31415620.into()),
|
||||
vec![],
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let addr1_balance = b2.state.balance(&addr1).unwrap();
|
||||
|
||||
// after closing the block `addr1` should be reward twice, one for the included empty step
|
||||
// message and another for block creation
|
||||
let b2 = b2.close_and_lock().unwrap();
|
||||
|
||||
// the contract rewards (1000 + kind) for each benefactor/reward kind
|
||||
assert_eq!(
|
||||
b2.state.balance(&addr1).unwrap(),
|
||||
addr1_balance + (1000 + 0) + (1000 + 2),
|
||||
)
|
||||
*/
|
||||
}
|
||||
|
||||
// Check that the first block of Gnosis Chain, which doesn't have any transactions,
|
||||
// does not change the state root.
|
||||
func TestEmptyBlock(t *testing.T) {
|
||||
@ -205,7 +27,7 @@ func TestEmptyBlock(t *testing.T) {
|
||||
|
||||
chainConfig := genesis.Config
|
||||
auraDB := memdb.NewTestDB(t)
|
||||
engine, err := aura.NewAuRa(chainConfig.Aura, auraDB, chainConfig.Aura.Etherbase, consensusconfig.GetConfigByChain(chainConfig.ChainName))
|
||||
engine, err := aura.NewAuRa(chainConfig.Aura, auraDB)
|
||||
require.NoError(err)
|
||||
m := stages.MockWithGenesisEngine(t, genesis, engine, false)
|
||||
|
||||
|
@ -23,10 +23,9 @@ import (
|
||||
|
||||
"github.com/holiman/uint256"
|
||||
|
||||
"github.com/ledgerwatch/erigon-lib/chain"
|
||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
||||
"github.com/ledgerwatch/erigon-lib/common/hexutility"
|
||||
|
||||
"github.com/ledgerwatch/erigon/common/hexutil"
|
||||
"github.com/ledgerwatch/erigon/common/u256"
|
||||
"github.com/ledgerwatch/erigon/consensus"
|
||||
)
|
||||
@ -40,19 +39,7 @@ func GetFromValidatorSet(set ValidatorSet, parent libcommon.Hash, nonce uint, ca
|
||||
return set.getWithCaller(parent, nonce, call)
|
||||
}
|
||||
|
||||
// Different ways of specifying validators.
|
||||
type ValidatorSetJson struct {
|
||||
// A simple list of authorities.
|
||||
List []libcommon.Address `json:"list"`
|
||||
// Address of a contract that indicates the list of authorities.
|
||||
SafeContract *libcommon.Address `json:"safeContract"`
|
||||
// Address of a contract that indicates the list of authorities and enables reporting of their misbehaviour using transactions.
|
||||
Contract *libcommon.Address `json:"contract"`
|
||||
// A map of starting blocks for each validator set.
|
||||
Multi map[uint64]*ValidatorSetJson `json:"multi"`
|
||||
}
|
||||
|
||||
func newValidatorSetFromJson(j *ValidatorSetJson, posdaoTransition *uint64) ValidatorSet {
|
||||
func newValidatorSetFromJson(j *chain.ValidatorSetJson, posdaoTransition *uint64) ValidatorSet {
|
||||
if j.List != nil {
|
||||
return &SimpleList{validators: j.List}
|
||||
}
|
||||
@ -77,60 +64,6 @@ func newValidatorSetFromJson(j *ValidatorSetJson, posdaoTransition *uint64) Vali
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO: StepDuration and BlockReward - now are uint64, but it can be an object in non-sokol consensus
|
||||
type JsonSpec struct {
|
||||
StepDuration *uint64 `json:"stepDuration"` // Block duration, in seconds.
|
||||
Validators *ValidatorSetJson `json:"validators"` // Valid authorities
|
||||
|
||||
// Starting step. Determined automatically if not specified.
|
||||
// To be used for testing only.
|
||||
StartStep *uint64 `json:"startStep"`
|
||||
ValidateScoreTransition *uint64 `json:"validateScoreTransition"` // Block at which score validation should start.
|
||||
ValidateStepTransition *uint64 `json:"validateStepTransition"` // Block from which monotonic steps start.
|
||||
ImmediateTransitions *bool `json:"immediateTransitions"` // Whether transitions should be immediate.
|
||||
BlockReward *hexutil.Uint64 `json:"blockReward"` // Reward per block in wei.
|
||||
// Block at which the block reward contract should start being used. This option allows one to
|
||||
// add a single block reward contract transition and is compatible with the multiple address
|
||||
// option `block_reward_contract_transitions` below.
|
||||
BlockRewardContractTransition *uint64 `json:"blockRewardContractTransition"`
|
||||
/// Block reward contract address which overrides the `block_reward` setting. This option allows
|
||||
/// one to add a single block reward contract address and is compatible with the multiple
|
||||
/// address option `block_reward_contract_transitions` below.
|
||||
BlockRewardContractAddress *libcommon.Address `json:"blockRewardContractAddress"`
|
||||
// Block reward contract addresses with their associated starting block numbers.
|
||||
//
|
||||
// Setting the block reward contract overrides `block_reward`. If the single block reward
|
||||
// contract address is also present then it is added into the map at the block number stored in
|
||||
// `block_reward_contract_transition` or 0 if that block number is not provided. Therefore both
|
||||
// a single block reward contract transition and a map of reward contract transitions can be
|
||||
// used simultaneously in the same configuration. In such a case the code requires that the
|
||||
// block number of the single transition is strictly less than any of the block numbers in the
|
||||
// map.
|
||||
BlockRewardContractTransitions map[uint]libcommon.Address `json:"blockRewardContractTransitions"`
|
||||
// Block at which maximum uncle count should be considered.
|
||||
MaximumUncleCountTransition *uint64 `json:"maximumUncleCountTransition"`
|
||||
// Maximum number of accepted uncles.
|
||||
MaximumUncleCount *uint `json:"maximumUncleCount"`
|
||||
// Strict validation of empty steps transition block.
|
||||
StrictEmptyStepsTransition *uint `json:"strictEmptyStepsTransition"`
|
||||
// The random number contract's address, or a map of contract transitions.
|
||||
RandomnessContractAddress map[uint64]libcommon.Address `json:"randomnessContractAddress"`
|
||||
// The addresses of contracts that determine the block gas limit starting from the block number
|
||||
// associated with each of those contracts.
|
||||
BlockGasLimitContractTransitions map[uint64]libcommon.Address `json:"blockGasLimitContractTransitions"`
|
||||
// The block number at which the consensus engine switches from AuRa to AuRa with POSDAO
|
||||
// modifications.
|
||||
PosdaoTransition *uint64 `json:"PosdaoTransition"`
|
||||
// Stores human-readable keys associated with addresses, like DNS information.
|
||||
// This contract is primarily required to store the address of the Certifier contract.
|
||||
Registrar *libcommon.Address `json:"registrar"`
|
||||
|
||||
// See https://github.com/gnosischain/specs/blob/master/execution/withdrawals.md
|
||||
WithdrawalContractAddress *libcommon.Address `json:"withdrawalContractAddress"`
|
||||
|
||||
RewriteBytecode map[uint64]map[libcommon.Address]hexutility.Bytes `json:"rewriteBytecode"`
|
||||
}
|
||||
|
||||
type Code struct {
|
||||
Code []byte
|
||||
CodeHash libcommon.Hash
|
||||
@ -208,7 +141,7 @@ type AuthorityRoundParams struct {
|
||||
RewriteBytecode map[uint64]map[libcommon.Address][]byte
|
||||
}
|
||||
|
||||
func FromJson(jsonParams JsonSpec) (AuthorityRoundParams, error) {
|
||||
func FromJson(jsonParams *chain.AuRaConfig) (AuthorityRoundParams, error) {
|
||||
params := AuthorityRoundParams{
|
||||
Validators: newValidatorSetFromJson(jsonParams.Validators, jsonParams.PosdaoTransition),
|
||||
StartStep: jsonParams.StartStep,
|
||||
@ -259,7 +192,7 @@ func FromJson(jsonParams JsonSpec) (AuthorityRoundParams, error) {
|
||||
params.BlockReward = append(params.BlockReward, BlockReward{blockNum: 0, amount: u256.Num0})
|
||||
} else {
|
||||
if jsonParams.BlockReward != nil {
|
||||
params.BlockReward = append(params.BlockReward, BlockReward{blockNum: 0, amount: uint256.NewInt(uint64(*jsonParams.BlockReward))})
|
||||
params.BlockReward = append(params.BlockReward, BlockReward{blockNum: 0, amount: uint256.NewInt(*jsonParams.BlockReward)})
|
||||
}
|
||||
}
|
||||
sort.Sort(params.BlockReward)
|
||||
|
@ -1,21 +1,18 @@
|
||||
package aura
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/ledgerwatch/erigon/consensus/aura/consensusconfig"
|
||||
"github.com/ledgerwatch/erigon/params/networkname"
|
||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
||||
|
||||
"github.com/ledgerwatch/erigon/params"
|
||||
)
|
||||
|
||||
func TestGnosisBlockRewardContractTransitions(t *testing.T) {
|
||||
config := consensusconfig.GetConfigByChain(networkname.GnosisChainName)
|
||||
spec := JsonSpec{}
|
||||
require.NoError(t, json.Unmarshal(config, &spec))
|
||||
spec := params.GnosisChainConfig.Aura
|
||||
|
||||
param, err := FromJson(spec)
|
||||
require.NoError(t, err)
|
||||
@ -28,14 +25,12 @@ func TestGnosisBlockRewardContractTransitions(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestInvalidBlockRewardContractTransition(t *testing.T) {
|
||||
config := consensusconfig.GetConfigByChain(networkname.GnosisChainName)
|
||||
spec := JsonSpec{}
|
||||
require.NoError(t, json.Unmarshal(config, &spec))
|
||||
spec := *(params.GnosisChainConfig.Aura)
|
||||
|
||||
// blockRewardContractTransition should be smaller than any block number in blockRewardContractTransitions
|
||||
invalidTransition := uint64(10_000_000)
|
||||
spec.BlockRewardContractTransition = &invalidTransition
|
||||
|
||||
_, err := FromJson(spec)
|
||||
_, err := FromJson(&spec)
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
@ -1,27 +0,0 @@
|
||||
package consensusconfig
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
|
||||
"github.com/ledgerwatch/erigon/params/networkname"
|
||||
)
|
||||
|
||||
//go:embed poagnosis.json
|
||||
var Gnosis []byte
|
||||
|
||||
//go:embed poachiado.json
|
||||
var Chiado []byte
|
||||
|
||||
//go:embed test.json
|
||||
var Test []byte
|
||||
|
||||
func GetConfigByChain(chainName string) []byte {
|
||||
switch chainName {
|
||||
case networkname.GnosisChainName:
|
||||
return Gnosis
|
||||
case networkname.ChiadoChainName:
|
||||
return Chiado
|
||||
default:
|
||||
return Test
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
"stepDuration": 5,
|
||||
"blockReward": "0x0",
|
||||
"maximumUncleCountTransition": 0,
|
||||
"maximumUncleCount": 0,
|
||||
"validators": {
|
||||
"multi": {
|
||||
"0": {
|
||||
"list": ["0x14747a698Ec1227e6753026C08B29b4d5D3bC484"]
|
||||
},
|
||||
"67334": {
|
||||
"list": [
|
||||
"0x14747a698Ec1227e6753026C08B29b4d5D3bC484",
|
||||
"0x56D421c0AC39976E89fa400d34ca6579417B84cA",
|
||||
"0x5CD99ac2F0F8C25a1e670F6BaB19D52Aad69D875",
|
||||
"0x60F1CF46B42Df059b98Acf67C1dD7771b100e124",
|
||||
"0x655e97bA0f63A56c2b56EB3e84f7bf42b20Bae14",
|
||||
"0x755B6259938D140626301c0B6026c1C00C9eD5d9",
|
||||
"0xa8010da9Cb0AC018C86A06301963853CC371a18c"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"blockRewardContractAddress": "0x2000000000000000000000000000000000000001",
|
||||
"blockRewardContractTransition": 0,
|
||||
"randomnessContractAddress": {
|
||||
"0": "0x3000000000000000000000000000000000000001"
|
||||
},
|
||||
"posdaoTransition": 0,
|
||||
"blockGasLimitContractTransitions": {
|
||||
"0": "0x4000000000000000000000000000000000000001"
|
||||
},
|
||||
"registrar": "0x6000000000000000000000000000000000000000"
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,28 +0,0 @@
|
||||
{
|
||||
"stepDuration": 5,
|
||||
"blockReward": "0x0",
|
||||
"maximumUncleCountTransition": 0,
|
||||
"maximumUncleCount": 0,
|
||||
"validators": {
|
||||
"multi": {
|
||||
"0": {
|
||||
"safeContract": "0x8bf38d4764929064f2d4d3a56520a76ab3df415b"
|
||||
},
|
||||
"362296": {
|
||||
"safeContract": "0xf5cE3f5D0366D6ec551C74CCb1F67e91c56F2e34"
|
||||
},
|
||||
"509355": {
|
||||
"safeContract": "0x03048F666359CFD3C74a1A5b9a97848BF71d5038"
|
||||
},
|
||||
"4622420": {
|
||||
"safeContract": "0x4c6a159659CCcb033F4b2e2Be0C16ACC62b89DDB"
|
||||
}
|
||||
}
|
||||
},
|
||||
"blockRewardContractAddress": "0x3145197AD50D7083D0222DE4fCCf67d9BD05C30D",
|
||||
"blockRewardContractTransition": 4639000,
|
||||
"randomnessContractAddress": {
|
||||
"13391641": "0x8f2b78169B0970F11a762e56659Db52B59CBCf1B"
|
||||
}
|
||||
}
|
||||
|
@ -1,96 +0,0 @@
|
||||
{
|
||||
"name": "TestAuthorityRound",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"list": [
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e",
|
||||
"0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1"
|
||||
]
|
||||
},
|
||||
"immediateTransitions": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x69",
|
||||
"eip140Transition": "0x0",
|
||||
"eip211Transition": "0x0",
|
||||
"eip214Transition": "0x0",
|
||||
"eip658Transition": "0x0"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"authorityRound": {
|
||||
"step": "0x0",
|
||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x",
|
||||
"gasLimit": "0x222222"
|
||||
},
|
||||
"accounts": {
|
||||
"0000000000000000000000000000000000000001": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
|
||||
"0000000000000000000000000000000000000006": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_add",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_const_operations": { "price": 500 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_const_operations": { "price": 150 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000007": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_mul",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_const_operations": { "price": 40000 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_const_operations": { "price": 6000 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000008": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_pairing",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }
|
||||
}
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
{
|
||||
"name": "TestAuthorityRoundBlockRewardContract",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"list": [
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e",
|
||||
"0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1"
|
||||
]
|
||||
},
|
||||
"immediateTransitions": true,
|
||||
"emptyStepsTransition": "1",
|
||||
"maximumEmptySteps": "2",
|
||||
"blockRewardContractAddress": "0x0000000000000000000000000000000000000042"
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x69",
|
||||
"eip140Transition": "0x0",
|
||||
"eip211Transition": "0x0",
|
||||
"eip214Transition": "0x0",
|
||||
"eip658Transition": "0x0"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"authorityRound": {
|
||||
"step": "0x0",
|
||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x",
|
||||
"gasLimit": "0x222222"
|
||||
},
|
||||
"accounts": {
|
||||
"0000000000000000000000000000000000000001": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
|
||||
"0000000000000000000000000000000000000006": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_add",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_const_operations": { "price": 500 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_const_operations": { "price": 150 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000007": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_mul",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_const_operations": { "price": 40000 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_const_operations": { "price": 6000 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000008": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_pairing",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" },
|
||||
"0000000000000000000000000000000000000042": {
|
||||
"balance": "1",
|
||||
"constructor": "6060604052341561000f57600080fd5b6102b88061001e6000396000f300606060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063f91c289814610046575b600080fd5b341561005157600080fd5b610086600480803590602001908201803590602001919091929080359060200190820180359060200191909192905050610125565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100cd5780820151818401526020810190506100b2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561010f5780820151818401526020810190506100f4565b5050505090500194505050505060405180910390f35b61012d610264565b610135610278565b61013d610278565b600073fffffffffffffffffffffffffffffffffffffffe73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561018d57600080fd5b85859050888890501415156101a157600080fd5b878790506040518059106101b25750595b90808252806020026020018201604052509150600090505b815181101561021d5785858281811015156101e157fe5b9050602002013561ffff166103e80161ffff16828281518110151561020257fe5b906020019060200201818152505080806001019150506101ca565b878783828280806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050915090915093509350505094509492505050565b602060405190810160405280600081525090565b6020604051908101604052806000815250905600a165627a7a723058201da0f164e75517fb8baf51f030b904032cb748334938e7386f63025bfb23f3de0029"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "TestAuthorityRoundEmptySteps",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"list": [
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e",
|
||||
"0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1"
|
||||
]
|
||||
},
|
||||
"blockReward": "10",
|
||||
"immediateTransitions": true,
|
||||
"emptyStepsTransition": "1",
|
||||
"maximumEmptySteps": "2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x69"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"authorityRound": {
|
||||
"step": "0x0",
|
||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x",
|
||||
"gasLimit": "0x222222"
|
||||
},
|
||||
"accounts": {
|
||||
"0000000000000000000000000000000000000001": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" },
|
||||
"7d577a597b2742b498cb5cf0c26cdcd726d39e6e": { "balance": "1000000000" },
|
||||
"82a978b3f5962a5b0957d9ee9eef472ee55b42f1": { "balance": "1000000000" }
|
||||
}
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
{
|
||||
"name": "TestAuthorityRoundRandomnessContract",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"list": [
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e"
|
||||
]
|
||||
},
|
||||
"immediateTransitions": true,
|
||||
"maximumEmptySteps": "2",
|
||||
"randomnessContractAddress": {
|
||||
"0": "0x0000000000000000000000000000000000000042"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x69",
|
||||
"eip140Transition": "0x0",
|
||||
"eip211Transition": "0x0",
|
||||
"eip214Transition": "0x0",
|
||||
"eip658Transition": "0x0"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"authorityRound": {
|
||||
"step": "0x0",
|
||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x",
|
||||
"gasLimit": "0x222222"
|
||||
},
|
||||
"accounts": {
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e": { "balance": "100000000000" },
|
||||
"0000000000000000000000000000000000000001": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
|
||||
"0000000000000000000000000000000000000006": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_add",
|
||||
"pricing": {
|
||||
"0x0": {
|
||||
"price": { "linear": { "base": 500, "word": 0 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"price": { "linear": { "base": 150, "word": 0 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000007": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_mul",
|
||||
"pricing": {
|
||||
"0x0": {
|
||||
"price": { "linear": { "base": 40000, "word": 0 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"price": { "linear": { "base": 6000, "word": 0 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000008": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_pairing",
|
||||
"pricing": {
|
||||
"0x0": {
|
||||
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000042": {
|
||||
"balance": "1",
|
||||
"constructor": "608060405234801561001057600080fd5b50610820806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ec576000357c01000000000000000000000000000000000000000000000000000000009004806363f160e6116100a95780637a3e286b116100835780637a3e286b14610378578063baf11cab14610380578063c358ced0146103ac578063fe7d567d146103b4576100ec565b806363f160e614610285578063695e89f6146102c557806374ce906714610370576100ec565b806304fdb016146100f15780630b61ba8514610192578063209652551461020b5780632e8a8dd5146102255780633fa4f245146102515780635580e58b14610259575b600080fd5b61011d6004803603604081101561010757600080fd5b5080359060200135600160a060020a03166103d1565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015757818101518382015260200161013f565b50505050905090810190601f1680156101845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610209600480360360408110156101a857600080fd5b813591908101906040810160208201356401000000008111156101ca57600080fd5b8201836020820111156101dc57600080fd5b803590602001918460018302840111640100000000831117156101fe57600080fd5b509092509050610475565b005b6102136104fa565b60408051918252519081900360200190f35b6102136004803603604081101561023b57600080fd5b5080359060200135600160a060020a0316610501565b61021361051b565b6102136004803603604081101561026f57600080fd5b5080359060200135600160a060020a0316610521565b6102b16004803603604081101561029b57600080fd5b5080359060200135600160a060020a031661053e565b604080519115158252519081900360200190f35b6102f1600480360360408110156102db57600080fd5b5080359060200135600160a060020a0316610568565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561033457818101518382015260200161031c565b50505050905090810190601f1680156103615780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6102b1610639565b610213610649565b6102b16004803603604081101561039657600080fd5b5080359060200135600160a060020a0316610654565b6102b161067c565b610209600480360360208110156103ca57600080fd5b5035610687565b600160208181526000938452604080852082529284529282902080548351600293821615610100026000190190911692909204601f8101859004850283018501909352828252909290919083018282801561046d5780601f106104425761010080835404028352916020019161046d565b820191906000526020600020905b81548152906001019060200180831161045057829003601f168201915b505050505081565b41331461048157600080fd5b61048d60014303610735565b61049657600080fd5b60006104a460014303610740565b90506104b08133610654565b156104ba57600080fd5b600081815260208181526040808320338085529083528184208890558484526001835281842090845290915290206104f3908484610753565b5050505050565b6003545b90565b600060208181529281526040808220909352908152205481565b60035481565b600260209081526000928352604080842090915290825290205481565b6000918252600260209081526040808420600160a060020a03939093168452919052902054151590565b600082815260208181526040808320600160a060020a03851680855290835281842054868552600180855283862092865291845282852080548451600294821615610100026000190190911693909304601f810186900486028401860190945283835260609491939092918391908301828280156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b50505050509050915091509250929050565b600061064443610735565b905090565b600061064443610740565b600091825260208281526040808420600160a060020a03939093168452919052902054151590565b600061064443610747565b41331461069357600080fd5b61069f60014303610747565b6106a857600080fd5b60006106b660014303610740565b90506106c2813361053e565b156106cc57600080fd5b60408051602080820185905282518083038201815291830183528151918101919091206000848152808352838120338252909252919020541461070e57600080fd5b60009081526002602090815260408083203384529091529020819055600380549091189055565b600360069091061090565b6006900490565b60036006909106101590565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106107945782800160ff198235161785556107c1565b828001600101855582156107c1579182015b828111156107c15782358255916020019190600101906107a6565b506107cd9291506107d1565b5090565b6104fe91905b808211156107cd57600081556001016107d756fea265627a7a7230582008bb7311af9026bd70ddb998741333d414a366275b9b433a2943bbd6bedc27ae64736f6c634300050a0032"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
{
|
||||
"name": "TestAuthorityRound",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"list": [
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e",
|
||||
"0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1"
|
||||
]
|
||||
},
|
||||
"immediateTransitions": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x69",
|
||||
"eip140Transition": "0x0",
|
||||
"eip211Transition": "0x0",
|
||||
"eip214Transition": "0x0",
|
||||
"eip658Transition": "0x0"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"authorityRound": {
|
||||
"step": "0x0",
|
||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x",
|
||||
"gasLimit": "0x222222"
|
||||
},
|
||||
"accounts": {
|
||||
"0000000000000000000000000000000000000001": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
|
||||
"0000000000000000000000000000000000000006": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_add",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_const_operations": { "price": 500 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_const_operations": { "price": 150 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000007": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_mul",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_const_operations": { "price": 40000 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_const_operations": { "price": 6000 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000008": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_pairing",
|
||||
"pricing": {
|
||||
"0": {
|
||||
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"info": "EIP 1108 transition",
|
||||
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"list": [
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e",
|
||||
"0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1"
|
||||
]
|
||||
},
|
||||
"immediateTransitions": true,
|
||||
"emptyStepsTransition": 1,
|
||||
"maximumEmptySteps": 2,
|
||||
"blockRewardContractAddress": "0x0000000000000000000000000000000000000042"
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "TestAuthorityRoundEmptySteps",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"list": [
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e",
|
||||
"0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1"
|
||||
]
|
||||
},
|
||||
"blockReward": "10",
|
||||
"immediateTransitions": true,
|
||||
"emptyStepsTransition": "1",
|
||||
"maximumEmptySteps": "2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x69"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"authorityRound": {
|
||||
"step": "0x0",
|
||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x",
|
||||
"gasLimit": "0x222222"
|
||||
},
|
||||
"accounts": {
|
||||
"0000000000000000000000000000000000000001": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||
"9cce34f7ab185c7aba1b7c8140d620b4bda941d6": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" },
|
||||
"7d577a597b2742b498cb5cf0c26cdcd726d39e6e": { "balance": "1000000000" },
|
||||
"82a978b3f5962a5b0957d9ee9eef472ee55b42f1": { "balance": "1000000000" }
|
||||
}
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
{
|
||||
"name": "TestAuthorityRoundRandomnessContract",
|
||||
"engine": {
|
||||
"authorityRound": {
|
||||
"params": {
|
||||
"stepDuration": 1,
|
||||
"startStep": 2,
|
||||
"validators": {
|
||||
"list": [
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e"
|
||||
]
|
||||
},
|
||||
"immediateTransitions": true,
|
||||
"maximumEmptySteps": "2",
|
||||
"randomnessContractAddress": {
|
||||
"0": "0x0000000000000000000000000000000000000042"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x69",
|
||||
"eip140Transition": "0x0",
|
||||
"eip211Transition": "0x0",
|
||||
"eip214Transition": "0x0",
|
||||
"eip658Transition": "0x0"
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
"authorityRound": {
|
||||
"step": "0x0",
|
||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"difficulty": "0x20000",
|
||||
"author": "0x0000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"extraData": "0x",
|
||||
"gasLimit": "0x222222"
|
||||
},
|
||||
"accounts": {
|
||||
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e": { "balance": "100000000000" },
|
||||
"0000000000000000000000000000000000000001": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
||||
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||
"0000000000000000000000000000000000000005": { "balance": "1", "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } },
|
||||
"0000000000000000000000000000000000000006": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_add",
|
||||
"pricing": {
|
||||
"0x0": {
|
||||
"price": { "linear": { "base": 500, "word": 0 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"price": { "linear": { "base": 150, "word": 0 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000007": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_mul",
|
||||
"pricing": {
|
||||
"0x0": {
|
||||
"price": { "linear": { "base": 40000, "word": 0 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"price": { "linear": { "base": 6000, "word": 0 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000008": {
|
||||
"balance": "1",
|
||||
"builtin": {
|
||||
"name": "alt_bn128_pairing",
|
||||
"pricing": {
|
||||
"0x0": {
|
||||
"price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 }}
|
||||
},
|
||||
"0x7fffffffffffff": {
|
||||
"price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 }}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"0000000000000000000000000000000000000042": {
|
||||
"balance": "1",
|
||||
"constructor": "608060405234801561001057600080fd5b50610820806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ec576000357c01000000000000000000000000000000000000000000000000000000009004806363f160e6116100a95780637a3e286b116100835780637a3e286b14610378578063baf11cab14610380578063c358ced0146103ac578063fe7d567d146103b4576100ec565b806363f160e614610285578063695e89f6146102c557806374ce906714610370576100ec565b806304fdb016146100f15780630b61ba8514610192578063209652551461020b5780632e8a8dd5146102255780633fa4f245146102515780635580e58b14610259575b600080fd5b61011d6004803603604081101561010757600080fd5b5080359060200135600160a060020a03166103d1565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015757818101518382015260200161013f565b50505050905090810190601f1680156101845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610209600480360360408110156101a857600080fd5b813591908101906040810160208201356401000000008111156101ca57600080fd5b8201836020820111156101dc57600080fd5b803590602001918460018302840111640100000000831117156101fe57600080fd5b509092509050610475565b005b6102136104fa565b60408051918252519081900360200190f35b6102136004803603604081101561023b57600080fd5b5080359060200135600160a060020a0316610501565b61021361051b565b6102136004803603604081101561026f57600080fd5b5080359060200135600160a060020a0316610521565b6102b16004803603604081101561029b57600080fd5b5080359060200135600160a060020a031661053e565b604080519115158252519081900360200190f35b6102f1600480360360408110156102db57600080fd5b5080359060200135600160a060020a0316610568565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561033457818101518382015260200161031c565b50505050905090810190601f1680156103615780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6102b1610639565b610213610649565b6102b16004803603604081101561039657600080fd5b5080359060200135600160a060020a0316610654565b6102b161067c565b610209600480360360208110156103ca57600080fd5b5035610687565b600160208181526000938452604080852082529284529282902080548351600293821615610100026000190190911692909204601f8101859004850283018501909352828252909290919083018282801561046d5780601f106104425761010080835404028352916020019161046d565b820191906000526020600020905b81548152906001019060200180831161045057829003601f168201915b505050505081565b41331461048157600080fd5b61048d60014303610735565b61049657600080fd5b60006104a460014303610740565b90506104b08133610654565b156104ba57600080fd5b600081815260208181526040808320338085529083528184208890558484526001835281842090845290915290206104f3908484610753565b5050505050565b6003545b90565b600060208181529281526040808220909352908152205481565b60035481565b600260209081526000928352604080842090915290825290205481565b6000918252600260209081526040808420600160a060020a03939093168452919052902054151590565b600082815260208181526040808320600160a060020a03851680855290835281842054868552600180855283862092865291845282852080548451600294821615610100026000190190911693909304601f810186900486028401860190945283835260609491939092918391908301828280156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b50505050509050915091509250929050565b600061064443610735565b905090565b600061064443610740565b600091825260208281526040808420600160a060020a03939093168452919052902054151590565b600061064443610747565b41331461069357600080fd5b61069f60014303610747565b6106a857600080fd5b60006106b660014303610740565b90506106c2813361053e565b156106cc57600080fd5b60408051602080820185905282518083038201815291830183528151918101919091206000848152808352838120338252909252919020541461070e57600080fd5b60009081526002602090815260408083203384529091529020819055600380549091189055565b600360069091061090565b6006900490565b60036006909106101590565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106107945782800160ff198235161785556107c1565b828001600101855582156107c1579182015b828111156107c15782358255916020019190600101906107a6565b506107cd9291506107d1565b5090565b6104fe91905b808211156107cd57600081556001016107d756fea265627a7a7230582008bb7311af9026bd70ddb998741333d414a366275b9b433a2943bbd6bedc27ae64736f6c634300050a0032"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed authority_round_block_reward_contract.json
|
||||
var AuthorityRoundBlockRewardContract []byte
|
@ -437,7 +437,6 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
|
||||
if chainConfig.Clique != nil {
|
||||
consensusConfig = &config.Clique
|
||||
} else if chainConfig.Aura != nil {
|
||||
config.Aura.Etherbase = config.Miner.Etherbase
|
||||
consensusConfig = &config.Aura
|
||||
} else if chainConfig.Bor != nil {
|
||||
consensusConfig = &config.Bor
|
||||
|
@ -11,7 +11,6 @@ import (
|
||||
|
||||
"github.com/ledgerwatch/erigon/consensus"
|
||||
"github.com/ledgerwatch/erigon/consensus/aura"
|
||||
"github.com/ledgerwatch/erigon/consensus/aura/consensusconfig"
|
||||
"github.com/ledgerwatch/erigon/consensus/bor"
|
||||
"github.com/ledgerwatch/erigon/consensus/bor/contract"
|
||||
"github.com/ledgerwatch/erigon/consensus/bor/heimdall"
|
||||
@ -60,11 +59,9 @@ func CreateConsensusEngine(chainConfig *chain.Config, config interface{}, notify
|
||||
}
|
||||
case *chain.AuRaConfig:
|
||||
if chainConfig.Aura != nil {
|
||||
if consensusCfg.DBPath == "" {
|
||||
consensusCfg.DBPath = filepath.Join(datadir, "aura")
|
||||
}
|
||||
dbPath := filepath.Join(datadir, "aura")
|
||||
var err error
|
||||
eng, err = aura.NewAuRa(chainConfig.Aura, db.OpenDatabase(consensusCfg.DBPath, consensusCfg.InMemory, readonly), chainConfig.Aura.Etherbase, consensusconfig.GetConfigByChain(chainConfig.ChainName))
|
||||
eng, err = aura.NewAuRa(chainConfig.Aura, db.OpenDatabase(dbPath, false, readonly))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module github.com/ledgerwatch/erigon
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230413113449-ace13f88ddad
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230414063533-a693a911a696
|
||||
github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230404044759-5dec854ce336
|
||||
github.com/ledgerwatch/log/v3 v3.7.0
|
||||
github.com/ledgerwatch/secp256k1 v1.0.0
|
||||
|
4
go.sum
4
go.sum
@ -527,8 +527,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3PYPwICLl+/9oulQauOuETfgFvhBDffs0=
|
||||
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
|
||||
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230413113449-ace13f88ddad h1:Y9qQM9CVeN9G2GOmBpIGILJenI5ZZ2/7WRRDAkd4hU0=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230413113449-ace13f88ddad/go.mod h1:jfv6zfkuhalm02Q7wzlmjDdDHf9jxRLO/KM/1aJMhlw=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230414063533-a693a911a696 h1:yGVDGa8CxbEaXDNYyxT58LO8bMNwhiXI2kMUb3/eOpc=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230414063533-a693a911a696/go.mod h1:jfv6zfkuhalm02Q7wzlmjDdDHf9jxRLO/KM/1aJMhlw=
|
||||
github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230404044759-5dec854ce336 h1:Yxmt4Wyd0RCLr7UJJAl0ApCP/f5qkWfvHfgPbnI8ghM=
|
||||
github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230404044759-5dec854ce336/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo=
|
||||
github.com/ledgerwatch/log/v3 v3.7.0 h1:aFPEZdwZx4jzA3+/Pf8wNDN5tCI0cIolq/kfvgcM+og=
|
||||
|
@ -17,8 +17,37 @@
|
||||
"terminalTotalDifficulty": 231707791542740786049188744689299064356246512,
|
||||
"terminalTotalDifficultyPassed": true,
|
||||
"aura": {
|
||||
"DBPath": "",
|
||||
"InMemory": false,
|
||||
"Etherbase": "0x0000000000000000000000000000000000000000"
|
||||
"stepDuration": 5,
|
||||
"blockReward": 0,
|
||||
"maximumUncleCountTransition": 0,
|
||||
"maximumUncleCount": 0,
|
||||
"validators": {
|
||||
"multi": {
|
||||
"0": {
|
||||
"list": ["0x14747a698Ec1227e6753026C08B29b4d5D3bC484"]
|
||||
},
|
||||
"67334": {
|
||||
"list": [
|
||||
"0x14747a698Ec1227e6753026C08B29b4d5D3bC484",
|
||||
"0x56D421c0AC39976E89fa400d34ca6579417B84cA",
|
||||
"0x5CD99ac2F0F8C25a1e670F6BaB19D52Aad69D875",
|
||||
"0x60F1CF46B42Df059b98Acf67C1dD7771b100e124",
|
||||
"0x655e97bA0f63A56c2b56EB3e84f7bf42b20Bae14",
|
||||
"0x755B6259938D140626301c0B6026c1C00C9eD5d9",
|
||||
"0xa8010da9Cb0AC018C86A06301963853CC371a18c"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"blockRewardContractAddress": "0x2000000000000000000000000000000000000001",
|
||||
"blockRewardContractTransition": 0,
|
||||
"randomnessContractAddress": {
|
||||
"0": "0x3000000000000000000000000000000000000001"
|
||||
},
|
||||
"posdaoTransition": 0,
|
||||
"blockGasLimitContractTransitions": {
|
||||
"0": "0x4000000000000000000000000000000000000001"
|
||||
},
|
||||
"registrar": "0x6000000000000000000000000000000000000000"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user