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

Merge upstream 20231030 #62

Merged
merged 48 commits into from
Nov 2, 2023
Merged

Conversation

jyellick
Copy link

Very simple merge, only conflict was the go.mod

elee1766 and others added 29 commits October 23, 2023 21:23
…gontech#8570)

This PR adds beacon blocks snapshots and beacon blocks snapshot
generator to Caplin, plus a snapshot verifier CLI
Historically we had several times when:
- erigon downloaded new version of .seg file
- or didn't finish download and start indexing

this was a "quick-fix protection" against this cases
but now we have other protections for this cases
let's try to remove this one - because it's not compatible with "copy
datadir" and "restore datadir from backup" scenarios
erigontech#8580)

PR erigontech#8202 might cause Issue erigontech#8550, so reverting it until Alexey's return.

This reverts commit 2ce98f8.
…h#8499)

Bor consensus: this calc is heavy and has cache
Newly introduced `t.logGaps` was being set to `nil` and still accessed
within `clearFailedLogs`. This PR changes the ordering, moving the nil
setting to `CaptureTxEnd`.
* call getEnode before NodeStarted to make sure it is ready for RPC
calls
* fix connection error detection on macOS
* use a non-default p2p port to avoid conflicts
* disable bor milestones on local heimdall
* generate node keys for static peers config
```
 error: conflicting types for ‘mdbx_get_datacmp’ due to enum/integer mismatch; have ‘int (*(unsigned int))(const MDBX_val *, const MDBX_val *)’ {aka ‘int (*(unsigned int))(const struct iovec *, const struct iovec *)’} [-Werror=enum-int-mismatch]
26609 | __cold MDBX_cmp_func *mdbx_get_datacmp(unsigned flags) {
      |                       ^~~~~~~~~~~~~~~~
mdbx.h:4932:1: note: previous declaration of ‘mdbx_get_datacmp’ with type ‘int (*(MDBX_db_flags_t))(const MDBX_val *, const MDBX_val *)’ {aka ‘int (*(MDBX_db_flags_t))(const struct iovec *, const struct iovec *)’}
```
can't upgrade mdbx version for now
read transaction was opened before stream.Recv(), but stream.Recv() is
blocking infinity loop. so, this read transaction never rollback -
causing unlimited db grow.

---------

Merge PR erigontech#8596 into `devel`

---------

Co-authored-by: Alex Sharov <[email protected]>
@jyellick jyellick marked this pull request as draft October 30, 2023 19:07
@jyellick
Copy link
Author

Looks like there is a real failure in the optimism e2e, investigating.

AskAlexSharov and others added 5 commits October 31, 2023 10:11
…8610)

new flag examples.

--https.enabled
--https.addr="0.0.0.0"
--https.port=443
--https.url="unix:///file.wow"
--https.cert="keyfile.cert" 
--https.key="certfile.cert"

also adds support for h2c to the http handler - http2 protocol without tls.
otherwise we start losing maticnetwork/bor peers on devp2p
…eam-20231030

This is especially to pick up the http server fix (where the in process
http server was not starting)
@jyellick
Copy link
Author

This change modifies the log message generated by Erigon when the HTTP server starts. Consequently, it breaks the ext-erigon-e2e tests, which are currently scraping for the other value.

I've verified that they pass locally,

@jyellick jyellick marked this pull request as ready for review October 31, 2023 18:36
mh0lt and others added 14 commits October 31, 2023 18:43
…rigontech#8632)

Tested on Debian 11 by:

    $ git revert HEAD
    $ make docker
    $ docker run --memory=8.8G <sha>

before the fix outputs:

    15.6 GB

after the fix outputs:

    8.8 GB
both batch.Flush() and batch.close() close channel, I think flush is not
necessary to close channel
* fix "genesis hash does not match" when dev nodes connect  
The "dev" nodes need to have the same --miner.etherbase in order to
generate the same genesis ExtraData by DeveloperGenesisBlock(). Override
DevnetEtherbase global var that's used if --miner.etherbase is not
passed. (for NonBlockProducer case)

* fix missing private key for the hardcoded DevnetEtherbase  
Fixes panic if SigKey is not found. Bor non-producers will use a default
`DevnetEtherbase` while Dev nodes modify it. Save hardcoded
DevnetEtherbase/DevnetSignPrivateKey into accounts so that SigKey can
recover it.

* refactor devnet.node to contain Node config  
This avoids interface{} type casts and fixes an error with
Heimdall.validatorSet == nil

* add connection retries to rpcCall and Subscribe of requestGenerator  
Fixes "connection refused" errors due to node not ready to handle early
RPC requests.

* fix deadlock in Heimdall.NodeStarted

* fix GetBlockByNumber
Fixes "cannot unmarshal string into Go struct field body.transactions of
type jsonrpc.RPCTransaction"

* demote "no of blocks on childchain is less than confirmations
required" to Info (erigontech#8626)

* demote "mismatched pending subpool size" to Debug (erigontech#8615)

* revert wiggle testing code
Reason: 
- produce and seed snapshots earlier on chain tip. reduce depnedency on
"good peers with history" at p2p-network.
Some networks have no much archive peers, also ConsensusLayer clients
are not-good(not-incentivised) at serving history.
- avoiding having too much files:
more files(shards) - means "more metadata", "more lookups for
non-indexed queries", "more dictionaries", "more bittorrent
connections", ...
less files - means small files will be removed after merge (no peers for
this files).


ToDo:
[x] Recent 500K - merge up to 100K 
[x] Older than 500K - merge up to 500K 
[x] Start seeding 100k files
[x] Stop seeding 100k files after merge (right before delete)

In next PR: 
[] Old version of Erigon must be able download recent hashes. To achieve
it - at first start erigon will download preverified hashes .toml from
s3 - if it's newer that what we have (build-in) - use it.
We are getting linter errors, because the addition of the historical RPC
endpoints is making the http config struct slightly larger.  I suspect
upstream will run into the problem soon, so as a simple workaround, this
change slightly enlarges the heavy struct max size.
@jyellick
Copy link
Author

jyellick commented Nov 2, 2023

See bobanetwork/boba#84 for updated tests running against this commit

@jyellick jyellick merged commit 171f2d0 into boba-develop Nov 2, 2023
8 of 9 checks passed
@jyellick jyellick deleted the jyellick/merge-upstream-20231030 branch November 3, 2023 20:50
jyellick pushed a commit that referenced this pull request Feb 26, 2024
Override RegolithTime for Optimism mainnet
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.