Skip to content

Commit

Permalink
model changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfloatersu committed Aug 12, 2023
1 parent 4ff2bf3 commit 3d55c0b
Show file tree
Hide file tree
Showing 14 changed files with 1,370 additions and 1,145 deletions.
42 changes: 42 additions & 0 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3641,6 +3641,10 @@
"description": "Allows access to unnamed resources during simulation.",
"type": "boolean"
},
"return-initial-state": {
"description": "Returns initial states of resources before simulation.",
"type": "boolean"
},
"extra-opcode-budget": {
"description": "Applies extra opcode budget during simulation for each transaction group.",
"type": "integer"
Expand Down Expand Up @@ -3964,11 +3968,32 @@
"exec-trace": {
"$ref": "#/definitions/SimulationTransactionExecTrace"
},
"txn-initial-state": {
"$ref": "#/definitions/SimulateTxnInitialState"
},
"unnamed-resources-accessed": {
"$ref": "#/definitions/SimulateUnnamedResourcesAccessed"
}
}
},
"SimulateTxnInitialState": {
"description": "A transaction's initial state during simulation.",
"type": "object",
"properties": {
"program-hash": {
"description": "Hash digest for executed application byte code.",
"type": "string",
"format": "byte"
},
"inner-initial-states": {
"description": "An array of simulation initial states for inner transactions executed.",
"type": "array",
"items": {
"$ref": "#/definitions/SimulateTxnInitialState"
}
}
}
},
"StateProof": {
"description": "Represents a state proof and its corresponding message",
"type": "object",
Expand Down Expand Up @@ -4218,6 +4243,20 @@
}
}
}
},
"SimulateInitialState": {
"description": "Initial states for objects before simulation.",
"type": "object",
"properties": {
"program-bytes": {
"description": "The program bytes get executed in this simulation.",
"type": "array",
"items": {
"type": "string",
"format": "byte"
}
}
}
}
},
"parameters": {
Expand Down Expand Up @@ -4868,6 +4907,9 @@
},
"exec-trace-config": {
"$ref": "#/definitions/SimulateTraceConfig"
},
"initial-state": {
"$ref": "#/definitions/SimulateInitialState"
}
}
}
Expand Down
50 changes: 50 additions & 0 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@
"exec-trace-config": {
"$ref": "#/components/schemas/SimulateTraceConfig"
},
"initial-state": {
"$ref": "#/components/schemas/SimulateInitialState"
},
"last-round": {
"description": "The round immediately preceding this simulation. State changes through this round were used to run this simulation.",
"type": "integer"
Expand Down Expand Up @@ -2033,6 +2036,21 @@
],
"type": "object"
},
"SimulateInitialState": {
"description": "Initial states for objects before simulation.",
"properties": {
"program-bytes": {
"description": "The program bytes get executed in this simulation.",
"items": {
"format": "byte",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"SimulateRequest": {
"description": "Request type for simulation endpoint.",
"properties": {
Expand All @@ -2055,6 +2073,10 @@
"description": "Applies extra opcode budget during simulation for each transaction group.",
"type": "integer"
},
"return-initial-state": {
"description": "Returns initial states of resources before simulation.",
"type": "boolean"
},
"txn-groups": {
"description": "The transaction groups to simulate.",
"items": {
Expand Down Expand Up @@ -2157,6 +2179,9 @@
"description": "Budget used during execution of a logic sig transaction.",
"type": "integer"
},
"txn-initial-state": {
"$ref": "#/components/schemas/SimulateTxnInitialState"
},
"txn-result": {
"$ref": "#/components/schemas/PendingTransactionResponse"
},
Expand All @@ -2169,6 +2194,25 @@
],
"type": "object"
},
"SimulateTxnInitialState": {
"description": "A transaction's initial state during simulation.",
"properties": {
"inner-initial-states": {
"description": "An array of simulation initial states for inner transactions executed.",
"items": {
"$ref": "#/components/schemas/SimulateTxnInitialState"
},
"type": "array"
},
"program-hash": {
"description": "Hash digest for executed application byte code.",
"format": "byte",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"type": "string"
}
},
"type": "object"
},
"SimulateUnnamedResourcesAccessed": {
"description": "These are resources that were accessed by this group that would normally have caused failure, but were allowed in simulation. Depending on where this object is in the response, the unnamed resources it contains may or may not qualify for group resource sharing. If this is a field in SimulateTransactionGroupResult, the resources do qualify, but if this is a field in SimulateTransactionResult, they do not qualify. In order to make this group valid for actual submission, resources that qualify for group sharing can be made available by any transaction of the group; otherwise, resources must be placed in the same transaction which accessed them.",
"properties": {
Expand Down Expand Up @@ -6754,6 +6798,9 @@
"exec-trace-config": {
"$ref": "#/components/schemas/SimulateTraceConfig"
},
"initial-state": {
"$ref": "#/components/schemas/SimulateInitialState"
},
"last-round": {
"description": "The round immediately preceding this simulation. State changes through this round were used to run this simulation.",
"type": "integer"
Expand Down Expand Up @@ -6787,6 +6834,9 @@
"exec-trace-config": {
"$ref": "#/components/schemas/SimulateTraceConfig"
},
"initial-state": {
"$ref": "#/components/schemas/SimulateInitialState"
},
"last-round": {
"description": "The round immediately preceding this simulation. State changes through this round were used to run this simulation.",
"type": "integer"
Expand Down
Loading

0 comments on commit 3d55c0b

Please sign in to comment.