Commit graph

2670 commits

Author SHA1 Message Date
rafaelss
4c828c98bc move third-party import to package of project 2024-11-19 12:12:02 +08:00
rafaelss
98bff4170d Fixes File is not goimports 2024-11-19 12:12:02 +08:00
thinkAfCod
77e6dc181c feat: pprof 2024-11-19 12:12:02 +08:00
Chen Kai
7815dab7af
Merge branch 'ethereum:master' into portal 2024-11-15 22:16:44 +07:00
Martin HS
a5f0001845
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-15 10:15:15 +01:00
Chen Kai
65f1f82e74
Merge branch 'ethereum:master' into portal 2024-11-10 14:35:56 +08:00
Felföldi Zsolt
7cbce8ed58
beacon/blsync: remove cli dependencies (#30720)
This PR moves chain config related code (config file processing, fork
logic, network defaults) from `beacon/types` and `beacon/blsync` into
`beacon/params` while the command line flag logic of the chain config is
moved into `cmd/utils`, thereby removing the cli dependencies from
package `beacon` and its sub-packages.
2024-11-08 15:21:00 +01:00
jwasinger
d42d45046c
cmd/evm: benchmarking via statetest command + filter by name, index and fork (#30442)
When `evm statetest --bench` is specified, benchmark the execution
similarly to `evm run`.

Also adds the ability to filter tests by name, index and fork. 

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-11-08 15:18:42 +01:00
Chen Kai
dbe8ce7093
Merge branch 'ethereum:master' into portal 2024-11-08 10:54:12 +08:00
Marius van der Wijden
9c08631bb0
cmd/utils: change blssync.JWTSecretFlag to DirectoryFlag (#30729)
closes https://github.com/ethereum/go-ethereum/issues/30304

We already use `DirectoryFlag` for `authrpc.jwtsecret` which expands the
tilde, so this should work out of the box
2024-11-06 18:24:55 +01:00
Chen Kai
0601361c12 fix:remove flags merge
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-11-02 14:25:16 +08:00
Martin HS
b3e1049a61 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-02 14:10:35 +08:00
Péter Szilágyi
c3b9762ff6 internal/flags: remove low-use type TextMarshalerFlag (#30707)
Currently we have a custom TextMarshalerFlag. It's a nice idea, allowing
anything implementing text marshaller to be used as a flag. That said,
we only ever used it in one place because it's not that obvious how to
use and it needs some boilerplate on the type itself too, apart of the
heavy boilerplate got the custom flag.

All in all there's no *need* to drop this feature just now, but while
porting the cmds over to cli @v3, all other custom flags worker
perfectly, whereas this one started crashing deep inside the cli
package. The flag handling in v3 got rebuild on generics and there are a
number of new methods needed; and my guess is that maybe one of them
doesn't work like this flag currently is designed too.

We could definitely try and redesign this flag for cli v3... but all
that effort and boilerplate just to use it for 1 flag in 1 location,
seems not worth it. So for now I'm suggesting removing it and maybe
reconsider a similar feature in cli v3 with however it will work.
2024-11-02 14:09:32 +08:00
Péter Szilágyi
19bb0110b8 internal/flags: remove Merge, it's identical to slices.Concat (#30706)
This is a noop change to not have custom code for stdlib functionality.
2024-11-02 14:09:32 +08:00
Péter Szilágyi
e40c5e9362 cmd/utils, eth/ethconfig: remove some ancient leftover flag (#30705)
This is a flag leftover from the swarm era. No need to deprecate it,
it's been useless/dead forever now.
2024-11-02 14:09:32 +08:00
Martin HS
f3b4bbbaf3
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-10-31 19:53:35 +01:00
Péter Szilágyi
a1d049c1c4
internal/flags: remove low-use type TextMarshalerFlag (#30707)
Currently we have a custom TextMarshalerFlag. It's a nice idea, allowing
anything implementing text marshaller to be used as a flag. That said,
we only ever used it in one place because it's not that obvious how to
use and it needs some boilerplate on the type itself too, apart of the
heavy boilerplate got the custom flag.

All in all there's no *need* to drop this feature just now, but while
porting the cmds over to cli @v3, all other custom flags worker
perfectly, whereas this one started crashing deep inside the cli
package. The flag handling in v3 got rebuild on generics and there are a
number of new methods needed; and my guess is that maybe one of them
doesn't work like this flag currently is designed too.

We could definitely try and redesign this flag for cli v3... but all
that effort and boilerplate just to use it for 1 flag in 1 location,
seems not worth it. So for now I'm suggesting removing it and maybe
reconsider a similar feature in cli v3 with however it will work.
2024-10-31 19:52:39 +01:00
Péter Szilágyi
20bf543a64
internal/flags: remove Merge, it's identical to slices.Concat (#30706)
This is a noop change to not have custom code for stdlib functionality.
2024-10-31 19:26:02 +02:00
Péter Szilágyi
5230b06d51
cmd/utils, eth/ethconfig: remove some ancient leftover flag (#30705)
This is a flag leftover from the swarm era. No need to deprecate it,
it's been useless/dead forever now.
2024-10-31 16:03:47 +01:00
Chen Kai
17e5c9ef83 Merge branch 'gethmaster' into selfportal 2024-10-30 22:39:43 +08:00
Rafael Sampaio
9c4f3b2f8d change log levels and extract duplicate logic 2024-10-29 12:08:03 +08:00
Rafael Sampaio
c8f6feb7ae Implementation of entries and storage metrics 2024-10-29 12:08:03 +08:00
Péter Szilágyi
bce420b99f
cmd/geth: avoid hard coding the IPC name (#30687) 2024-10-28 22:29:25 +02:00
Chen Kai
4dc2a01974
Merge branch 'ethereum:master' into portal 2024-10-25 22:11:39 +08:00
Felföldi Zsolt
6c6bf6fe64
beacon/blsync: add holesky config and update checkpoints (#30671)
This PR adds the beacon chain config for the holesky testnet. It also
updates beacon checkpoints for Mainnet and Sepolia.
2024-10-25 13:20:18 +02:00
Chen Kai
80ef312cb4
Merge branch 'ethereum:master' into portal 2024-10-23 23:59:22 +08:00
jwasinger
478012ab23
all: remove TerminalTotalDifficultyPassed (#30609)
rebased https://github.com/ethereum/go-ethereum/pull/29766 . The
downstream branch appears to have been deleted and I don't have perms to
push to that fork.

`TerminalTotalDifficultyPassed` is removed. `TerminalTotalDifficulty`
must now be non-nil, and it is expected that networks are already
merged: we can only import PoW/Clique chains, not produce blocks on
them.

---------

Co-authored-by: stevemilk <wangpeculiar@gmail.com>
2024-10-23 08:26:18 +02:00
rafaelss
49351666c5
Merge branch 'optimism-java:portal' into metrics_ethstats 2024-10-21 16:41:59 -04:00
Chen Kai
5d315f8d32
Merge branch 'ethereum:master' into portal 2024-10-21 22:11:24 +08:00
Péter Szilágyi
dac54e31a7
build, internal, version: break ci.go/version->common dependency (#30638)
This PR tries to break the ci.go to common dependency by moving the
version number out of params.
2024-10-20 19:28:39 +03:00
rjl493456442
b6c62d5887
core, trie, triedb: minor changes from snapshot integration (#30599)
This change ports some non-important changes from https://github.com/ethereum/go-ethereum/pull/30159, including interface renaming and some trivial refactorings.
2024-10-18 17:06:31 +02:00
Rafael Sampaio
d1b5606b00 metric storage_capacity 2024-10-17 18:41:12 -03:00
Chen Kai
c5236fc9a9
Merge branch 'ethereum:master' into portal 2024-10-17 14:40:34 +08:00
Sina M
978ca5fc5e
eth/tracers: various fixes (#30540)
Breaking changes:

- The ChainConfig was exposed to tracers via VMContext passed in
`OnTxStart`. This is unnecessary specially looking through the lens of
live tracers as chain config remains the same throughout the lifetime of
the program. It was there so that native API-invoked tracers could
access it. So instead we moved it to the constructor of API tracers.

Non-breaking:

- Change the default config of the tracers to be `{}` instead of nil.
This way an extra nil check can be avoided.

Refactoring:

- Rename `supply` struct to `supplyTracer`.
- Un-export some hook definitions.
2024-10-17 06:51:47 +02:00
Rafael Sampaio
33843613e0 code cleanup and improved variable names 2024-10-15 17:41:29 -03:00
Rafael Sampaio
eca301a9b1 move logformat flag to portal network namespace 2024-10-15 16:29:45 -03:00
Rafael Sampaio
1865b12357 add flag to format logs 2024-10-15 16:21:05 -03:00
Martin HS
5adc314817
build: update to golangci-lint 1.61.0 (#30587)
Changelog: https://golangci-lint.run/product/changelog/#1610 

Removes `exportloopref` (no longer needed), replaces it with
`copyloopvar` which is basically the opposite.

Also adds: 
- `durationcheck`
- `gocheckcompilerdirectives`
- `reassign`
- `mirror`
- `tenv`

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-10-14 19:25:22 +02:00
Chen Kai
60951973dc
Merge branch 'ethereum:master' into portal 2024-10-14 13:58:54 +08:00
lightclient
2246d66135
cmd/evm: fixup issues with requests in t8n (#30584)
This fixes a few issues missed in #29052:

* `requests` must be hex encoded, so added a helper to marshal.
* The statedb was committed too early and so the result of the system
calls was lost.
* For devnet-4 we need to pull off the type byte prefix from the request
data.
2024-10-13 18:47:51 +02:00
Chen Kai
db300a3a56
Merge branch 'ethereum:master' into portal 2024-10-12 15:07:26 +08:00
Felix Lange
3a5313f3f3
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-10-11 21:36:13 +02:00
rafaelss
c1ed669bb6
Merge pull request #183 from fearlessfe/hot-fix-key
fix: write key error
2024-10-10 14:37:56 -04:00
rafaelss
c5bba8324d
create directory before create file 2024-10-10 11:39:17 -03:00
Chen Kai
a2be28094b
Merge branch 'ethereum:master' into portal 2024-10-09 18:32:58 +08:00
Felix Lange
2936b41514
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-10-09 12:24:58 +02:00
Chen Kai
1446e66d30 Merge branch 'gethmaster' into selfportal 2024-10-09 10:36:11 +08:00
fearlessfe
fb7860e43f fix: write key error 2024-10-05 12:24:51 +08:00
Rafael Sampaio
d831ad6c25 reuse of geth flags and related code 2024-10-05 11:50:15 +08:00
Rafael Sampaio
8054d16b26 implementation of metrics influx, influxV2 and local web server 2024-10-05 11:50:15 +08:00