Skip to content

Fix RWS pallet benchmark compilation and runtime errors#447

Closed
Copilot wants to merge 2 commits intofeat/rws2_0from
copilot/sub-pr-381
Closed

Fix RWS pallet benchmark compilation and runtime errors#447
Copilot wants to merge 2 commits intofeat/rws2_0from
copilot/sub-pr-381

Conversation

Copy link
Contributor

Copilot AI commented Dec 6, 2025

The RWS pallet benchmarks failed to compile due to incorrect mock configuration and test suite references. Additionally, the claim benchmark failed at runtime due to time validation constraints.

Changes:

  • Mock configuration: Removed BenchmarkHelper type assignment from pallet-assets config (not part of the trait interface)
  • Benchmark test suite: Fixed impl_benchmark_test_suite! to reference crate::mock::Test instead of non-existent crate::tests::Runtime
  • Time handling: Set initial timestamp to 1B ms in benchmarks (vs 1000ms in tests) to satisfy auction duration validation
  • Claim benchmark: Modified to set first_bid_time to past value via direct storage manipulation, ensuring first_bid_time + AuctionDuration <= now condition is met

All 5 benchmarks (start_auction, bid, claim, start_lifetime, stop_lifetime) now compile and execute successfully.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Dec 6, 2025
- Remove BenchmarkHelper from mock (not needed for pallet-assets)
- Fix benchmark test suite to reference mock module correctly
- Use larger timestamp in mock for benchmarks to avoid time-related issues
- Fix claim benchmark to properly handle auction time requirements
- Remove unused imports from benchmarking.rs

Co-authored-by: akru <786394+akru@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor Robonomics Web Services pallet to v2.0 Fix RWS pallet benchmark compilation and runtime errors Dec 6, 2025
Copilot AI requested a review from akru December 6, 2025 16:41
@akru akru closed this Dec 16, 2025
@akru akru deleted the copilot/sub-pr-381 branch December 16, 2025 07:02
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