Skip to content

Malicious behavior miner #376

Malicious behavior miner

Malicious behavior miner #376

Triggered via pull request May 22, 2025 09:00
Status Failure
Total duration 45s
Artifacts

commit-lint.yml

on: pull_request
Matrix: commitlint
Fit to window
Zoom out
Zoom in

Annotations

1 error
commitlint (14.x, ubuntu-latest)
You have commit messages with errors ⧗ input: ethclient: Add EstimateGasAtBlock[Hash] to estimate against a specific block (#27508) The main use case I see of this is that it allows users to estimate gas against the same state that they query for their nonce, and the same state they base the data of their transaction against. This helps ensure that gas estimation won't fail and the transaction won't revert on-chain because of a mismatch between the state used for gas estimation and the state used to generate the inputs to gas estimation or the transaction's nonce when submitted to the mempool. This PR also updates the EstimateGas comment based on the new geth `eth_estimateGas` default of using latest state as of v1.12.0: https://github.com/ethereum/go-ethereum/pull/24363 --------- Co-authored-by: Felix Lange <fjl@twurst.com> ✖ header must not be longer than 80 characters, current length is 85 [header-max-length] ✖ found 1 problems, 0 warnings ⓘ Get help: https://github.com/bnb-chain/bsc/tree/develop/docs/lint/commit.md ⧗ input: core/types: reduce allocs in transaction signing (#31258) This PR roughly halves the number of allocations needed to compute the sigHash for a transaction. This sigHash is used whenever we recover a signature of a transaction, so quite often. During a recent benchmark full syncing on Holesky, roughly 2.8% of all allocations were happening here because the fields from the transaction would be copied multiple times. ``` 66168733 153175654 (flat, cum) 2.80% of Total . . 368:func (s londonSigner) Hash(tx *Transaction) common.Hash { . . 369: if tx.Type() != DynamicFeeTxType { . . 370: return s.eip2930Signer.Hash(tx) . . 371: } . 19169966 372: return prefixedRlpHash( . . 373: tx.Type(), 26442187 26442187 374: []interface{}{ . . 375: s.chainId, 6848616 6848616 376: tx.Nonce(), . 19694077 377: tx.GasTipCap(), . 18956774 378: tx.GasFeeCap(), 6357089 6357089 379: tx.Gas(), . 12321050 380: tx.To(), . 16865054 381: tx.Value(), 13435187 13435187 382: tx.Data(), 13085654 13085654 383: tx.AccessList(), . . 384: }) . . 385:} ``` This PR reduces the allocations and speeds up the computation of the sigHash by ~22%, which is quite significantly given that this operation involves a call to Keccak ``` // BenchmarkHash-8 440082 2639 ns/op 384 B/op 13 allocs/op // BenchmarkHash-8 493566 2033 ns/op 240 B/op 6 allocs/op ``` ``` Hash-8 2.691µ ± 8% 2.097µ ± 9% -22.07% (p=0.000 n=10) ``` It also kinda cleans up stuff in my opinion, since the transaction should itself know best how to compute the sighash ![Screenshot_2025-02-25_13-52-41](https://github.com/user-attachments/assets/e2b268aa-e137-417d-926b-f3619daef748) --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> ✖ body's lines must not be longer than 100 characters [body-max-line-length] ✖ found 1 problems, 0 warnings ⓘ Get help: https://github.com/bnb-chain/bsc/tree/develop/docs/lint/commit.md ⧗ input: internal/ethapi: return code 3 from call/estimateGas even if a revert reason was not returned (#31456) ✖ header must not be longer than 80 characters, current length is 102 [header-max-length] ✖ found 1 problems, 0 warnings ⓘ Get help: https://github.com/bnb-chain/bsc/tree/develop/docs/lint/commit.md ⧗ input: internal/ethapi: exclude 7702 authorities from result in eth_createAccessList (#31336) closes https://github.com/ethereum/go-ethereum/issues/31335 --------- Co-authored-by: sashabeton <sashabeton2007@gmail.com> ✖ header must not be longer than 80 characters, current length is 86 [header-max-length] ✖ found 1 problems, 0 warnings ⓘ Get help: https://github.com/bnb-chain/bsc/tree/develop/docs/lint/commit.md ⧗ input: eth/protocols/eth: improve over/underf