Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream sync - v2.45.3 #82

Merged
merged 45 commits into from
Jul 19, 2023
Merged

Upstream sync - v2.45.3 #82

merged 45 commits into from
Jul 19, 2023

Conversation

ImTei
Copy link
Member

@ImTei ImTei commented Jul 18, 2023

Upstream sync PR

erigon

ledgerwatch/erigon v2.45.3 -> testinprod-io/op-erigon 57f5025

erigon-lib

ledgerwatch/erigon-lib 42c9c28 -> testinprod-io/erigon-lib ab32bd8

erigon-interfaces

ledgerwatch/interfaces cdc6e21 -> testinprod-io/erigon-interfaces 410b1ba

yperbasis and others added 30 commits June 2, 2023 21:26
…ech#7643)

- stage_senders: don't re-calc existing senders
- stage_tx_lookup: prune less blocks per iteration - because
random-deletes are expensive. pruning must not slow-down sync.
- prune data even if --snap.stop is set
- "prune as-much-as-possible at startup" is not very good idea: at
initialCycle machine can be cold and prune will cause big downtime, no
reason to produce much freelist in 1 tx. People may also restart erigon
- because of some bug - and it will cause unexpected downtime (usually
Erigon startup very fast). So, I just remove all `initialSync`-related
logic in pruning.
- fix lost metrics about disk write byte/sec
interface for recording things
…es (erigontech#7646)

This branch is intended to allow the devnet to be used for testing
multiple consents types beyond the default clique. It is initially being
used to test Bor consensus for polygon.

It also has the following refactoring:

### 1.  Network configuration

The two node arg building functions miningNodeArgs and nonMiningNodeArgs
have been replaced with a configuration struct which is used to
configure:

```go
network := &node.Network{
		DataDir: dataDir,
		Chain:   networkname.DevChainName,
		//Chain:              networkname.BorDevnetChainName,
		Logger:             logger,
		BasePrivateApiAddr: "localhost:9090",
		BaseRPCAddr:        "localhost:8545",
		Nodes: []node.NetworkNode{
			&node.Miner{},
			&node.NonMiner{},
		},
	}
```
and start multiple nodes

```go
network.Start()
```
Network start will create a network of nodes ensuring that all nodes are
configured with non clashing network ports set via command line
arguments on start-up.

### 2. Request Routing

The `RequestRouter` has been updated to take a 'target' rather than
using a static dispatcher which routes to a single node on the network.
Each node in the network has its own request generator so command and
services have more flexibility in request routing and
`ExecuteAllMethods` currently takes the `node.Network` as an argument
and can pick which node (node 0 for the moment) to send requests to.
…ake re-org cheaper (erigontech#7648)

- allow store non-canonical blocks/senders
- optimize re-org: don't update/delete most of data
- allow mark chain as `Bad` - will be not visible by eth_getBlockByHash,
but can read if have hash+num
I've added a non root logger to bor.ValidatorSet validator set. This
creates a signature change on a number of calling functions to propagate
the logger. This is mostly constrained to the bor package but impacts a
number of tests and utilities which call the validators set.
…tech#7681)

This PR does the following things:
- Updates the hardfork number of the upcoming Indore hardfork schedule
at block 36877056.
- Refactoring to `CommitStates` method of bor consensus
- Fixes a bug in triggering mining
@ImTei ImTei requested a review from pcw109550 July 19, 2023 00:46
if parentBlock != nil {
excessDataGas = parentBlock.ExcessDataGas()
}
chainConfig, _ = api.chainConfig(tx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already inited chainConfig at

chainConfig, err := api.chainConfig(tx)

Suggested change
chainConfig, _ = api.chainConfig(tx)

@ImTei ImTei requested a review from pcw109550 July 19, 2023 06:04
@ImTei ImTei merged commit 077a3d5 into op-erigon Jul 19, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants