Commit graph

550 commits

Author SHA1 Message Date
Manav Darji
1acf5e6eb0
Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
Manav Darji
4a60a3e16d
internal/cli: use correct RPCMarshalBlock function 2025-02-18 19:06:11 +05:30
Manav Darji
427ae01c2d
Merge tag 'v1.14.11' into manav/upstream_merge_v1.14.11 2025-02-18 18:55:48 +05:30
Lucca Martins
13d6ac9f58
fix global gas cap 2025-02-04 16:14:31 -03:00
Lucca Martins
5db5e5d817
keep gp to call always max 2025-02-04 15:14:46 -03: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
f09f89e1cb
make bor && make all successful 2025-01-22 15:36:07 +05:30
Lucca Martins
b0bba24d7c removed blob tx tests 2025-01-14 04:08:07 -03:00
Lucca Martins
31e7d4a4ed proper error handling for not found scenarios 2025-01-13 07:26:21 -03:00
Lucca Martins
3582958cc0 eth_getTransactionByBlockHashAndIndex tests and fix on parallel tests 2025-01-12 19:03:19 -03:00
Lucca Martins
5646ee6258 getAllBlockTransactionsTest 2025-01-12 18:30:00 -03:00
Lucca Martins
a345d6c95c GetBlockReceipts test 2025-01-12 17:05:00 -03:00
Lucca Martins
828fc00b6f GetTransactionByHash tests and rawdb call replacement 2025-01-12 09:44:47 -03:00
Lucca Martins
41134d0473 state sync tests on rpc methods 2025-01-12 04:07:25 -03:00
Jerry
b49047f4ee
core/state: fix SetStorage override behavior (#30185) (#1393)
This pull request fixes the broken feature where the entire storage set is overridden.

Originally, the storage set override was achieved by marking the associated account
as deleted, preventing access to the storage slot on disk. However, since #29520, this
flag is also checked when accessing the account, rendering the account unreachable.

A fix has been applied in this pull request, which re-creates a new state object with all
account metadata inherited.

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2024-12-24 09:03:42 -08:00
Martin HS
55b18e9bc1 cmd/geth: remove unlock commandline flag (#30737)
This is one further step towards removing account management from
`geth`. This PR deprecates the flag `unlock`, and makes the flag moot:
unlock via geth is no longer possible.
2024-11-19 14:50:11 +01:00
jwasinger
25d0740f18 internal/ethapi: Set basefee for AccessList based on given block, not chain tip (#30538) 2024-11-19 14:50:11 +01:00
Martin HS
21b3400ae5 all: remove personal RPC namespace (#30704)
This PR is a first step towards removing account management from geth,
and contains a lot of the user-facing changes.

With this PR, the `personal` namespace disappears. **Note**: `personal`
namespace has been deprecated for quite some time (since
https://github.com/ethereum/go-ethereum/pull/26390 1 year and 8 months
ago), and users who have wanted to use it has been forced to used the
flag `--rpc.enabledeprecatedpersonal`. So I think it's fairly
non-controversial to drop it at this point.

Specifically, this means: 

- Account/wallet listing
  -`personal.getListAccounts`  
  -`personal.listAccounts`     
  -`personal.getListWallets`   
  -`personal.listWallets`      
- Lock/unlock
  -`personal.lockAccount`      
  -`personal.openWallet`       
  -`personal.unlockAccount`
- Sign ops
  -`personal.sign`             
  -`personal.sendTransaction`  
  -`personal.signTransaction`  
- Imports / inits
  -`personal.deriveAccount`    
  -`personal.importRawKey`     
  -`personal.initializeWallet` 
  -`personal.newAccount`       
  -`personal.unpair` 
- Other: 
  -`personal.ecRecover`        


The underlying keystores and account managent code is still in place,
which means that `geth --dev` still works as expected, so that e.g. the
example below still works:

```
> eth.sendTransaction({data:"0x6060", value: 1, from:eth.accounts[0]})
```	

Also, `ethkey` and `clef` are untouched. 

With the removal of `personal`, as far as I know we have no more API
methods which contain credentials, and if we want to implement
logging-capabilities of RPC ingress payload, it would be possible after
this.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-11-19 14:50:11 +01:00
Martin HS
d7434facba core/state: move state log mechanism to a separate layer (#30569)
This PR moves the logging/tracing-facilities out of `*state.StateDB`,
in to a wrapping struct which implements `vm.StateDB` instead.

In most places, it is a pretty straight-forward change: 
- First, hoisting the invocations from state objects up to the statedb. 
- Then making the mutation-methods simply return the previous value, so
that the external logging layer could log everything.

Some internal code uses the direct object-accessors to mutate the state,
particularly in testing and in setting up state overrides, which means
that these changes are unobservable for the hooked layer. Thus, configuring
the overrides are not necessarily part of the API we want to publish.

The trickiest part about the layering is that when the selfdestructs are
finally deleted during `Finalise`, there's the possibility that someone
sent some ether to it, which is burnt at that point, and thus needs to
be logged. The hooked layer reaches into the inner layer to figure out
these events.

In package `vm`, the conversion from `state.StateDB + hooks` into a
hooked `vm.StateDB` is performed where needed.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-11-19 14:50:11 +01:00
Péter Szilágyi
e5fb824e67 common: drop BigMin and BigMax, they pollute our dep graph (#30645)
Way back we've added `common.math.BigMin` and `common.math.BigMax`.
These were kind of cute helpers, but unfortunate ones, because package
all over out codebase added dependencies to this package just to avoid
having to write out 3 lines of code.

Because of this, we've also started having package name clashes with the
stdlib `math`, which got solves even more badly by moving some helpers
over ***from*** the stdlib into our custom lib (e.g. MaxUint64). The
latter ones were nuked out in a previous PR and this PR nukes out BigMin
and BigMax, inlining them at all call sites.

As we're transitioning to uint256, if need be, we can add a min and max
to that.
2024-11-19 14:50:11 +01:00
Péter Szilágyi
7a79f2f89f all: get rid of custom MaxUint64 and MaxUint64 (#30636) 2024-11-19 14:50:11 +01:00
Péter Szilágyi
9c054f8ad1 core, eth, ethstats: simplify chain head events (#30601) 2024-11-19 14:50:11 +01:00
jwasinger
086a52d5cb internal/ethapi: refactor TxArgs.setCancunFeeDefaults (#30541)
calculating a reasonable tx blob fee cap (`max_blob_fee_per_gas *
total_blob_gas`) only depends on the excess blob gas of the parent
header. The parent header is assumed to be correct, so the method should
not be able to fail and return an error.
2024-11-19 14:50:11 +01:00
Felix Lange
bee38ebb39 all: implement EIP-7002 & EIP-7251 (#30571)
This is a redo of #29052 based on newer specs. Here we implement EIPs
scheduled for the Prague fork:

- EIP-7002: Execution layer triggerable withdrawals
- EIP-7251: Increase the MAX_EFFECTIVE_BALANCE

Co-authored-by: lightclient <lightclient@protonmail.com>
2024-11-19 14:50:11 +01:00
Felix Lange
c93656f18e all: implement flat deposit requests encoding (#30425)
This implements recent changes to EIP-7685, EIP-6110, and
execution-apis.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Shude Li <islishude@gmail.com>
2024-11-19 14:50:11 +01:00
Jerry
ab66e61737
Fix getBlockTransactionCountByNumber/Hash (#1365) 2024-10-29 11:45:56 -07:00
Jerry
57a7f7fd6f Fix eth_getTransactionReceipt 2024-10-15 11:04:42 -07:00
Jerry
3b9f73ab69
Fix bor tx missing 2024-10-09 09:36:06 -07: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
af5c2b1cad
Merge remote-tracking branch 'upstream/master' into develop 2024-10-01 11:59:32 -07:00
Sina M
40fd887df6
internal/ethapi: remove td field from block (#30386)
implement https://github.com/ethereum/execution-apis/pull/570
2024-10-01 11:36:56 +02:00
Sina M
f2e13c7e33
internal/ethapi: fix gascap 0 for eth_simulateV1 (#30496)
Similar to #30474.
2024-09-24 13:14:38 +02:00
jwasinger
564b616163
internal/ethapi/api: for simulated calls, set gaspool to max value if global gascap is 0 (#30474)
In #27720, we introduced RPC global gas cap. A value of `0` means an unlimited gas cap. However, this was not the case for simulated calls. This PR fixes the behaviour.
2024-09-23 13:31:56 +02:00
Håvard Anda Estensen
4c4f21293e
internal: run tests in parallel (#30381)
Continuation of https://github.com/ethereum/go-ethereum/pull/28546
2024-09-16 08:44:47 +02: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
Manav Darji
8262eae9e3
consensus/bor: use CallWithState to fetch last state id (#1323)
* consensus/bor: use CallWithState to fetch last state id

* fix
2024-09-05 21:11:44 +05:30
anshalshukla
a66305dae3
fix: lint, add: milestone related tests in downloader 2024-09-05 14:03:10 +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
3cb949f674
fix: avoid capping warnings for gas set by internal system transactions 2024-09-04 13:12:14 +05:30
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
1a98c5cba2
internal/ethapi/testdata: add note 2024-09-01 14:27:07 +05:30
Manav Darji
20b83d1dc1
internal/ethapi/testdata: revert genesis hash 2024-09-01 14:23:20 +05:30
anshalshukla
fc30355849
fix: TestRPCGetTransactionReceiptsByBlock 2024-09-01 13:36:21 +05:30
anshalshukla
3c48fca257
fix: testcases 2024-08-27 00:51:36 +05:30
anshalshukla
b1419eb41d
fix: testcases 2024-08-13 16:46:46 +05:30
anshalshukla
4a9a875738
merge: master 2024-08-13 11:48:57 +05:30
anshalshukla
5cda3fe0f0
fix: testcases 2024-08-13 11:39:52 +05:30