You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are numerous areas of the transaction format that are extendable / upgradeable. Without proper handling, any new types added onto the spec could cause total failure for SDK users on older versions.
Nonexhaustive list of additive changes that could break existing SDK versions:
New transactional variants (i.e. ScriptV2, CreateV2)
New input or output types (i.e CoinInputV2)
New opcodes w/ brand new gas price in the consensus params
Without handling for these new and unknown types in the SDKs, a purely additive network change could instantly break apps like:
Explorers
Third party indexers (i.e. envio)
Wallets (i.e. account history)
On the Rust side, this likely requires something along the lines of a default unknown enum variant such as:
pubenumTransactions{Script(...)Create(...)Mint(...)Upload(...)Upgrade(...)Blob(...)#[serde(untagged)]Unknown// untagged variants are used to capture variants missing from the current enum definition during deserialization}
TODO:
Rust SDK doesn't throw unexpected errors when new types are added to the node API
TS SDK doesn't throw unexpected errors when new types are added to the node API
The text was updated successfully, but these errors were encountered:
…2154)
## Linked Issues/PRs
FuelLabs/fuels-rs#1477
## Description
Refactored code to handle `Unknown` transaction types,
`ConsensusParameters` and `Blocks`.
For transactions I have craeted a new `TransactionType` that we can
`try_into` the `fuel_tx::Transaction`.
For `ConsesnsuParameters` and `Block` I have used `cynic's` `fallback`
attrbute and added a `Unknown` variant for all `Version` enums.
I had to bump `cynic` to `3.1.0` and `reqwest` to `0.12.0` to use the
`fallback` attribute on enums.
BREAKING CHANGES:
`graphql` endpoints for transactions use the new `TransactionType` type
instead of `fuel_tx::Transaction`
There are numerous areas of the transaction format that are extendable / upgradeable. Without proper handling, any new types added onto the spec could cause total failure for SDK users on older versions.
Nonexhaustive list of additive changes that could break existing SDK versions:
Without handling for these new and unknown types in the SDKs, a purely additive network change could instantly break apps like:
On the Rust side, this likely requires something along the lines of a default unknown enum variant such as:
TODO:
The text was updated successfully, but these errors were encountered: