-
Notifications
You must be signed in to change notification settings - Fork 291
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
secp256r1 signature fees #4472
base: master
Are you sure you want to change the base?
secp256r1 signature fees #4472
Conversation
fee/src/lib.rs
Outdated
u64::from(fee_features.enable_secp256r1_precompile) | ||
.wrapping_mul(num_secp256r1_signatures), |
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.
@samkim-crypto we need to block activation until the minimum version is whatever this PR lands in (2.2 hopefully?)
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.
Yep, I will make sure double check before activating. It seems that you already put a note in https://github.com/anza-xyz/feature-gate-tracker/issues/65 as well.
2ba78b5
to
6dbf058
Compare
/// Bools indicating the activation of features relevant | ||
/// to the fee calculation. | ||
#[derive(Copy, Clone)] | ||
pub struct FeeFeatures { |
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.
Goal of this structure is so that we do not have a bunch of bool arguments that we always need, but also to not introduce the entire feature set which.
Keeping this makes it extremely obvious exactly which features affect the fee-calculation; and the FeeFeatures
could even be re-used to avoid re-looking up in the feature-set!
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.
since needed features come and go, there will be a time FeeFeatures
becomes an empty struct. I would think to keep it empty then (perhaps with a note or something to prevent innocent "cleanup"), so to keep calculate_fee()
signature unchanged. wdyt?
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 agree with keeping it with a note, so that the design idea is not lost
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.
6dbf058
to
460c76b
Compare
460c76b
to
e59bf5a
Compare
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.
goods good, just one nit
// in the future. Keeping this struct will help keep things organized. | ||
#[derive(Copy, Clone)] | ||
pub struct FeeFeatures { | ||
pub remove_rounding_in_fee_calculation: bool, |
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.
do these need to be public, since only this model needs to know which feature(s) matter to fee calculation?
Problem
Summary of Changes
Built on top of #4354
FeeFeatures
to hold bools relevant to feature activations used in fee calculationFixes #