Skip to content

Commit

Permalink
add test confirming transition from non-sharding to sharding works ev…
Browse files Browse the repository at this point in the history
…en if first sharding block has blobs (ethereum#38)
  • Loading branch information
roberto-bayardo authored Oct 19, 2022
1 parent 0a53f99 commit 022f8f0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions core/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3906,13 +3906,19 @@ func TestDataBlobTxs(t *testing.T) {
}
)

gspec.Config.BerlinBlock = common.Big0
gspec.Config.LondonBlock = common.Big0
gspec.Config.ShardingForkBlock = common.Big0
// We test the transition from non-sharding to sharding
// Genesis (block 0): AllEthhashProtocolChanges
// Block 1 : ""
// Block 2 : Sharding
gspec.Config.ShardingForkBlock = common.Big2
genesis := gspec.MustCommit(db)
signer := types.LatestSigner(gspec.Config)

blocks, _ := GenerateChain(gspec.Config, genesis, engine, db, 1, func(i int, b *BlockGen) {
blocks, _ := GenerateChain(gspec.Config, genesis, engine, db, 2, func(i int, b *BlockGen) {
if i == 0 {
// i==0 is a non-sharding block
return
}
b.SetCoinbase(common.Address{1})
msg := types.BlobTxMessage{
Nonce: 0,
Expand Down

0 comments on commit 022f8f0

Please sign in to comment.