Commit graph

2306 commits

Author SHA1 Message Date
Lucca Martins
0873515bcf
Merge remote-tracking branch 'origin/upstream_merge_v1.14.8' into lmartins/upstream_merge_v1.14.10 2025-02-11 03:51:43 -03:00
kamuikatsurgi
fc1d1fb01f
Merge develop 2025-02-11 10:22:01 +05:30
kamuikatsurgi
c79edcfcac
Merge develop and add relevant comments 2025-02-07 10:22:16 +05:30
marcello33
44b94ca6d3
POS-2821: solve lint issues 2025-02-06 13:05:46 +01:00
Lucca Martins
26ec762a11
Merge remote-tracking branch 'origin/upstream_merge_v1.14.8' into lmartins/upstream_merge_v1.14.10 2025-02-04 10:35:52 -03:00
Lucca Martins
fc2198bedd
Merge tag 'v1.14.10' into lmartins/upstream_merge_v1.14.10 2025-02-04 07:41:07 -03:00
kamuikatsurgi
2d2dbcc398
Merge develop branch 2025-01-31 10:21:37 +05:30
chloefeal
b42c28dd93
fix: some typos (#1396)
* build(deps): bump golang.org/x/crypto from 0.24.0 to 0.31.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raneet Debnath <35629432+Raneet10@users.noreply.github.com>
2025-01-31 01:02:27 +05:30
Manav Darji
8a1e0ec125
Enforce parallel evm via flag (#1425)
* (feat): implement --parallelevm.enforce to force using block-stm

* core: debug log

* docs: update docs with new flag

* update all config files

* core: modify chain import test to enforce parallel processing
2025-01-30 23:01:27 +05:30
kamuikatsurgi
78513d75a3
Merge develop and remove commented code 2025-01-30 16:15:29 +05:30
kamuikatsurgi
f09f89e1cb
make bor && make all successful 2025-01-22 15:36:07 +05:30
marcello33
9cb6fcac0b
chg: handle edge cases with string blockNumber 2024-11-13 11:33:02 +01:00
marcello33
a4eb8db5bf
fix: lint 2024-11-08 18:33:58 +01:00
marcello33
8c960fd08a
Merge branch 'develop' of https://github.com/maticnetwork/bor into bor-grpc 2024-11-08 18:13:04 +01:00
marcello33
af939db84b
chg: logs 2024-11-08 16:22:50 +01:00
marcello33
af5c3275b2
chg: fix functions' names 2024-11-08 12:05:03 +01:00
marcello33
aae292c8ca
chg: add logs 2024-11-08 11:22:13 +01:00
Jerry
a7578a3cea Fix panic on getting safe block
Since bor doesn't have "safe" block, the api should always return null when requested safe block.
2024-10-09 07:59:21 -07:00
Jerry
827811a8d2
Fix panic in eth_getLogs 2024-10-03 22:33:45 -07:00
Péter Szilágyi
1df75dbe36
Revert "core/txpool, eth/catalyst: ensure gas tip retains current value upon rollback" (#30521)
Reverts ethereum/go-ethereum#30495

You are free to create a proper Clear method if that's the best way. But
one that does a proper cleanup, not some hacky call to set gas which
screws up logs, metrics and everything along the way. Also doesn't work
for legacy pool local transactions.

The current code had a hack in the simulated code, now we have a hack in
live txpooling code. No, that's not acceptable. I want the live code to
be proper, meaningful API, meaningful comments, meaningful
implementation.
2024-09-27 13:56:25 +03:00
jwasinger
bb9897f11b
core/txpool, eth/catalyst: ensure gas tip retains current value upon rollback (#30495)
Here we move the method that drops all transactions by temporarily increasing the fee
into the TxPool itself. It's better to have it there because we can set it back to the
configured value afterwards. This resolves a TODO in the simulated backend.
2024-09-26 11:08:36 +02:00
Péter Szilágyi
9326a118c7
beacon, core, eth, miner: integrate witnesses into production Geth (#30069)
This PR integrates witness-enabled block production, witness-creating
payload execution and stateless cross-validation into the `engine` API.
The purpose of the PR is to enable the following use-cases (for API
details, please see next section):

- Cross validating locally created blocks:
- Call `forkchoiceUpdatedWithWitness` instead of `forkchoiceUpdated` to
trigger witness creation too.
- Call `getPayload` as before to retrieve the new block and also the
above created witness.
- Call `executeStatelessPayload` against another client to
cross-validate the block.

- Cross validating locally processed blocks:
- Call `newPayloadWithWitness` instead of `newPayload` to trigger
witness creation too.
- Call `executeStatelessPayload` against another client to
cross-validate the block.

- Block production for stateless clients (local or MEV builders):
- Call `forkchoiceUpdatedWithWitness` instead of `forkchoiceUpdated` to
trigger witness creation too.
- Call `getPayload` as before to retrieve the new block and also the
above created witness.
- Propagate witnesses across the consensus libp2p network for stateless
Ethereum.

- Stateless validator validation:
- Call `executeStatelessPayload` with the propagated witness to
statelessly validate the block.

*Note, the various `WithWitness` methods could also *just be* an
additional boolean flag on the base methods, but this PR wanted to keep
the methods separate until a final consensus is reached on how to
integrate in production.*

---

The following `engine` API types are introduced:

```go
// StatelessPayloadStatusV1 is the result of a stateless payload execution.
type StatelessPayloadStatusV1 struct {
	Status          string      `json:"status"`
	StateRoot       common.Hash `json:"stateRoot"`
	ReceiptsRoot    common.Hash `json:"receiptsRoot"`
	ValidationError *string     `json:"validationError"`
}
```

- Add `forkchoiceUpdatedWithWitnessV1,2,3` with same params and returns
as `forkchoiceUpdatedV1,2,3`, but triggering a stateless witness
building if block production is requested.
- Extend `getPayloadV2,3` to return `executionPayloadEnvelope` with an
additional `witness` field of type `bytes` iff created via
`forkchoiceUpdatedWithWitnessV2,3`.
- Add `newPayloadWithWitnessV1,2,3,4` with same params and returns as
`newPayloadV1,2,3,4`, but triggering a stateless witness creation during
payload execution to allow cross validating it.
- Extend `payloadStatusV1` with a `witness` field of type `bytes` if
returned by `newPayloadWithWitnessV1,2,3,4`.
- Add `executeStatelessPayloadV1,2,3,4` with same base params as
`newPayloadV1,2,3,4` and one more additional param (`witness`) of type
`bytes`. The method returns `statelessPayloadStatusV1`, which mirrors
`payloadStatusV1` but replaces `latestValidHash` with `stateRoot` and
`receiptRoot`.
2024-09-20 16:43:42 +03:00
Jerry
bb47bdaa4e
Add pending logs back 2024-09-13 10:54:47 -07:00
Darioush Jalali
7c6b3f9f14
eth/filters: prevent concurrent access in test (#30401)
use a mutex to prevent concurrent access to the api.filters map during `TestPendingTxFilterDeadlock` test
2024-09-13 11:16:47 +02:00
Jerry
b43fb1bf04
Remove duplicated tx fetcher call 2024-09-12 20:41:56 -07:00
Jerry
d9daacad17
Address goroutine leak 2024-09-12 15:56:33 -07:00
anshalshukla
a323609c31
add: eth67 protocol 2024-09-12 16:04:41 +05:30
lightclient
c70b0a9138
beacon/engine/types: remove PayloadV4 (#30415)
h/t @MariusVanDerWijden for finding and fixing this on devnet 3.

I made the mistake of thinking `PayloadVersion` was correlated with the
`GetPayloadVX` method, but it actually tracks which version of
`PayloadAttributes` were passed to `forkchoiceUpdated`. So far, Prague
does not necessitate a new version of fcu, so there is no need for
`PayloadV4`.

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-09-10 21:52:20 +03:00
Roberto Bayardo
88c8459005
eth/fetcher: fix blob transaction propagation (#30125)
This PR fixes an issue with blob transaction propagation due to the blob
transation txpool rejecting transactions with gapped nonces. The
specific changes are:

- fetch transactions from a peer in the order they were announced to
minimize nonce-gaps (which cause blob txs to be rejected

- don't wait on fetching blob transactions after announcement is
received, since they are not broadcast

Testing:
- unit tests updated to reflect that fetch order should always match tx
announcement order
- unit test added to confirm blob transactions are scheduled immediately
for fetching
  - running the PR on an eth mainnet full node without incident so far

---------

Signed-off-by: Roberto Bayardo <bayardo@alum.mit.edu>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-09-06 13:32:01 +03:00
Sina M
8f4fac7b86
internal/ethapi: eth_multicall (#27720)
This is a successor PR to #25743. This PR is based on a new iteration of
the spec: https://github.com/ethereum/execution-apis/pull/484.

`eth_multicall` takes in a list of blocks, each optionally overriding
fields like number, timestamp, etc. of a base block. Each block can
include calls. At each block users can override the state. There are
extra features, such as:

- Include ether transfers as part of the logs
- Overriding precompile codes with evm bytecode
- Redirecting accounts to another address

## Breaking changes

This PR includes the following breaking changes:

- Block override fields of eth_call and debug_traceCall have had the
following fields renamed
  - `coinbase` -> `feeRecipient`
  - `random` -> `prevRandao`
  - `baseFee` -> `baseFeePerGas`

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-09-06 11:31:00 +02:00
rjl493456442
623b17ba20
core/state: state reader abstraction (#29761)
This pull request introduces a state.Reader interface for state
accessing.

The interface could be implemented in various ways. It can be pure trie
only reader, or the combination of trie and state snapshot. What's more,
this interface allows us to have more flexibility in the future, e.g.
the
archive reader (for accessing archive state).

Additionally, this pull request removes the following metrics

- `chain/snapshot/account/reads`
- `chain/snapshot/storage/reads`
2024-09-05 13:10:47 +03:00
anshalshukla
a66305dae3
fix: lint, add: milestone related tests in downloader 2024-09-05 14:03:10 +05:30
anshalshukla
ef88b4dfce
fix: parallelise tests in core 2024-09-05 13:46:37 +05:30
Marius van der Wijden
b0b67be0a2
all: remove forkchoicer and reorgNeeded (#29179)
This PR changes how sidechains are handled. 

Before the merge, it was possible to import a chain with lower td and not set it as canonical. After the merge, we expect every chain that we get via InsertChain to be canonical. Non-canonical blocks can still be inserted
with InsertBlockWIthoutSetHead.

If during the InsertChain, the existing chain is not canonical anymore, we mark it as a sidechain and send the SideChainEvents normally.
2024-09-04 15:03:06 +02:00
lightclient
dfd33c7792
all: implement EIP-6110, execution layer triggered deposits (#29431)
This PR implements EIP-6110: Supply validator deposits on chain. It also sketches
out the base for Prague in the engine API types.
2024-09-04 14:33:51 +02:00
anshalshukla
a159bf7597
fix: set ethapi in handler 2024-09-04 16:29:00 +05:30
anshalshukla
9513da48e2
fix: add back ethApi and mining login in handler 2024-09-04 15:01:04 +05:30
anshalshukla
693d8aebcd
skip: testcase 2024-09-04 10:52:11 +05:30
anshalshukla
cec3ee18d8
fix: testcases 2024-09-03 16:21:20 +05:30
Karl Bartel
36a7134367
Include tracerConfig in created tracing test (#30364)
Fixes the tracer test filler for when there is tracerConfig.
2024-09-02 10:30:33 +02:00
anshalshukla
43043ed7ec
fix: few linting errors 2024-09-02 11:00:33 +05:30
anshalshukla
c0c129859d
fix: testcases 2024-09-01 15:19:05 +05:30
Manav Darji
8285ea7b8c
eth/protocols/snap: skip test 2024-08-31 15:28:58 +05:30
anshalshukla
da49748cd2
fix: Eth2NewBlock, add: tip check in commit txn 2024-08-31 14:53:02 +05:30
anshalshukla
c0ff6dbf81
fix: testcases, add: block broadcasting mechanism 2024-08-30 14:43:02 +05:30
anshalshukla
68d8614b72
fix: tracers, add bor fee log in results 2024-08-26 17:25:47 +05:30
Sina M
a223efcf39
core: implement EIP-2935 (#29465)
https://eips.ethereum.org/EIPS/eip-2935

---------

Co-authored-by: Guillaume Ballet <gballet@gmail.com>
Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
2024-08-26 10:39:35 +02:00
anshalshukla
ab2db597d9
fix: traceTx function 2024-08-22 17:21:22 +05:30
anshalshukla
f88af20009
fix: testcases 2024-08-21 23:25:11 +05:30
Martin HS
30824faf90
eth/tracers: avoid panic in state test runner (#30332)
Make tracers more robust by handling `nil` receipt as input. 
Also pass in a receipt with gas used in the state test runner.
Closes https://github.com/ethereum/go-ethereum/issues/30117.

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2024-08-21 15:16:08 +02:00