Skip to content
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

Correct the price to verify native signatures #766

Merged
merged 6 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed

#### Breaking
- [#766](https://github.com/FuelLabs/fuel-vm/pull/766): Use correct gas price when validating native signatures
- [#765](https://github.com/FuelLabs/fuel-vm/pull/765): corrected the gas units for WDOP and WQOP

## [Version 0.53.0]
Expand Down
2 changes: 1 addition & 1 deletion fuel-tx/src/transaction/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ pub trait Chargeable: field::Inputs + field::Witnesses + field::Policies {
// Charge EC recovery cost for signed inputs
Input::CoinSigned(_)
| Input::MessageCoinSigned(_)
| Input::MessageDataSigned(_) => gas_costs.ecr1(),
| Input::MessageDataSigned(_) => gas_costs.eck1(),
// Charge the cost of the contract root for predicate inputs
Input::CoinPredicate(CoinPredicate {
predicate,
Expand Down
6 changes: 3 additions & 3 deletions fuel-vm/src/checked_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ mod tests {
let expected_min_fee = (tx.metered_bytes_size() as u64
* fee_params.gas_per_byte()
+ gas_costs.vm_initialization().resolve(tx.size() as u64)
+ 3 * gas_costs.ecr1()
+ 3 * gas_costs.eck1()
+ gas_costs.s256().resolve(tx.size() as u64))
* gas_price;
assert_eq!(min_fee, expected_min_fee);
Expand Down Expand Up @@ -1284,7 +1284,7 @@ mod tests {
let expected_min_fee = (tx.metered_bytes_size() as u64
* fee_params.gas_per_byte()
+ gas_costs.vm_initialization().resolve(tx.size() as u64)
+ gas_costs.ecr1()
+ gas_costs.eck1()
+ gas_costs.s256().resolve(tx.size() as u64))
* gas_price;
assert_eq!(min_fee, expected_min_fee);
Expand Down Expand Up @@ -1436,7 +1436,7 @@ mod tests {
let min_fee = fee.min_fee();
let expected_min_fee = (tx.metered_bytes_size() as u64
* fee_params.gas_per_byte()
+ 3 * gas_costs.ecr1()
+ 3 * gas_costs.eck1()
+ gas_costs.vm_initialization().resolve(tx.size() as u64)
+ gas_costs.contract_root().resolve(predicate_1.len() as u64)
+ gas_costs.contract_root().resolve(predicate_2.len() as u64)
Expand Down
Loading