Commit b9cac99
feat!:
BREAKING CHANGE:
- `TxParameters` are replaced with `TxPolicies`
- `GasPrice` and `Maturity` fields are optional
- `TxPolicies` introduced new fields:
- `WitnessLimit` - allows the limitation of the maximum size of
witnesses in bytes.
- `MaxFee` - allows the upper bound for the maximum fee that users agree
to pay for the transaction.
- The `ScriptGasLimit` only limits the script execution. Previously, the
`ScriptGasLimit` also limited the predicate execution time, but it is
not valid anymore. So, it is not possible to use the `ScriptGasLimit`
for transaction cost limitations. A new `MaxFee` policy is a way to do
that. The `GasLimit` field was removed from the `Create` transaction
because it only relates to the script execution(which the `Create`
transaction doesn't have).
- The new `WhitnessLimit` also impacts the `max_gas` and `max_fee`
calculation along with the `ScriptGasLimit`(in the case of `Create`
transaction only `WitnessLimit` affects the `max_gas` and `max_fee`).
- The minimal gas also charges the user for transaction ID calculation.
- Each transaction requires setting the `GasPrice` policy.
- Previously, `GasLimit` should be less than the `MAX_GAS_PER_TX`
constant. After removing this field from the `Create` transaction, it is
impossible to require it. Instead, it requires that `max_gas <=
MAX_GAS_PER_TX` for any transaction. Consequently, any `Script`
transaction that uses `MAX_GAS_PER_TX` as a `GasLimit` will always fail
because of a new rule. Setting the estimated gas usage instead solves
the problem.
- If the `max_fee > policies.max_fee`, then transaction will be
rejected.
- If the `witnessses_size > policies.witness_limit`, then transaction
will be rejected.
- `get_message_proof` not uses `Nonce` instead of the message_id
- predicates do not use `ChainId` for address calculation
- `manual_blocks_enabled` is replaced with `debug` in local chain config
- `fee_checked_from_tx` uses `FeeParameters`
- `fuel_tx::ConsensusParameters` were refactored - this also affects us
- when building a transaction_builder the `BuildableTransacion` trait
needs to be in scope
- `utxo_validation` and `manual_blocks` are enabled by default for test
providers
- node config does not have `local_node` anymore use `default` - `let
node_config = Config::default();`
Thanks @MujkicA for updating the documentation.
Co-authored-by: MujkicA <[email protected]>
Co-authored-by: Ahmed Sagdati <[email protected]>beta-5 support (#1200)1 parent d8704e1 commit b9cac99
File tree
58 files changed
+1143
-858
lines changed- .github/workflows
- docs/src
- calling-contracts
- examples
- contracts/src
- cookbook/src
- predicates/src
- providers/src
- wallets/src
- packages
- fuels-accounts/src
- provider
- fuels-core
- src
- codec
- types
- wrappers
- utils
- fuels-macros/src/setup_program_test
- fuels-programs/src
- fuels-test-helpers
- src
- fuels
- src
- tests
- contracts/revert_transaction_error/src
- types
- contracts/vector_output/src
- scripts/script_vectors/src
- wasm-tests/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
58 files changed
+1143
-858
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
209 | 214 | | |
210 | 215 | | |
211 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments