Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
test(driver): test block.extraData
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Oct 8, 2023
1 parent 8eecf1d commit 3a3f7d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion driver/chain_syncer/chain_syncer_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package chainSyncer

import (
"bytes"
"context"

"os"
Expand Down Expand Up @@ -64,6 +65,7 @@ func (s *ChainSyncerTestSuite) SetupTest() {
PseZkevmTierFee: common.Big256,
MaxTierFeePriceBumpIterations: 3,
TierFeePriceBump: common.Big2,
ExtraData: "test",
})))

s.p = prop
Expand Down Expand Up @@ -97,7 +99,7 @@ func (s *ChainSyncerTestSuite) TestAheadOfProtocolVerifiedHead2() {

l2Head, err := s.RpcClient.L2.HeaderByNumber(context.Background(), nil)
s.Nil(err)

s.Equal("test", string(bytes.TrimRight(l2Head.Extra, "\x00")))
log.Info("L1HeaderByNumber head", "number", head.Number)
// (equiv to s.state.GetL2Head().Number)
log.Info("L2HeaderByNumber head", "number", l2Head.Number)
Expand Down
3 changes: 2 additions & 1 deletion proposer/proposer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package proposer

import (
"bytes"
"context"
"crypto/ecdsa"
"errors"
Expand Down Expand Up @@ -490,7 +491,7 @@ func (p *Proposer) initTierFees() error {
log.Info(
"Protocol tier",
"id", tier.ID,
"name", string(tier.VerifierName[:]),
"name", string(bytes.TrimRight(tier.VerifierName[:], "\x00")),
"validityBond", tier.ValidityBond,
"contestBond", tier.ContestBond,
"provingWindow", tier.ProvingWindow,
Expand Down
1 change: 1 addition & 0 deletions proposer/proposer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (s *ProposerTestSuite) SetupTest() {
PseZkevmTierFee: common.Big256,
TierFeePriceBump: common.Big2,
MaxTierFeePriceBumpIterations: 3,
ExtraData: "test",
})))

s.p = p
Expand Down

0 comments on commit 3a3f7d1

Please sign in to comment.