t8n: sender/signature mismatch is accepted (JSON sender trusted over v/r/s)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
- Ambito
- backend, blockchain
Direzione di ricerca
Start by reading test/utils/statetest_loader.cpp and test/state/state.cpp, where the issue says sender is loaded and used for checks and execution. Run the supplied evmone-t8n and evm t8n commands with the reproducer to compare behavior. Done means transactions with a mismatched or malformed signature are handled consistently with the intended sender validation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
evmone-t8n accepts transactions based on the JSON sender field without validating that (v,r,s) recovers to the same sender.
This creates a cross-client divergence with geth evm t8n: a tx signed by account A can be executed as account B in evmone-t8n if JSON sets sender=B.
Why this matters
In t8n/state-transition semantics, sender should be derived from signature and chain rules (or at least validated against provided sender).
Current behavior lets malformed tx JSON produce wrong state roots and acceptance/rejection results.
Reproducer
alloc.json
{
"0x1111111111111111111111111111111111111111": {
"code": "0x",
"nonce": "0x0",
"balance": "0xde0b6b3a7640000",
"storage": {}
}
}
env.json
{
"currentCoinbase": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"currentNumber": "0x01",
"currentTimestamp": "0x54c99069",
"currentGasLimit": "0x2fefd8",
"currentRandom": "0x0000000000000000000000000000000000000000000000000000000000000001",
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"currentBaseFee": "0x1",
"currentExcessBlobGas": "0x0",
"withdrawals": []
}
txs.json
v,r,s below are from a tx signed by 0xa94f5374... (not by 0x1111...).
[
{
"to": "0x095E7BAea6a6c7c4c2DfeB977eFac326aF552d87",
"input": "0x",
"gas": "0x5208",
"nonce": "0x0",
"value": "0x0",
"gasPrice": "0x1",
"chainId": "0x1",
"sender": "0x1111111111111111111111111111111111111111",
"v": "0x26",
"r": "0x62d32a1bac6b89021fce16cf51479a8b00f26523933afde1b62f7957ed1943a3",
"s": "0x6f3941435cb48b0c649c1b0d707fc6878407f6287c9cd89c33c0048bd2710e45"
}
]
Commands
evmone-t8n \
--state.fork Cancun --state.reward 0 --state.chainid 1 \
--input.alloc alloc.json --input.env env.json --input.txs txs.json \
--output.basedir out-evmone --output.result out.json --output.alloc outAlloc.json
evm t8n \
--state.fork Cancun --state.reward 0 --state.chainid 1 \
--input.alloc alloc.json --input.env env.json --input.txs txs.json \
--output.basedir out-geth --output.result out.json --output.alloc outAlloc.json
Observed
evmone-t8n:rejected: []gasUsed: 0x5208- executes transaction and updates state.
- geth
evm t8n:- rejects tx:
insufficient funds ... address 0xa94f5374... have 0 want 21000
gasUsed: 0x0- no executed tx in block result.
- rejects tx:
Suspected root cause
sender is loaded from JSON and used directly for state checks/execution:
test/utils/statetest_loader.cppo.sender = load_if_exists<evmc::address>(j, "sender");- parses
v/r/sbut does not recover/validate sender from signature.
test/state/state.cpp- validation and balance checks use
tx.senderdirectly.
- validation and balance checks use
So (v,r,s) authenticity is effectively not enforced for tx sender in evmone-t8n.
Suggested fix direction
Recover sender from signature (per tx type / chain id / fork rules) and either:
- Use recovered sender as authoritative, or
- Reject when provided
senderdisagrees with recovered sender.
Also reject malformed signatures consistently with other clients.
- Lingua principale
- C++
- Stelle
- 979
- Fork
- 340
- Merge medio
- 12h 16m
- PR unite (30g)
- 25
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ipsilon/evmone
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 57/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ipsilon/evmone
Issue simili
-
ai_p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
ClickHouse/ClickHouse#132519 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: VST3 getMidiControllerAssignment reads past midiControllerToParameter for program changeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
juce-framework/JUCE#1810 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
petercorke/robotics-toolbox-python#952 ·
I maintainer di solito rispondono entro 1 giorno
-
NatronRenderer: a Python error in the script (-t / project script) doesn't change the exit statusApertafunc:engine type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NatronGitHub/Natron#1276 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno