espresso-sequencer
espresso-sequencer copied to clipboard
Implement auction results calculation logic
Implements auction results calculation logic
This PR:
- Implements the auction results calculation logic in the marketplace-solver module
- Adds proper bid selection based on highest bid amount for each namespace
- Ensures each winning bid is only included once in the results
- Maintains the existing reserve bids functionality
- Reuses the permissionless implementation for the permissioned method
This PR does not:
- Change the database schema or API interfaces
- Modify the existing bid submission process
- Add additional validation for permissioned auctions (left for future work)
Key places to review:
- marketplace-solver/src/state.rs,
calculate_auction_results_permissionlessfunction - marketplace-solver/src/state.rs,
calculate_auction_results_permissionedfunction
Things tested
- Logic for selecting highest bids per namespace
- Handling of empty bid collections
- Proper inclusion of reserve bids in results
[x] Issue linked or PR description mentions why this change is necessary. [x] PR description is clear enough for reviewers. [x] Documentation for changes (additions) has been updated (added). [x] If this is a draft it is marked as "draft".