Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6659897
Introduce `TransactionStatusV2`
Feb 19, 2025
0c6e549
Update schema
Feb 19, 2025
60a51a9
Merge remote-tracking branch 'origin/master' into rafal/preconfirmati…
Feb 20, 2025
f67d6e4
Distinguish between `TransactionStatusPreconfirmations` and `Transact…
Feb 20, 2025
4889500
Get rid of some TODOs
Feb 21, 2025
0fd149d
Restore TransactionStatus type name in schema
Feb 21, 2025
af32ec0
Merge remote-tracking branch 'origin/master' into rafal/preconfirmati…
Feb 24, 2025
c33b6f2
Unify type names for the new transaction status
Feb 24, 2025
08bccca
Further updates to types
Feb 24, 2025
be7dc5e
Update the `SuccessDuringBlockProductionStatus` schema
Feb 25, 2025
f8c012f
Update the `FailureDuringBlockProductionStatus` schema
Feb 25, 2025
7f9890c
Merge remote-tracking branch 'origin/master' into rafal/preconfirmati…
Feb 25, 2025
23d59d2
Revert change to test helpers
Feb 25, 2025
13b586b
Merge remote-tracking branch 'origin/master' into rafal/preconfirmati…
Feb 25, 2025
876bea0
Add changelog info
Feb 25, 2025
2fb4eb9
Update helpers
Feb 25, 2025
d5cb36a
Merge remote-tracking branch 'origin/master' into rafal/preconfirmati…
Feb 25, 2025
e3c6dac
Merge remote-tracking branch 'origin/master' into rafal/preconfirmati…
Feb 25, 2025
cc5ec49
Merge remote-tracking branch 'origin/master' into rafal/preconfirmati…
Feb 26, 2025
d0bf528
Update schema
Feb 26, 2025
a0edf5a
Update schema
Feb 26, 2025
fa2191c
Merge remote-tracking branch 'upstream/master' into rafal/preconfirma…
Feb 27, 2025
7998d1c
Merge remote-tracking branch 'upstream/master' into rafal/preconfirma…
Mar 3, 2025
87aaf7c
TransactionId is always present in statuses related to preconfirmations
Mar 3, 2025
d702ca7
Rename `Failure` -> `Failed`
Mar 3, 2025
a473dbb
Rename `TransactionStatus` variants related to preconfirmations
Mar 4, 2025
1de525f
Mention follow-up issue
Mar 4, 2025
4667fc3
Rename `TransactionStatusStorage` --> `TransactionExecutionStatus`
Mar 4, 2025
92e690f
Merge remote-tracking branch 'upstream/master' into rafal/preconfirma…
Mar 4, 2025
42ee7b9
Update snapshots
Mar 4, 2025
38d2733
Preconfirmation statuses now return transactions from the TxPool
Mar 4, 2025
3e54d1f
Merge branch 'refs/heads/master' into rafal/preconfirmations_api_changes
xgreenx Mar 4, 2025
966e809
Fetch transaction from TxPool and Database(in the case if transaction…
xgreenx Mar 4, 2025
185ebd8
Self-review
xgreenx Mar 5, 2025
5ca2edc
Update snapshot
xgreenx Mar 5, 2025
f502f6c
Merge branch 'master' into rafal/preconfirmations_api_changes
xgreenx Mar 5, 2025
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 .changes/changed/2752.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Extended the `TransactionStatus` to support pre-confirmations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we can be a little verbose here because it's a change in the graphql api :) non blocking, feel free to address in follow up

4 changes: 2 additions & 2 deletions bin/fuel-core/src/cli/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ mod tests {
UtxoId,
},
fuel_types::ChainId,
services::txpool::TransactionStatus,
services::txpool::TransactionExecutionStatus,
tai64::Tai64,
};
use itertools::Itertools;
Expand Down Expand Up @@ -515,7 +515,7 @@ mod tests {

fn given_transaction_status(&mut self) -> TableEntry<TransactionStatuses> {
let key = self.rng.gen();
let status = TransactionStatus::Success {
let status = TransactionExecutionStatus::Success {
block_height: self.rng.gen(),
time: Tai64(self.rng.gen::<u32>().into()),
result: None,
Expand Down
23 changes: 22 additions & 1 deletion crates/client/assets/schema.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,26 @@ type Policies {
maxFee: U64
}

type PreconfirmationFailureStatus {
reason: String!
txPointer: TxPointer!
transactionId: TransactionId!
transaction: Transaction
receipts: [Receipt!]
}

type PreconfirmationSqueezedOutStatus {
transactionId: TransactionId!
reason: String!
}

type PreconfirmationSuccessStatus {
txPointer: TxPointer!
transactionId: TransactionId!
transaction: Transaction
receipts: [Receipt!]
}

type PredicateParameters {
version: PredicateParametersVersion!
maxPredicateLength: U64!
Expand Down Expand Up @@ -1164,6 +1184,7 @@ input SpendQueryElementInput {
}

type SqueezedOutStatus {
transactionId: TransactionId!
reason: String!
}

Expand Down Expand Up @@ -1315,7 +1336,7 @@ type TransactionEdge {

scalar TransactionId

union TransactionStatus = SubmittedStatus | SuccessStatus | SqueezedOutStatus | FailureStatus
union TransactionStatus = SubmittedStatus | SuccessStatus | PreconfirmationSuccessStatus | SqueezedOutStatus | PreconfirmationSqueezedOutStatus | FailureStatus | PreconfirmationFailureStatus

type TxParameters {
version: TxParametersVersion!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,47 @@ query TransactionQuery($id: TransactionId!) {
totalGas
totalFee
}
... on PreconfirmationSuccessStatus {
txPointer
transactionId
receipts {
param1
param2
amount
assetId
gas
digest
id
is
pc
ptr
ra
rb
rc
rd
reason
receiptType
to
toAddress
val
len
result
gasUsed
data
sender
recipient
nonce
contractId
subId
}
}
... on SqueezedOutStatus {
reason
}
... on PreconfirmationSqueezedOutStatus {
transactionId
reason
}
... on FailureStatus {
blockHeight
time
Expand Down Expand Up @@ -94,6 +132,41 @@ query TransactionQuery($id: TransactionId!) {
totalGas
totalFee
}
... on PreconfirmationFailureStatus {
txPointer
transactionId
receipts {
param1
param2
amount
assetId
gas
digest
id
is
pc
ptr
ra
rb
rc
rd
reason
receiptType
to
toAddress
val
len
result
gasUsed
data
sender
recipient
nonce
contractId
subId
}
reason
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,47 @@ query TransactionsByOwnerQuery($owner: Address!, $after: String, $before: String
totalGas
totalFee
}
... on PreconfirmationSuccessStatus {
txPointer
transactionId
receipts {
param1
param2
amount
assetId
gas
digest
id
is
pc
ptr
ra
rb
rc
rd
reason
receiptType
to
toAddress
val
len
result
gasUsed
data
sender
recipient
nonce
contractId
subId
}
}
... on SqueezedOutStatus {
reason
}
... on PreconfirmationSqueezedOutStatus {
transactionId
reason
}
... on FailureStatus {
blockHeight
time
Expand Down Expand Up @@ -97,6 +135,41 @@ query TransactionsByOwnerQuery($owner: Address!, $after: String, $before: String
totalGas
totalFee
}
... on PreconfirmationFailureStatus {
txPointer
transactionId
receipts {
param1
param2
amount
assetId
gas
digest
id
is
pc
ptr
ra
rb
rc
rd
reason
receiptType
to
toAddress
val
len
result
gasUsed
data
sender
recipient
nonce
contractId
subId
}
reason
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,47 @@ query TransactionsQuery($after: String, $before: String, $first: Int, $last: Int
totalGas
totalFee
}
... on PreconfirmationSuccessStatus {
txPointer
transactionId
receipts {
param1
param2
amount
assetId
gas
digest
id
is
pc
ptr
ra
rb
rc
rd
reason
receiptType
to
toAddress
val
len
result
gasUsed
data
sender
recipient
nonce
contractId
subId
}
}
... on SqueezedOutStatus {
reason
}
... on PreconfirmationSqueezedOutStatus {
transactionId
reason
}
... on FailureStatus {
blockHeight
time
Expand Down Expand Up @@ -97,6 +135,41 @@ query TransactionsQuery($after: String, $before: String, $first: Int, $last: Int
totalGas
totalFee
}
... on PreconfirmationFailureStatus {
txPointer
transactionId
receipts {
param1
param2
amount
assetId
gas
digest
id
is
pc
ptr
ra
rb
rc
rd
reason
receiptType
to
toAddress
val
len
result
gasUsed
data
sender
recipient
nonce
contractId
subId
}
reason
}
}
}
}
Expand Down
Loading
Loading