Skip to content

chore(riscv-guest): More tests - #3775

Open
Filter94 wants to merge 2 commits into
test/l2-exec-guest-coverage-pr1from
test/l2-exec-guest-coverage-pr2
Open

chore(riscv-guest): More tests#3775
Filter94 wants to merge 2 commits into
test/l2-exec-guest-coverage-pr1from
test/l2-exec-guest-coverage-pr2

Conversation

@Filter94

Copy link
Copy Markdown
Contributor

This PR implements issue(s) #

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • If this change is deployed to any environment (including Devnet), E2E test coverage exists or is included in this
    PR.
  • I have informed the team of any breaking changes if there are any.

Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 12, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the riscv-guests/l2-execution test suite by adding a shared transaction-fixture builder capable of producing deterministically signed, sender-recoverable transactions (legacy + typed), and by adding several new unit tests that harden SSZ decoding and forced-transaction validation logic.

Changes:

  • Added tx_fixtures.zig: reusable legacy/EIP-1559/EIP-4844/EIP-7702 transaction encoders plus deterministic secp256k1 signing for tests.
  • Extended l2_execution_test.zig, l2_execution_ssz_test.zig, and l2_execution_range_test.zig with additional negative/edge-case coverage (forced-tx validation, adversarial SSZ offsets/truncation, and bridge-message behaviors).
  • Updated build.zig module wiring to expose the new fixtures module and remove the legacy-only encoder module.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
riscv-guests/l2-execution/test/tx_fixtures.zig New shared transaction fixture builders (RLP encoders + deterministic signing) for multiple tx types.
riscv-guests/l2-execution/test/stateless_input_encode_test.zig Switched legacy tx RLP usage to the new tx_fixtures module.
riscv-guests/l2-execution/test/legacy_tx_rlp.zig Removed legacy-only RLP helper in favor of consolidated fixtures.
riscv-guests/l2-execution/test/l2_execution_test.zig Added new forced-transaction validation tests and sender recovery helper for newly generated tx fixtures.
riscv-guests/l2-execution/test/l2_execution_ssz_test.zig Added adversarial-input hardening tests around SSZ offset/bounds/ordering behavior.
riscv-guests/l2-execution/test/l2_execution_range_test.zig Updated range tests to use shared tx fixtures and added new bridge-related scenario coverage.
riscv-guests/l2-execution/src/l2_execution.zig Comment/documentation clarifications around reference implementation and storage layout provenance.
riscv-guests/l2-execution/build.zig Introduced tx_fixtures module wiring (including secp256k1 wrapper copy) and removed legacy encoder wiring.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +178 to +182
fn versionedHashesRlp(alloc: std.mem.Allocator, hashes: []const [32]u8) ![]const u8 {
const items = try alloc.alloc([]const u8, hashes.len);
for (hashes, 0..) |h, i| items[i] = try rlp.encodeBytes(alloc, &h);
return rlp.encodeList(alloc, items);
}
…eth/lineth-monorepo into test/l2-exec-guest-coverage-pr2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants