Skip to content

Commit

Permalink
feat: handle Unknown transactions, blocks and consensus parameters (#…
Browse files Browse the repository at this point in the history
…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`
  • Loading branch information
hal3e authored Nov 19, 2024
1 parent f9b1fe2 commit 2ef18cf
Show file tree
Hide file tree
Showing 38 changed files with 595 additions and 254 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]

### Added
- [2154](https://github.com/FuelLabs/fuel-core/pull/2154): Added `Unknown` variant to `ConsensusParameters` graphql queries
- [2154](https://github.com/FuelLabs/fuel-core/pull/2154): Added `Unknown` variant to `Block` graphql queries
- [2154](https://github.com/FuelLabs/fuel-core/pull/2154): Added `TransactionType` type in `fuel-client`
- [2321](https://github.com/FuelLabs/fuel-core/pull/2321): New metrics for the TxPool:
- The size of transactions in the txpool (`txpool_tx_size`)
- The time spent by a transaction in the txpool in seconds (`txpool_tx_time_in_txpool_seconds`)
Expand Down Expand Up @@ -37,6 +40,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
#### Breaking
- [2389](https://github.com/FuelLabs/fuel-core/pull/2258): Updated the `messageProof` GraphQL schema to return a non-nullable `MessageProof`.

#### Breaking
- [2154](https://github.com/FuelLabs/fuel-core/pull/2154): Transaction graphql endpoints use `TransactionType` instead of `fuel_tx::Transaction`.

## [Version 0.40.0]

### Added
Expand Down
Loading

0 comments on commit 2ef18cf

Please sign in to comment.