Repository navigation
fix(0.x): port #690, #691, #693, #702, #703, #704, #705 - #706
Merged
Merged
Conversation
EIP-7864 only maps the 64-byte zero input to the zero hash, so a leaf set to 32 zero bytes is a real leaf. `hash` zeroed any all-zero input, which merkelized zero-valued leaves as empty (a lone zero leaf at the zero key gave the empty-tree root). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a1f5cc-eb3a-72b3-bdda-0480feddb7f9 Co-authored-by: jxom <jake@tempo.xyz>
`Transaction.toRpc` encoded `v` with `size: 1` for every transaction type. A legacy EIP-155 `v` is `chainId * 2 + 35 + yParity`, so from chain ID 110 on (Polygon, Base, Arbitrum, ...) it passes 255 and `toRpc` threw `Hex.IntegerOutOfRangeError`. `toRpc(fromRpc(tx))` failed on real legacy transactions from those chains. execution-apis types the legacy `v` as `uint` and the typed `v` as `byte`, so legacy now encodes it without a size and typed transactions keep the single byte. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 6b94083) Co-authored-by: jxom <jake@tempo.xyz>
….toRpc` (#693) execution-apis types authorization list `r` and `s` as `uint256`, so nodes expect them without leading zeros. `Authorization.toRpc` passed the 32-byte padded values through, and geth-based nodes reject them in `eth_estimateGas`, `eth_call` and `eth_sendTransaction` ("hex number with leading zero digits") whenever the top nibble is zero. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d7b57e1) Co-authored-by: jxom <jake@tempo.xyz>
Supersedes #692. Amp-Thread-ID: https://ampcode.com/threads/T-01a1f5cc-eb3a-72b3-bdda-0480feddb7f9 Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com> Co-authored-by: jxom <jake@tempo.xyz> (cherry picked from commit b31cd5d)
Supersedes #700. Amp-Thread-ID: https://ampcode.com/threads/T-01a1f5cc-eb3a-72b3-bdda-0480feddb7f9 Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Martina <261225237+Iamsohungrynow@users.noreply.github.com> Co-authored-by: jxom <jake@tempo.xyz> (cherry picked from commit 9c3280b)
…statement` Ports the scheme and statement parts of #705 (from #698 and #699). The IP literal domain part does not apply to 0.x. Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a1f5cc-eb3a-72b3-bdda-0480feddb7f9 Co-authored-by: jxom <jake@tempo.xyz>
(cherry picked from commit 2d43a3a) Co-authored-by: jxom <jake@tempo.xyz>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
Published pnpm add ox@pr-706
pnpm add ox@0.0.0-pr-706-190190d |
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports to 0.x the fixes that merged to main today:
BinaryStateTree.merkelize#690:BinaryStateTree.merkelizehashes zero-valued leaves (EIP-7864).vabove 255 inTransaction.toRpc#691:Transaction.toRpcencodes legacy EIP-155vabove 255.randsas quantities inAuthorization.toRpc#693:Authorization.toRpcencodesr/sas uint256 quantities.requestsHashinBlock.toRpc#703:Block.Block/Block.toRpckeeprequestsHash.BlockOverridesprevRandaoas a 32-byte hash #704:BlockOverrides.toRpcencodesprevRandaoas a 32-byte hash.Siwerejects a comma inschemeand\r/U+2028/U+2029 instatement.@logoutputs in docs examples.These don't apply to 0.x and were left out:
randsin zodAuthorization.Signed#694, fix(zod): accept EIP-155vabove 255 inSignature.Legacy#701, fix: keeprequestsHashinBlock.toRpc#703 and fix: encodeBlockOverridesprevRandaoas a 32-byte hash #704, because 0.x has noox/zod.Siwe.isUriURIs that have a path #695 and fix(Siwe): tighten scheme, statement, and IP literal domain validation #705's IP literal domain part, because 0.xSiwehas no authority validation to fix.0.x adaptations: 0.x uses bigint
r/sand differenttoRpcshapes, so the tests were adjusted to match. The Transaction test setsvdirectly because 0.xfromRpcnormalizes legacyvto 27/28. The Block test checks onlyrequestsHash, because 0.xtoRpcalso emitssealFieldsandtotalDifficulty. Original authors are kept on each commit.Local: targeted core tests pass (295 passed),
tsc --noEmitpasses, and biome is clean on the touched files.