Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
| - So11111111111111111111111111111111111111112 | ||
| - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v | ||
| allow_permissionless_quote_requests: true | ||
| minimum_fee_list: |
There was a problem hiding this comment.
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_profilenext toprofilessection and enforceprofile_idin theprofilessection. - If the name field is only for readability reasons, we can use comments.
There was a problem hiding this comment.
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.
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.
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.
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()), |
| "profile_id", | ||
| profile_id.map_or("None".to_string(), |id| id.to_string()) | ||
| ), | ||
| ("result", "Invalid: Unauthorized".to_string()), |
This PR adds a minimum fee list to the config to enable minimum fee rates for different tokens.