-
Notifications
You must be signed in to change notification settings - Fork 96
V2 Coins with static witness predicates #960
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
base: feature/v2-chargeable-tx
Are you sure you want to change the base?
V2 Coins with static witness predicates #960
Conversation
d046b44 to
fd4a8dc
Compare
version-compatibility/src/fuel_tx.rs
Outdated
| // Given | ||
| let tx_pointer = fuel_tx_0_59_1::TxPointer::new(1u32.into(), idx); | ||
| let expected = latest_fuel_tx::TxPointer::new(1u32.into(), idx.into()); | ||
| let expected = latest_fuel_tx::TxPointer::new(1u32.into(), idx); |
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.
Removal of the .into() here breaks the code, as the type changes based on feature-flags.
| #[tokio::test] | ||
| async fn script_v2__estimate_predicate__fails_if_predicate_data_not_found_in_static_witnesses() | ||
| { | ||
| todo!() |
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.
Is this intentionally left as todo!?
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.
No. I just forgot to add this case. Thanks.
Dentosal
left a comment
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 above-mentioned test is still todo!()
Part of #955
(followup to #948)
This PR is tackling the bulk of the new "multi-input predicate" model, where a predicate coin will point to a "static witness" on the transaction rather than having the code directly on the input. This allows multiple inputs to share the same predicate and predicate data bytes as well as share the same execution, i.e. if two inputs point at the same predicate and predicate data, that predicate will only be run once!
This will enable in a vast improvement in performance for predicates that need to iterate over all the inputs, moving from
O(N^2)toO(N)in those specific cases. We needed to move this to the newChargeableTransationV2to avoid old predicates from being abused by the new feature.Checklist