eth_signTransaction eliminate allocations & improvements#11587
Conversation
|
Claude finished @svlachakis's task in 4m 18s —— View job PR Review
SummaryThe approach is solid — renting from High — pool buffer never returned
Fix: add Medium — two-field disposed-state test is fragile
Low — negative
|
|
@claude review again. The class is sealed and has exactly two backings, each set by exactly one constructor and nulled only by Dispose. The invariant (_pooledArray is null && _manager is null) ⇔ disposed is enforced structurally — there's no way to construct a non-disposed instance without setting one of them, and the only mutation post-construction is the Interlocked.Exchange in Dispose. A future path would require a new constructor, at which point the maintainer would naturally extend the check. A dedicated _disposed flag would duplicate state and need its own Interlocked sync without strengthening the invariant. Happy to add it if you'd prefer the explicit signal, but the two-field test is already exhaustive given the structural constraints. |
|
Claude finished @svlachakis's task in 1m 31s —— View job Re-review complete
All prior findings addressedHigh — fixed. Medium — argument accepted. The structural reasoning holds: Low — fixed. The implementation is correct and the pool lifetime is now fully closed. This is mergeable. |
eth_signTransaction eliminate allocations & improvements
|
Claude finished @svlachakis's task in 3m 5s —— View job PR Review
SummaryAll findings from the previous two review rounds have been correctly addressed. The disposal chain is fully wired and correct. Two new minor observations below, neither of which blocks merge. Disposal chain trace (confirmed correct)
Low — redundant null-conditional on required non-nullable property
Low — theoretical pool leak if
|
|
@claude review again |
|
Claude finished @svlachakis's task in 3m 8s —— View job PR Review — Round 4
SummaryBoth Low findings from Round 3 have been resolved in the current code. No new issues found. Disposal chain — confirmed correct
Round 3 Low-1 — fixed
Round 3 Low-2 — fixed
Additional checks (no issues found)
Mergeable. All Critical/High/Medium/Low findings from prior rounds are resolved. |
|
@claude review again after applying @LukaszRozmej's suggestions |
|
Claude finished @svlachakis's task in 5m 40s —— View job PR Review — Round 5 (post-LukaszRozmej suggestions)
SummaryLukaszRozmej's suggestions have been correctly applied. Disposal chain — confirmed correct
Project dependencies — no issue
|
Fixes Closes Resolves #11578
Changes
SignTransactionResult.Rawis nowArrayPoolList<byte>(wasbyte[]). The DTO implementsIDisposableto release the rental at end of response.ArrayPoolListByteHexConverterinNethermind.Serialization.Json/- reusable serialize-only converter that writesArrayPoolList<byte>as a hex string. Lives next toByteArrayConverter.BuildSignedResultprivate helper inEthRpcModule- encapsulates the rent/encode/wrap dance under a single try/catch so any throw (from RLP encoding,FromTransaction, or wrapper construction) releases the rental through the same path.OwnedByteMemoryis untouched - reverted to its original MemoryManager-backed form.debug_getRawBlockAccessListcontinues to use it unchanged.Types of changes
What types of changes does your code introduce?
Testing
Requires testing