Skip to content

Commit

Permalink
Patch release 2.50.2 (erigontech#8354)
Browse files Browse the repository at this point in the history
Cherry pick PRs erigontech#8329, erigontech#8339, erigontech#8342

---------

Co-authored-by: Mark Holt <135143369+mh0lt@users.noreply.github.com>
  • Loading branch information
yperbasis and mh0lt authored Oct 3, 2023
1 parent c91efdc commit 1c0e429
Show file tree
Hide file tree
Showing 21 changed files with 1,012 additions and 461 deletions.
5 changes: 3 additions & 2 deletions cmd/integration/commands/state_domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func (b *blockProcessor) commit(ctx context.Context) error {
}

s := time.Now()
defer mxCommitTook.UpdateDuration(s)
defer mxCommitTook.Observe(float64(time.Since(s)))

var spaceDirty uint64
var err error
Expand Down Expand Up @@ -496,7 +496,8 @@ func (b *blockProcessor) applyBlock(
ctx context.Context,
block *types.Block,
) (types.Receipts, error) {
defer mxBlockExecutionTimer.UpdateDuration(time.Now())
s := time.Now()
defer mxBlockExecutionTimer.UpdateDuration(s)

header := block.Header()
b.vmConfig.Debug = true
Expand Down
13 changes: 10 additions & 3 deletions cmd/rpcdaemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (

"github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon/cmd/rpcdaemon/cli"
"github.com/ledgerwatch/erigon/consensus"
"github.com/ledgerwatch/erigon/consensus/bor"
"github.com/ledgerwatch/erigon/consensus/ethash"
"github.com/ledgerwatch/erigon/rpc"
"github.com/ledgerwatch/erigon/turbo/debug"
Expand All @@ -25,13 +27,18 @@ func main() {
return nil
}
defer db.Close()

var engine consensus.EngineReader

if borDb != nil {
defer borDb.Close()
engine = bor.NewRo(borDb, blockReader, logger)
} else {
// TODO: Replace with correct consensus Engine
engine = ethash.NewFaker()
}

// TODO: Replace with correct consensus Engine
engine := ethash.NewFaker()
apiList := jsonrpc.APIList(db, borDb, backend, txPool, mining, ff, stateCache, blockReader, agg, *cfg, engine, logger)
apiList := jsonrpc.APIList(db, backend, txPool, mining, ff, stateCache, blockReader, agg, *cfg, engine, logger)
rpc.PreAllocateRPCMetricLabels(apiList)
if err := cli.StartRpcServer(ctx, *cfg, apiList, logger); err != nil {
logger.Error(err.Error())
Expand Down
301 changes: 0 additions & 301 deletions consensus/bor/api.go

This file was deleted.

Loading

0 comments on commit 1c0e429

Please sign in to comment.