diff --git a/go.mod b/go.mod index 287c273a30e..695291f870a 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/julienschmidt/httprouter v1.3.0 github.com/kevinburke/go-bindata v3.21.0+incompatible - github.com/ledgerwatch/erigon-lib v0.0.0-20220125082059-82667bf609b6 + github.com/ledgerwatch/erigon-lib v0.0.0-20220125102011-df95313a3132 github.com/ledgerwatch/log/v3 v3.4.0 github.com/ledgerwatch/secp256k1 v1.0.0 github.com/logrusorgru/aurora/v3 v3.0.0 diff --git a/go.sum b/go.sum index 9a9a9b2025a..e4b33912d22 100644 --- a/go.sum +++ b/go.sum @@ -634,8 +634,8 @@ github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3P github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= 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-20220125082059-82667bf609b6 h1:LFZmsFsSIWr00+QFkuopE/3XB6jS3tuGOfL/p4v1RlI= -github.com/ledgerwatch/erigon-lib v0.0.0-20220125082059-82667bf609b6/go.mod h1:BQNYmN6i8RdHqedsztAj3XDnswYebacmFAnsznlisTc= +github.com/ledgerwatch/erigon-lib v0.0.0-20220125102011-df95313a3132 h1:Cp45DGaH+6lvy33G4wCdtHAa/1FeA3WLxhW649pcbLk= +github.com/ledgerwatch/erigon-lib v0.0.0-20220125102011-df95313a3132/go.mod h1:BQNYmN6i8RdHqedsztAj3XDnswYebacmFAnsznlisTc= github.com/ledgerwatch/log/v3 v3.4.0 h1:SEIOcv5a2zkG3PmoT5jeTU9m/0nEUv0BJS5bzsjwKCI= github.com/ledgerwatch/log/v3 v3.4.0/go.mod h1:VXcz6Ssn6XEeU92dCMc39/g1F0OYAjw1Mt+dGP5DjXY= github.com/ledgerwatch/secp256k1 v1.0.0 h1:Usvz87YoTG0uePIV8woOof5cQnLXGYa162rFf3YnwaQ= diff --git a/turbo/shards/state_change_accumulator.go b/turbo/shards/state_change_accumulator.go index dab38689560..9fdf9f0b8dc 100644 --- a/turbo/shards/state_change_accumulator.go +++ b/turbo/shards/state_change_accumulator.go @@ -36,11 +36,11 @@ func (a *Accumulator) Reset(viewID uint64) { a.viewID = viewID } func (a *Accumulator) ChainConfig() *params.ChainConfig { return a.chainConfig } -func (a *Accumulator) SendAndReset(ctx context.Context, c StateChangeConsumer, pendingBaseFee uint64) { +func (a *Accumulator) SendAndReset(ctx context.Context, c StateChangeConsumer, pendingBaseFee uint64, blockGasLimit uint64) { if a == nil || c == nil || len(a.changes) == 0 { return } - sc := &remote.StateChangeBatch{DatabaseViewID: a.viewID, ChangeBatch: a.changes, PendingBlockBaseFee: pendingBaseFee} + sc := &remote.StateChangeBatch{DatabaseViewID: a.viewID, ChangeBatch: a.changes, PendingBlockBaseFee: pendingBaseFee, BlockGasLimit: blockGasLimit} c.SendStateChanges(ctx, sc) a.Reset(0) // reset here for GC, but there will be another Reset with correct viewID } diff --git a/turbo/stages/stageloop.go b/turbo/stages/stageloop.go index f7835f89b02..261e3ca12d0 100644 --- a/turbo/stages/stageloop.go +++ b/turbo/stages/stageloop.go @@ -208,7 +208,7 @@ func StageLoopStep( if header.Number.Uint64() == 0 { notifications.Accumulator.StartChange(0, header.Hash(), nil, false) } - notifications.Accumulator.SendAndReset(ctx, notifications.StateChangesConsumer, pendingBaseFee.Uint64()) + notifications.Accumulator.SendAndReset(ctx, notifications.StateChangesConsumer, pendingBaseFee.Uint64(), header.GasLimit) return stagedsync.NotifyNewHeaders(ctx, finishProgressBefore, head, sync.PrevUnwindPoint(), notifications.Events, tx)