Skip to content

test(backend): add unit tests for codec types and StoreSlot#69

Merged
refcell merged 1 commit into
mainfrom
impl-beta/add-types-tests
Feb 1, 2026
Merged

test(backend): add unit tests for codec types and StoreSlot#69
refcell merged 1 commit into
mainfrom
impl-beta/add-types-tests

Conversation

@refcell

@refcell refcell commented Feb 1, 2026

Copy link
Copy Markdown
Owner

Summary

Add unit tests for internal codec types and the StoreSlot utility type in the backend crate.

Changes

  • crates/storage/backend/src/types.rs: Added 11 new unit tests covering:
    • AccountValue: roundtrip encoding/decoding, encode_size verification
    • StorageValue: roundtrip encoding/decoding, max value handling, encode_size verification
    • StoreSlot<T>: get, take, restore, into_inner operations and error cases

Verification

  • All 11 tests pass
  • Clippy clean
  • Comprehensive coverage of internal codec and utility types

@refcell refcell merged commit 8368667 into main Feb 1, 2026
5 checks passed
@refcell refcell deleted the impl-beta/add-types-tests branch February 1, 2026 23:59
faddat pushed a commit that referenced this pull request May 30, 2026
…angelog

The pending transaction path in raw_tx_to_pending_rpc was computing
the signature v value as raw y-parity (0 or 1) instead of the EIP-155
encoded value for legacy transactions. This made pending transaction
responses inconsistent with indexed transaction responses, where
to_eip155_value was already correctly applied.

Also adds a comprehensive changelog for PR #69 documenting all indexed
response fidelity improvements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
faddat pushed a commit that referenced this pull request May 30, 2026
…ponse-fidelity

fix(rpc): preserve indexed transaction and log metadata
faddat pushed a commit that referenced this pull request May 30, 2026
…estamp)

After merging main, fix 6 test fixtures in eth.rs where `v: U64::ZERO`
needed to become `v: U256::ZERO` (from PR #69's signature field widening),
and add missing `timestamp` field to Block initializer in reporters test
(required after PR #78's timestamp addition to Block).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
faddat pushed a commit that referenced this pull request May 30, 2026
Resolve merge conflicts from main branch (PRs #69-#78) while preserving
PR #72's txpool eviction, cleanup, and txpool_* RPC namespace features.

Conflict resolutions:
- server.rs: Keep both txpool field/methods (PR #72) and rate limiting,
  subscriptions, connection limits (PRs #71, #74). Merged imports and
  Debug impls to include all fields.
- runner.rs: Keep txpool cleanup spawning (PR #72) alongside configurable
  params, archive recovery, strategy threading, and timestamp support
  from main. Restored Clock import needed for sleep in txpool cleanup.
  Removed unused Sequential import.
- txpool/ordering.rs: Keep PR #72's gas-price-based replacement logic
  for queued transactions, updated to use main's next_pending_nonce()
  method for nonce gap detection.
- txpool/pool.rs: Keep PR #72's ordered_tx_id() for build exclusions
  with main's saturating_add for overflow safety. Fixed test that used
  TxId(hash) directly (main's pattern) to use ordered_tx_id() (PR #72's
  pattern), and differentiated gas prices for cross-sender test data to
  avoid TxId collisions from identical envelope encodings.
- txpool.rs: Fixed v field type from U64 to U256 to match main's updated
  RpcTransaction type definition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant