* update go version
* update go version
* format code by goimports
* format code by goimports
* go mod tidy
* update go version
* update go version
* upgrade linter
* add exclude rule
* fix golangci exclude
---------
Co-authored-by: vincent <419436363@qq.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* add KeccakCodeHash and CodeSize to StateAccount
* update StateAccount marshalling logic
* change emptyCodeHash to poseidon(nil)
* purge StateAccount.hash
* fix/disable failing tests
* change keccak and poseidon hash order in StateAccount
* fix lint
* update l2trace account wrapper
* update eth_getProof response type
* fix eth_getProof response type
* goimports
* update the codehash computation
* update the codehash test cases
* go mod tidy
* fix tests
* use keccak instead of poseidon
* update trace codehash field name
* upgrade zktrie to 4.2
* trigger ci
* update state account marshalling according to spec
* improve generatorStats estimation
* add comment
* upgrade zktrie to 4.3
* go mod tidy
* misc fixes
* fix TestDump
* fix snap sync tests
* handle err in the codehash
* fix tests in snapshot/generate_test.go
* remove prevhash from state journal
* add state_account_marshalling_test.go
* goimports
* add more tests
---------
Co-authored-by: Ho Vei <noelwei@gmail.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* feat: change bytecode hash function from Keccak to Poseidon
* fix TestStateProcessorErrors
* rename files
* copy iden3's poseidon package to local
* update poseidon hash
* apply new hash in codehash
* extend hash method, use actual code size as cap
* prune keccak(nil) for empty code
* update empty code hash references to Poseidon
* add TestPoseidonCodeHash
* use keccak for empty code hash
* go mod tidy
* goimports
* use Poseidon code hash in state and sync tests
* run goimports
* run goimports
* remove unnecessary reallocation from CodeHash
* goimports
* move codehash API to separate module
* add missing package
* fix review comments
* improve comments
Co-authored-by: Ho Vei <noelwei@gmail.com>
* eth,rpc: allow for flag configured timeouts for eth_call
* lint: account for package-local import order
* cr: rename `rpc.calltimeout` to `rpc.evmtimeout`
Fixes#23681
After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the
tx mentioned in the ticket, which agrees with etherscan.
Currently, setDefaults overwrites the transaction input value if only input is provided. This causes personal_sendTransaction to estimate the gas based on a transaction with empty data. eth_estimateGas never calls setDefaults so it was unaffected by this.
* internal/ethapi/api: cap highest gas limit by account balance for 1559 fee parameters
* accounts/abi/bind: port gas limit cap for 1559 parameters to simulated backend
* accounts/abi/bind: add test for 1559 gas estimates for the simulated backend
* internal/ethapi/api: fix comment
* accounts/abi/bind/backends, internal/ethapi: unify naming style
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Ticket #23273 found a flaw where we were unable to sign legacy-transactions
using the external signer, even if we're still on non-london network. That's
fixed in this PR.
Additionally, I found that even when supplying all parameters, it was impossible
to sign a london-transaction on an unsynched node. It's a pretty common usecase
that someone wants to sign a transaction using an unsynced 'vanilla' node,
providing all necessary data. Our setDefaults, however, insisted on checking the
current block against the config. This PR therefore adds a case, so that if both
MaxPriorityFeePerGas and MaxFeePerGas are provided, we accept them as given.
OBS This PR fixes a regression -- on current master, we are unable to sign a
london-transaction unless the node is synched, which may break scenarios where
geth (or clef) is used as a cold wallet.
Fixes#23273
* internal/ethapi: revert + fix properly in al tracer
* internal/ethapi: use toMessage instead of creating new message
* internal/ethapi: remove ineffassign
* core: fix invalid unmarshalling, fix test
Co-authored-by: Martin Holst Swende <martin@swende.se>
* internal/ethapi/api: use hexutil.uint for blockCount parameter instead of int for feeHistory
* return hex value for oldestBlock instead of number
* return uint64 from oracle.resolveBlockRange
* eth/gasprice: fixed test
Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
* internal/ethapi: add baseFee to RPCMarshalHeader
* internal/ethapi: add FeeCap, Tip and correct GasPrice to EIP-1559 RPCTransaction results
* core,eth,les,internal: add support for tip estimation in gas price oracle
* internal/ethapi,eth/gasprice: don't suggest tip larger than fee cap
* core/types,internal: use correct eip1559 terminology for json marshalling
* eth, internal/ethapi: fix rebase problems
* internal/ethapi: fix rpc name of basefee
* internal/ethapi: address review concerns
* core, eth, internal, les: simplify gasprice oracle (#25)
* core, eth, internal, les: simplify gasprice oracle
* eth/gasprice: fix typo
* internal/ethapi: minor tweak in tx args
* internal/ethapi: calculate basefee for pending block
* internal/ethapi: fix panic
* internal/ethapi, eth/tracers: simplify txargs ToMessage
* internal/ethapi: remove unused param
* core, eth, internal: fix regressions wrt effective gas price in the evm
* eth/gasprice: drop weird debug println
* internal/jsre/deps: hack in 1559 gas conversions into embedded web3
* internal/jsre/deps: hack basFee to decimal conversion
* internal/ethapi: init feecap and tipcap for legacy txs too
* eth, graphql, internal, les: fix gas price suggestion on all combos
* internal/jsre/deps: handle decimal tipcap and feecap
* eth, internal: minor review fixes
* graphql, internal: export max fee cap RPC endpoint
* internal/ethapi: fix crash in transaction_args
* internal/ethapi: minor refactor to make the code safer
Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: gary rong <garyrong0905@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>