Skip to content

Commit

Permalink
Change from tracing to storage read replay recording
Browse files Browse the repository at this point in the history
  • Loading branch information
Dentosal committed Dec 19, 2024
1 parent f76c96f commit 8d80d7b
Show file tree
Hide file tree
Showing 41 changed files with 514 additions and 967 deletions.
138 changes: 48 additions & 90 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ fuel-core-xtask = { version = "0.0.0", path = "./xtask" }
fuel-gas-price-algorithm = { version = "0.40.0", path = "crates/fuel-gas-price-algorithm" }

# Fuel dependencies
fuel-vm-private = { path = "../fuel-vm/fuel-vm", package = "fuel-vm", default-features = false }
# fuel-vm-private = { git = "https://github.com/FuelLabs/fuel-vm", branch = "dento/execution-trace", package = "fuel-vm", default-features = false }
# fuel-vm-private = { version = "0.58.2", package = "fuel-vm", default-features = false }
fuel-vm-private = { version = "0.58.2", package = "fuel-vm", default-features = false }

# Common dependencies
anyhow = "1.0"
Expand Down
73 changes: 7 additions & 66 deletions crates/client/assets/schema.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ type Mutation {
"""
Get execution trace for an already-executed transaction.
"""
executionTraceBlock(height: U32!, trigger: TraceTrigger!): [TraceTransactionExecutionStatus!]!
storageReadReplay(height: U32!): [[StorageReadReplayEvent!]!]!
"""
Submits transaction to the `TxPool`.

Expand Down Expand Up @@ -1122,6 +1122,12 @@ type StateTransitionPurpose {
root: Bytes32!
}

type StorageReadReplayEvent {
column: String!
key: HexString!
value: HexString
}


type SubmittedStatus {
time: Tai64Timestamp!
Expand Down Expand Up @@ -1174,71 +1180,6 @@ type SuccessStatus {

scalar Tai64Timestamp

type TraceFailureStatus {
programState: ProgramState
reason: String!
receipts: [Receipt!]!
executionTrace: [TraceFrame!]!
totalGas: U64!
totalFee: U64!
}

type TraceFrame {
"""
Register values
"""
registers: [U64!]!
"""
Changes to memory `(address, bytes)` that occurred since the last frame
"""
memoryDiff: [TraceFrameMemoryPatch!]!
"""
How many of the original receipts have been produced by this point
"""
receiptCount: Int!
}

type TraceFrameMemoryPatch {
"""
Start address
"""
start: Int!
"""
Bytes of data
"""
bytes: HexString!
}

type TraceSuccessStatus {
programState: ProgramState
receipts: [Receipt!]!
executionTrace: [TraceFrame!]!
totalGas: U64!
totalFee: U64!
}

type TraceTransactionExecutionStatus {
id: TransactionId!
status: TraceTransactionStatus!
receipts: [Receipt!]!
}

union TraceTransactionStatus = TraceSuccessStatus | TraceFailureStatus

"""
One of the films in the Star Wars Trilogy
"""
enum TraceTrigger {
"""
After each instruction
"""
ON_INSTRUCTION
"""
After an instruction has created a receipt
"""
ON_RECEIPT
}

type Transaction {
id: TransactionId!
inputAssetIds: [AssetId!]
Expand Down
Loading

0 comments on commit 8d80d7b

Please sign in to comment.