Commit graph

16120 commits

Author SHA1 Message Date
Felix Lange
5b4bc68b11 build: show gcc commands 2025-07-04 18:37:51 +02:00
Felix Lange
af834ff52f .gitea: update 2025-07-04 18:25:34 +02:00
Felix Lange
c5422667d0 .gitea: show PATH 2025-07-04 18:22:10 +02:00
Felix Lange
969603d27c .gitea: update 2025-07-04 18:18:59 +02:00
Felix Lange
05a0940708 .gitea: show cgo source directory 2025-07-04 18:15:37 +02:00
Felix Lange
e5c01bcfaa .gitea: disable other builds 2025-07-04 18:09:32 +02:00
Felix Lange
27b705f42c build: show commands 2025-07-04 18:09:03 +02:00
Felix Lange
b5f4d628ac .gitea: disable 64bit 2025-07-04 18:08:52 +02:00
Felix Lange
f0479f3158 .gitea: find gcc 2025-07-04 13:51:32 +02:00
Felix Lange
063033834b .gitea: fix typo in windows workflow
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
2025-07-04 13:45:29 +02:00
Felix Lange
9efe1c16e2 gitea: set PATH in script 2025-07-04 13:42:55 +02:00
Felix Lange
db1806efa2 gitea: try with cmd 2025-07-04 13:38:26 +02:00
Felix Lange
3f4555abc6 .gitea: set PATH 2025-07-04 13:25:40 +02:00
Felix Lange
e225983a06 .gitea: update PATH 2025-07-04 13:03:58 +02:00
Felix Lange
7088e87dce .gitea: add workflow_dispatch for release build
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-07-04 13:02:57 +02:00
rjl493456442
dd7d144745
cmd/utils: update flag description of gcmode (#32145) 2025-07-04 12:17:44 +02:00
Zhou
f786b2a767
cmd/utils: show full deprecated flags (#32141)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This is a follow up PR after #32128 , Seems I've missed to add
--txlookuplimit as hidden. In hte meanwhile, I also add the other 
deprecated flags into the output of `show-deprecated-flags`
2025-07-04 09:40:16 +08:00
Felix Lange
ef6e92e51d .gitea: add windows build (experimental)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-07-03 15:07:22 +02:00
Zhou
97645caf80
cmd/utils, internal/debug: hide the deprecated flags (#32128)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
/ Linux Build (push) Waiting to run
Some of the flags were deprecated, so try to hide them in the help
message. And move the `--vmodule` and `--logjson` flags to the
DeprecatedCategory.
2025-07-03 13:23:00 +08:00
Marius van der Wijden
34f00a42f8
core/state: add GetStateAndCommittedState (#31585)
Improves the SSTORE gas calculation a bit. Previously we would pull up
the state object twice. This is okay for existing objects, since they
are cached, however non-existing objects are not cached, thus we needed
to go through all 128 diff layers as well as the disk layer twice, just
for the gas calculation

```
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/vm
cpu: AMD Ryzen 9 5900X 12-Core Processor            
               │ /tmp/old.txt │            /tmp/new.txt             │
               │    sec/op    │   sec/op     vs base                │
Interpreter-24   1118.0n ± 2%   602.8n ± 1%  -46.09% (p=0.000 n=10)
```

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-07-03 13:19:34 +08:00
rjl493456442
6eb212b245
cmd/workload: rework tracegen to run tracing at block level (#32092)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
This PR changes the trace test to block level, aiming for better
execution performance.

---------

Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
2025-07-02 13:39:44 +02:00
shazam8253
b4979f706c
beacon/blsync: update logs for blsync (Fixes #31968 ) (#32046)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
/ Linux Build (push) Waiting to run
Small update for logs when syncing with blsync. Downgrades the "latest
filled block is not available" to warn.

Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
2025-07-02 12:39:21 +02:00
Felix Lange
41408af9b9 version: begin v1.16.2 release cycle 2025-07-02 10:12:55 +02:00
Felix Lange
12b4131ff7 version: release go-ethereum v1.16.1 stable 2025-07-02 10:12:04 +02:00
maskpp
bc67e7dd48
accounts/abi: generate TryPack* methods for abigen v2 bindings (#31692)
1. Fix the error return format.
**todo**: ~~`bindtype` needs more complex logic to fix it.~~
`
if err != nil {
  return nil, err
}
if err == nil {
  return obj, nil
}
`
2. ~~Return pointer type object to avoid copying the whole struct
content.~~
3. Give the panic decision to the user.
4. Fix empty line at the end of function.

**TODO**: ~~fix some related test cases.~~

---------

Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
2025-07-02 15:16:54 +09:00
maskpp
3fb6499fc9
eth/catalyst: fix edge case in simulated backend (#31871)
geth cmd: `geth --dev --dev.period 5`
call: `debug.setHead` to rollback several blocks.

If the `debug.setHead` call is delayed, it will trigger a panic with a
small probability, due to using the null point of
`fcResponse.PayloadID`.

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2025-07-02 14:50:18 +09:00
Delweng
62a17fdb25
core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-07-02 08:46:03 +08:00
lightclient
fe7a77a6c2
core/types: blockTimestamp in logs is hex-encoded (#32129)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
/ Linux Build (push) Waiting to run
closes #32120
2025-07-01 16:53:10 +02:00
rjl493456442
cbd6ed9e0b
core/filtermaps: define APIs for map, epoch calculation (#31659)
This pull request refines the filtermap implementation, defining key
APIs for map and
epoch calculations to improve readability.

This pull request doesn't change any logic, it's a pure cleanup.

---------

Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
2025-07-01 16:31:09 +02:00
Zhou
cc8d58fdc0
internal: remove unused shh and swarm modules from console (#32073)
Similar to https://github.com/ethereum/go-ethereum/pull/31856, remove
the not availabe shh, swarm modules in the console.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-07-01 19:51:16 +08:00
Ömer Faruk Irmak
f70aaa8399
ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
Towards https://github.com/ethereum/go-ethereum/issues/26974

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-07-01 15:18:49 +08:00
nthumann
7c180f851c
internal/ethapi: prealloc map for the txpool api (#32110)
use `make(map, len(txpool))` to prealloc the map for the txpool content,
to avoid the map growing in the loop.
2025-07-01 15:07:33 +08:00
nthumann
2055196cea
eth/catalyst: fix the log message in newPayloadV4 (#32125)
It should be `newPayloadV4 must only be called for prague payloads` for
the V4 payload error
2025-07-01 15:04:05 +08:00
nthumann
e92619221f
core/filtermaps: clean up log format of unindexing message (#32123)
Sorry for not fully fixed in https://github.com/ethereum/go-ethereum/pull/31761, now the log 
format of unindexing message is cleaned up, to make it consistent with the indexing message.
2025-07-01 15:00:33 +08:00
Forrest Kim
8a9f4bbb6d
Fix log indexer noise after debug_setHead operations (#31934)
## Summary
This PR resolves Issue #31929 by reducing log noise generated by the log
indexer after `debug_setHead` operations.

## Problem Description
When `debug_setHead` is called to rewind the blockchain, blocks are
removed from the database. However, the log indexer's `ChainView`
objects may still hold references to these deleted blocks. When
`extendNonCanonical()` attempts to access these missing headers, it
results in:

1. **Repeated ERROR logs**: `Header not found number=X hash=0x...`
2. **Log noise** that can mask other important errors  
3. **User confusion** about whether this indicates a real problem

## Root Cause Analysis
The issue occurs because:
- `debug_setHead` removes blocks from the blockchain database
- Log indexer's `ChainView` may still reference deleted block hashes
- `extendNonCanonical()` in `core/filtermaps/chain_view.go` tries to
fetch these missing headers
- The existing `return false` logic properly handles the error, but logs
at ERROR level

## Solution
This is a **logging improvement only** - no functional logic changes:

### Changes Made
1. **Log level**: Changed from `ERROR` to `DEBUG` 
2. **Log message**: Enhanced with descriptive context about chain view
extension
3. **Comments**: Added explanation for when this situation occurs
4. **Behavior**: Maintains existing error handling (`return false` was
already present)

### Code Changes
```go
// Before
log.Error("Header not found", "number", number, "hash", hash)
return false

// After  
// Header not found - this can happen after debug_setHead operations
// where blocks have been deleted. Return false to indicate the chain view
// is no longer valid rather than logging repeated errors.
log.Debug("Header not found during chain view extension", "number", number, "hash", hash)
return false
```

## Testing

### Automated Tests
-  All existing filtermaps tests pass: `go test ./core/filtermaps -v`
-  No regressions in related functionality

### Manual Verification
1. **Before fix**: Started geth in dev mode, generated blocks, called
`debug_setHead(3)` → **5 repeated ERROR logs**
2. **After fix**: Same scenario → **4 DEBUG logs, no ERROR noise**

### Test Environment
```bash
# Setup test environment
rm -rf ./dev-test-data
./build/bin/geth --dev --datadir ./dev-test-data --http --http.api debug,eth,net,web3 --verbosity 4

# Generate test blocks and trigger issue
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_setHead","params":["0x3"],"id":1}' http://localhost:8545
```


## Related Issues
- Fixes #31929

## Additional Context
This issue was reported as spurious error messages appearing after
`debug_setHead` operations. The investigation revealed that while the
error handling was functionally correct, the ERROR log level was
inappropriate for this expected scenario in development/debugging
workflows.

The fix maintains full compatibility while significantly improving the
debugging experience for developers using `debug_setHead`.

---------

Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com>
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
2025-07-01 08:50:02 +02:00
Ceyhun Onur
1f4ea4d162
eth/filters: add address limit to filters (#31876)
The address filter was never checked against a maximum limit, which can
be somewhat abusive for API nodes. This PR adds a limit similar to
topics

## Description (AI generated)

This pull request introduces a new validation to enforce a maximum limit
on the number of addresses allowed in filter criteria for Ethereum logs.
It includes updates to the `FilterAPI` and `EventSystem` logic, as well
as corresponding test cases to ensure the new constraint is properly
enforced.

### Core functionality changes:

* **Validation for maximum addresses in filter criteria**:
- Added a new constant, `maxAddresses`, set to 100, to define the
maximum allowable addresses in a filter.
- Introduced a new error, `errExceedMaxAddresses`, to handle cases where
the number of addresses exceeds the limit.
- Updated the `GetLogs` method in `FilterAPI` to validate the number of
addresses against `maxAddresses`.
- Modified the `UnmarshalJSON` method to return an error if the number
of addresses in the input JSON exceeds `maxAddresses`.
- Added similar validation to the `SubscribeLogs` method in
`EventSystem`.

### Test updates:

* **New test cases for address limit validation**:
- Added a test in `TestUnmarshalJSONNewFilterArgs` to verify that
exceeding the maximum number of addresses triggers the
`errExceedMaxAddresses` error.
- Updated `TestInvalidLogFilterCreation` to include a test case for an
invalid filter with more than `maxAddresses` addresses.
- Updated `TestInvalidGetLogsRequest` to test for invalid log requests
with excessive addresses.

These changes ensure that the system enforces a reasonable limit on the
number of addresses in filter criteria, improving robustness and
preventing potential performance issues.

---------

Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
2025-07-01 08:13:19 +02:00
Delweng
c59c647ed7
triedb: reset state indexer after snap synced (#32104)
Fix the issue after initial snap sync with `gcmode=archive` enabled.

```
NewPayload: inserting block failed       error="history indexing is out of order, last: null, requested: 1"
```

---------

Signed-off-by: Delweng <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-07-01 11:35:22 +08:00
Felix Lange
87d7c2aa12 .gitea: disable cron schedule
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-06-30 17:24:58 +02:00
Felix Lange
9eed26d1b0 .gitea: fix 386 upload
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-06-30 10:17:59 +02:00
Felix Lange
158118f6d8
.gitea: switch release builds to static linking (#32118)
This is to avoid compatibility issues with mismatched glibc versions
between the builder and deployment target.

Fixes #32102
2025-06-30 09:53:52 +02:00
Stéphane Duchesneau
663fa7b496
eth: correct tracer initialization in BlockchainConfig (#32107)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Docker Image (push) Has been cancelled
core.BlockChainConfig.VmConfig is not a pointer, so setting the Tracer
on the `vmConfig` object after it was passed to options does *not* apply
it to options.VmConfig

This fixes the issue by setting the value directly inside the `options`
object and removing the confusing `vmConfig` variable to prevent further
mistakes.
2025-06-28 06:56:20 +08:00
Ömer Faruk Irmak
aa1de05720
node: do not double-wrap KV stores (#32089)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
For no apparent reason, KV stores were getting wrapped in `nofreezedb`
first and then in `freezerdb`.
2025-06-27 15:27:52 +08:00
Delweng
8e17b371fd
all: replace override.prague with osaka (#32093)
replace `--override.prague` with `--override.osaka`

Signed-off-by: jsvisa <delweng@gmail.com>
2025-06-27 15:18:05 +08:00
Felix Lange
668c3a7278 .travis.yml: remove travis configuration
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-06-26 22:02:50 +02:00
Felix Lange
094db92d68 .gitea: trigger PPA upload on tag 2025-06-26 21:29:59 +02:00
Felix Lange
3941fe0a5f version: begin v1.16.1 release cycle 2025-06-26 20:58:52 +02:00
Felix Lange
57f8971b89 version: release go-ethereum v1.16.0 stable 2025-06-26 20:54:41 +02:00
rjl493456442
0c90e4bda0
all: incorporate state history indexing status into eth_syncing response (#32099)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
This pull request tracks the state indexing progress in eth_syncing
RPC response, i.e. we will return non-null syncing status until indexing
has finished.
2025-06-26 17:20:20 +02:00
rjl493456442
36bcc24fbe
triedb/pathdb: fix journal resolution in pathdb (#32097)
This pull request fixes a flaw in the PBSS state iterator, which
could return empty account or storage data.

In PBSS, multiple in-memory diff layers and a write buffer are
maintained. These layers are persisted to the database and reloaded after
node restarts. However, since the state data is encoded using RLP, the
distinction between nil and an empty byte slice is lost during the encode/decode
process. As a result, invalid state values such as `[]byte{}` can appear in PBSS
and ultimately be returned by the state iterator.


Checkout
https://github.com/ethereum/go-ethereum/blob/master/triedb/pathdb/iterator_fast.go#L270
for more iterator details.

It's a long-term existent issue and now be activated since the snapshot
integration.
The error `err="range contains deletion"` will occur when Geth tries to
serve other
peers with SNAP protocol request.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-06-26 17:19:02 +02:00
rjl493456442
a92f2b86e3
core, eth, triedb: serve historical states over RPC (#31161)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
This is the part-2 for archive node over path mode, which ultimately
ships the functionality to serve the historical states
2025-06-25 16:50:54 +08:00