-
Notifications
You must be signed in to change notification settings - Fork 8
feat: minimum fee list #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
@@ -29,6 +29,17 @@ chains: | |||
- Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB | |||
- So11111111111111111111111111111111111111112 | |||
- EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v | |||
allow_permissionless_quote_requests: true | |||
minimum_fee_list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this schema has some ambiguities:
- Having an enabled flag seems unusual. We can just comment the whole section to disable it. By default, when I look at some config file and see a section exists, I assume that it's configured properly and I don't look for a enable/disable flag.
- This config allows multiple profiles without profile_id which is not well-defined, maybe we can have a
default_profile
next toprofiles
section and enforceprofile_id
in theprofiles
section. - If the name field is only for readability reasons, we can use comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the enabled
flag is just out of consistency with the way we have set up token whitelist. but agreed, we don't need this.
agreed with removing the name
field from the config.
for the default profile, we could do that, but i have a preference for keeping the config less verbose. also, this is only relevant if allow_permissionless_quote_requests
is set to true
minimum_fee_user.unwrap_or(0), | ||
) | ||
{ | ||
return Err(RestError::QuoteNotFound); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we get a sense of how many requests we filter out here. Maybe via metrics?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i like this. adding some metrics here. if you have ideas on how to increase the granularity to see individual mints, let me know. i avoided adding them to the labels naively bc that could blow up prometheus memory
"profile_id", | ||
profile_id.map_or("None".to_string(), |id| id.to_string()) | ||
), | ||
("result", "Invalid: User Mint Not Allowed".to_string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think label values should be something more compact. Maybe just user_mint_not_allowed
?
"profile_id", | ||
profile_id.map_or("None".to_string(), |id| id.to_string()) | ||
), | ||
("result", "Invalid: Searcher Mint Not Allowed".to_string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
"profile_id", | ||
profile_id.map_or("None".to_string(), |id| id.to_string()) | ||
), | ||
("result", "Invalid: Unauthorized".to_string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
This PR adds a minimum fee list to the config to enable minimum fee rates for different tokens.