feat(marketplace): implement auction results calculation logic
Open
DeVikingMark
opened this issue 7 months ago
•
0 comments
This PR:
- Implements auction results calculation logic in marketplace solver
- Adds validation for reserve prices in auction bids
- Adds handling of inactive rollups in auction process
- Adds comprehensive test suite for auction functionality
This PR does not:
- Implement shared solver state with HotShot events (tracked in TODO comment, requires separate issue)
Key places to review:
marketplace-solver/src/state.rs:
calculate_auction_results_permissionless function: Implementation of auction winner selection logic
calculate_auction_results_permissioned function: Reuse of permissionless logic with signature verification
marketplace-solver/src/testing.rs:
- New test cases for auction functionality:
test_calculate_auction_results_no_bids
test_calculate_auction_results_with_bids
test_calculate_auction_results_bid_below_reserve
test_calculate_auction_results_inactive_rollup
How to test this PR:
- Run tests:
cargo test -p marketplace-solver
- All new tests are integrated with existing test infrastructure using
MockSolver
Things tested
- Auction winner selection with various bid amounts
- Reserve price validation
- Inactive rollup handling
- Reserve URL fallback for namespaces without valid bids
- Integration with existing rollup registration system
- [x] Issue linked or PR description mentions why this change is necessary
- [x] PR description is clear enough for reviewers
- [x] Documentation for changes has been updated
- [x] All changes are covered by tests