Skip to content

Conversation

@fahimahmedx
Copy link
Member

This PR implements OrderByDestinationAndPriorityFee, and ordering that prioritizes transactions going to a provided destination, followed by transactions that aren't going to the given destination. Inside each of these groups, transactions are ordered by priority fee.

To implement this, we also had to modify OrderBy to store a OrderScore field, which would allow DestinationAndPriorityFeeScore's score() being able to access its destination_address field.

This enables top-of-block oracle updates for updates sent to the Global Storage smart contract.

@fahimahmedx fahimahmedx changed the title feat: transaction ordering by destination feat: add ordering by destination Nov 12, 2025

impl<P: Platform> OrderScore<P> for DestinationAndPriorityFeeScore<P> {
type Error = Infallible;
type Score = (u8, u128);
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe instead of (u8, u128) we could simply have (bool, u128)?

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