forked from cerc-io/plugeth
all: remove support for Ropsten (#26644)
This commit is contained in:
@@ -4049,7 +4049,14 @@ func TestCreateThenDeletePreByzantium(t *testing.T) {
|
||||
// We use Ropsten chain config instead of Testchain config, this is
|
||||
// deliberate: we want to use pre-byz rules where we have intermediate state roots
|
||||
// between transactions.
|
||||
testCreateThenDelete(t, params.RopstenChainConfig)
|
||||
testCreateThenDelete(t, ¶ms.ChainConfig{
|
||||
ChainID: big.NewInt(3),
|
||||
HomesteadBlock: big.NewInt(0),
|
||||
EIP150Block: big.NewInt(0),
|
||||
EIP155Block: big.NewInt(10),
|
||||
EIP158Block: big.NewInt(10),
|
||||
ByzantiumBlock: big.NewInt(1_700_000),
|
||||
})
|
||||
}
|
||||
func TestCreateThenDeletePostByzantium(t *testing.T) {
|
||||
testCreateThenDelete(t, params.TestChainConfig)
|
||||
|
||||
@@ -78,31 +78,6 @@ func TestCreation(t *testing.T) {
|
||||
{20000000, 0, ID{Hash: checksumToBytes(0xf0afd0e3), Next: 0}}, // Future Gray Glacier block
|
||||
},
|
||||
},
|
||||
// Ropsten test cases
|
||||
{
|
||||
params.RopstenChainConfig,
|
||||
params.RopstenGenesisHash,
|
||||
[]testcase{
|
||||
{0, 0, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Unsynced, last Frontier, Homestead and first Tangerine block
|
||||
{9, 0, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Last Tangerine block
|
||||
{10, 0, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // First Spurious block
|
||||
{1699999, 0, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // Last Spurious block
|
||||
{1700000, 0, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // First Byzantium block
|
||||
{4229999, 0, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // Last Byzantium block
|
||||
{4230000, 0, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // First Constantinople block
|
||||
{4939393, 0, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // Last Constantinople block
|
||||
{4939394, 0, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // First Petersburg block
|
||||
{6485845, 0, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // Last Petersburg block
|
||||
{6485846, 0, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // First Istanbul block
|
||||
{7117116, 0, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // Last Istanbul block
|
||||
{7117117, 0, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // First Muir Glacier block
|
||||
{9812188, 0, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // Last Muir Glacier block
|
||||
{9812189, 0, ID{Hash: checksumToBytes(0xa157d377), Next: 10499401}}, // First Berlin block
|
||||
{10499400, 0, ID{Hash: checksumToBytes(0xa157d377), Next: 10499401}}, // Last Berlin block
|
||||
{10499401, 0, ID{Hash: checksumToBytes(0x7119b6b3), Next: 0}}, // First London block
|
||||
{11000000, 0, ID{Hash: checksumToBytes(0x7119b6b3), Next: 0}}, // Future London block
|
||||
},
|
||||
},
|
||||
// Rinkeby test cases
|
||||
{
|
||||
params.RinkebyChainConfig,
|
||||
|
||||
@@ -189,8 +189,6 @@ func CommitGenesisState(db ethdb.Database, triedb *trie.Database, hash common.Ha
|
||||
switch hash {
|
||||
case params.MainnetGenesisHash:
|
||||
genesis = DefaultGenesisBlock()
|
||||
case params.RopstenGenesisHash:
|
||||
genesis = DefaultRopstenGenesisBlock()
|
||||
case params.RinkebyGenesisHash:
|
||||
genesis = DefaultRinkebyGenesisBlock()
|
||||
case params.GoerliGenesisHash:
|
||||
@@ -423,8 +421,6 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
|
||||
return g.Config
|
||||
case ghash == params.MainnetGenesisHash:
|
||||
return params.MainnetChainConfig
|
||||
case ghash == params.RopstenGenesisHash:
|
||||
return params.RopstenChainConfig
|
||||
case ghash == params.SepoliaGenesisHash:
|
||||
return params.SepoliaChainConfig
|
||||
case ghash == params.RinkebyGenesisHash:
|
||||
@@ -533,18 +529,6 @@ func DefaultGenesisBlock() *Genesis {
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultRopstenGenesisBlock returns the Ropsten network genesis block.
|
||||
func DefaultRopstenGenesisBlock() *Genesis {
|
||||
return &Genesis{
|
||||
Config: params.RopstenChainConfig,
|
||||
Nonce: 66,
|
||||
ExtraData: hexutil.MustDecode("0x3535353535353535353535353535353535353535353535353535353535353535"),
|
||||
GasLimit: 16777216,
|
||||
Difficulty: big.NewInt(1048576),
|
||||
Alloc: decodePrealloc(ropstenAllocData),
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultRinkebyGenesisBlock returns the Rinkeby network genesis block.
|
||||
func DefaultRinkebyGenesisBlock() *Genesis {
|
||||
return &Genesis{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -95,14 +95,14 @@ func TestSetupGenesis(t *testing.T) {
|
||||
wantConfig: customg.Config,
|
||||
},
|
||||
{
|
||||
name: "custom block in DB, genesis == ropsten",
|
||||
name: "custom block in DB, genesis == goerli",
|
||||
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
|
||||
customg.MustCommit(db)
|
||||
return SetupGenesisBlock(db, trie.NewDatabase(db), DefaultRopstenGenesisBlock())
|
||||
return SetupGenesisBlock(db, trie.NewDatabase(db), DefaultGoerliGenesisBlock())
|
||||
},
|
||||
wantErr: &GenesisMismatchError{Stored: customghash, New: params.RopstenGenesisHash},
|
||||
wantHash: params.RopstenGenesisHash,
|
||||
wantConfig: params.RopstenChainConfig,
|
||||
wantErr: &GenesisMismatchError{Stored: customghash, New: params.GoerliGenesisHash},
|
||||
wantHash: params.GoerliGenesisHash,
|
||||
wantConfig: params.GoerliChainConfig,
|
||||
},
|
||||
{
|
||||
name: "compatible config in DB",
|
||||
@@ -172,7 +172,6 @@ func TestGenesisHashes(t *testing.T) {
|
||||
}{
|
||||
{DefaultGenesisBlock(), params.MainnetGenesisHash},
|
||||
{DefaultGoerliGenesisBlock(), params.GoerliGenesisHash},
|
||||
{DefaultRopstenGenesisBlock(), params.RopstenGenesisHash},
|
||||
{DefaultRinkebyGenesisBlock(), params.RinkebyGenesisHash},
|
||||
{DefaultSepoliaGenesisBlock(), params.SepoliaGenesisHash},
|
||||
} {
|
||||
|
||||
Reference in New Issue
Block a user