Commit Graph

18243 Commits

Author SHA1 Message Date
omahs
c21d77aa20
Fix: typos (#7710)
Fix: typos
2023-06-12 14:39:52 +07:00
Giulio rebuffo
63006611ec
Added concurrent bls (#7709) 2023-06-12 00:40:03 +02:00
a
4d35e776da
[caplin] abstract transition (#7661)
start of abstracting the transition layer. 

incremental movements.
2023-06-11 23:50:02 +02:00
Enrique Jose Avila Asapche
e380ee4bdd
[Caplin] added configurations for beacon api (#7699)
Now you can configure:

Read timeout (default: 5s)
Write timeout  (default: 5s)
On/off (default: ON)
Port (default:5555)
Address (default:localhost)
Protocol (default: tcp)

#7684
2023-06-11 19:34:33 +02:00
Enrique Jose Avila Asapche
eac9ead6fe
[Caplin] added deneb into converting payload to grpc (#7708)
Added so now we can have version 3 payloads preparing for Deneb
2023-06-11 19:34:06 +02:00
Alex Sharov
afd8ea94d0
e3: move domains to tables.go (#7707) 2023-06-11 21:12:05 +07:00
Mark Holt
f9acbff96c
eth_sendRawTransaction: remove logging, because we have --txpool.trace.senders which enabling more verbose logging for given senders list (#7686)
When testing with `Bor` consensus turned on I discovered that
`SendRawTransaction` returns a 0x000... hash when transactions are
submitted during block transitions. This turns out to be spurious in the
sense that the transaction insertion is successful.

The cause is that `ReadCurrentBlockNumber` returns a nil block number.

This in turn is caused by the following: In `accessors_chain.go` there
are two methods: `WriteHeader` and `WriteHeadHeaderHash` when the first
is called the block number is written for the header. The second writes
the header has, but there is no guarantee when it does that the head
header will have been written yet. In fact it seems to happen sometime
later.

The problem for `SendRawTransation` is that it begins a transaction
after inserting into the txpool. And depending on timing this
transaction may see only the `WriteHeadHeaderHash` insertion, and hence
can't read the block number.

I have mitigated this by opening the db transaction before calling the
tx pool insertion, meaning that it is more likely to have a clean view
of the DB.

I have also moved the chain id check earlier in the code - as I think
that if this is invalid the method should not try to insert transactions
in the first place.

The `ReadCurrentBlockNumber` is only used to produce a log message - so
I've changed this to not fail the whole function but to just log an
unknown sender. Which means that the hash is still returned to the
sender after a successful txpool insertion
2023-06-11 13:18:04 +07:00
Alex Sharov
4766cd8aeb
e2: avoid do RestoreCodeHash twice (#7706)
- do it only once in HistoryStateReader
2023-06-11 12:28:47 +07:00
Alex Sharov
3b89ed81d6
e3: erigon_getBalanceChanges (#7704) 2023-06-11 11:49:53 +07:00
Alex Sharov
b7469d2720
mdbx: tx.GetOne - avoid interface casting (#7703) 2023-06-11 09:45:44 +07:00
Giulio rebuffo
88410559c6
Forgot to configure flags (#7701) 2023-06-10 08:53:24 +02:00
Mark Holt
1e575ea172
rpc service and stageloop logger updates (#7696)
This is another update to logging to replace the root logger with a
contextual logger
2023-06-10 07:39:39 +01:00
ledgerwatch
2ea9eb538e
[bor] Desambiguate the term checkpoint (#7698)
I realised that the term `checkpoint` is used in 2 different meanings in
the code, which are distinct. Renaming one of the to persistentSnapshots
to reduce confusion
2023-06-09 22:19:24 +01:00
Mark Holt
62b2375de9
7667 cli params vhost (#7669)
This change adds 'any' as an alternate wildcard to '*'.

I have updated all doc references in the main erigon repo - let me know
if there is anywhere else that needs changing.
2023-06-09 14:12:11 +01:00
Giulio rebuffo
614769f7ac
Prepare regression testings for kube (#7697) 2023-06-09 14:38:28 +02:00
Andrew Ashikhmin
06af87dad7
EIP-4844: Increase Blob Throughput (#7688)
See https://github.com/ethereum/EIPs/pull/7154
2023-06-09 11:07:28 +02:00
Alex Sharov
1546a79771
lru lib version up (#7695) 2023-06-09 13:46:58 +07:00
Alex Sharov
ddfe93b5c9
e3: enable ci (#7694) 2023-06-09 11:26:26 +07:00
Alex Sharov
2c39570077
e3: to produce stateChanges stream (#7692) 2023-06-09 11:13:06 +07:00
Alex Sharov
afa4f53ae2
e3: use deserializeV3 for history (#7691) 2023-06-09 10:53:04 +07:00
ledgerwatch
7671f419f8
Remove excessive logging in bor (#7690) 2023-06-08 21:24:43 +01:00
Giulio rebuffo
8f8da14814
Optimized THE CAPLIN a lil bit (#7687) 2023-06-08 15:52:09 +02:00
Enrique Jose Avila Asapche
1cb1c303d4
added a listener for beacon api and added get genesis (#7659)
Added two new flags beacon.api.port and beacon.api.addr

Now we can listen for beacon api and get beacon genesis

---------

Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-06-08 09:43:27 +02:00
Manav Darji
421ee911d2
Indore hardfork for polygon mumbai and fixes in bor consensus (#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
2023-06-08 09:20:40 +07:00
Giulio rebuffo
07e2100510
Added Regeression testing for Caplin (#7679) 2023-06-07 20:01:32 +02:00
Andrew Ashikhmin
4a74ee2589
EIP-4844: switch precompile input's z and y to big endian (#7680)
according to https://github.com/ethereum/EIPs/pull/7020. Prerequisite:
https://github.com/ledgerwatch/erigon-lib/pull/1015.
2023-06-07 17:33:15 +02:00
Andrew Ashikhmin
fa0cfcbec7
Remove the Rinkeby testnet (#7677)
See https://github.com/ethereum/go-ethereum/pull/27406
2023-06-07 07:42:36 +02:00
Giulio rebuffo
5e682aa5d5
correct data pruning (#7678) 2023-06-06 22:29:51 +02:00
Mark Holt
37a8450d5f
Added non root logger to bor.ValidatorSet (#7668)
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.
2023-06-06 10:55:59 +01:00
Alex Sharov
250ecfc4d1
Fix integration tests run3 (#7674) 2023-06-06 16:50:04 +07:00
Alex Sharov
d703c3cd8e
e3: Fix integration tests, step 2 (#7673) 2023-06-06 15:51:04 +07:00
Alex Sharov
bf9f5067f3
fix integration tests run (#7672) 2023-06-06 13:49:01 +07:00
Alex Sharov
6c129e5f1d
e3: agg generalize PutIdx method (#7671) 2023-06-06 11:29:30 +07:00
Giulio rebuffo
3a8d5c4d0a
improved freezer for Caplin (#7670) 2023-06-06 03:24:59 +02:00
Alex Sharov
e14664d53b
Store Canonical/NonCanonical/Bad blocks/senders/txs in same tables. Make re-org cheaper (#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
2023-06-05 12:36:24 +07:00
Alex Sharov
f62b6fd722
e3: release switch (#7663) 2023-06-05 12:36:02 +07:00
Alex Sharov
26f9c064ac
mainnet: more block snapshots (#7662) 2023-06-05 11:25:37 +07:00
Giulio rebuffo
e45ed7d139
Added record mode for Caplin (#7660) 2023-06-05 01:52:55 +02:00
Mark Holt
415cf86250
refactor to allow switchable consensus and multiple communicating nodes (#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.
2023-06-04 20:53:05 +01:00
Alex Sharov
feea6b954c
simplify chain config read by rpcdaemon (#7656) 2023-06-04 11:49:10 +07:00
Alex Sharov
895e7dd96a
cleanup (#7655) 2023-06-04 10:37:20 +07:00
Alex Sharov
f70ceefe2c
linter version up (#7654) 2023-06-04 10:32:16 +07:00
Alex Sharov
c8e717c957
rawdb methods to rw db schema version (#7653) 2023-06-04 09:20:22 +07:00
a
21625652f3
[caplin] record mode (#7651)
interface for recording things
2023-06-04 03:13:58 +02:00
Giulio rebuffo
e11c8192f8
fixed deneb for devnet 6 (#7650) 2023-06-04 00:36:16 +02:00
Giulio rebuffo
999c0ba214
Caplin: Fixed bad block handling (#7649) 2023-06-03 19:47:05 +02:00
ledgerwatch
569c120383
Bump version (#7645) 2023-06-03 11:37:56 +01:00
Alex Sharov
157b6de8e3
release small rename (#7647) 2023-06-03 17:26:20 +07:00
Alex Sharov
63c92010cd
remove txsV3 cli flag (#7644) 2023-06-03 15:54:27 +07:00
Alex Sharov
ad72b7178e
prune speedup. stage_senders: don't re-calc existing senders (#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
2023-06-03 12:30:53 +07:00