Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simulate: resource population #6015

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5ba0a9a
ResourcePopulator
joe-p Jun 5, 2024
028b8c4
TestPopulatorWithGlobalResources (arrays only)
joe-p Jun 6, 2024
941ba6e
test addBox
joe-p Jun 6, 2024
a69091c
use ElementsMatch
joe-p Jun 6, 2024
d9e77ef
addHolding
joe-p Jun 6, 2024
4667647
test variable renaming
joe-p Jun 6, 2024
cbd1d8a
appLocals
joe-p Jun 6, 2024
d79780f
restore default limits
joe-p Jun 6, 2024
e6d59ba
fix rekey field
joe-p Jun 6, 2024
54cd38c
populate with static properties and remove zeroAddr
joe-p Jun 6, 2024
673b03d
empty boxes
joe-p Jun 6, 2024
ceddaa2
ensure duplicates are removed
joe-p Jun 6, 2024
62213a0
overflow txn resources
joe-p Jun 6, 2024
f616449
use ConsensusParams
joe-p Jun 6, 2024
6a4f1ee
fix empty box count
joe-p Jun 6, 2024
0524c3c
golangci-lint
joe-p Jun 6, 2024
73e5b4c
Merge branch 'master' into feat/populate_resources
joe-p Jun 14, 2024
6d8c161
PopulateResourceArrays in simulate (untested)
joe-p Jun 15, 2024
022c565
populate from ResourceTracker
joe-p Jun 18, 2024
93dd4e9
initial TestPopulateResources
joe-p Jun 18, 2024
3f78752
group sharing and no group sharing TestPopulateResources
joe-p Jun 18, 2024
359b5b0
test with non appl in group
joe-p Jun 19, 2024
2229b0a
modify visibility on resource pop stuff
joe-p Jun 19, 2024
ec7a36a
remove duplicate partitiontest.PartitionTest(t)
joe-p Jun 19, 2024
351f915
don't make RekeyTo address available
joe-p Jun 19, 2024
99abd2f
add PopulateResourceArrays to simulate API (WIP)
joe-p Jul 24, 2024
96f1af1
Apply suggestions from code review
joe-p Oct 2, 2024
02534ae
Apply suggestions from code review
joe-p Oct 2, 2024
0815e29
PopulateResourceArrays -> PopulateResources
joe-p Oct 2, 2024
b4f7f54
static -> prefilled
joe-p Oct 2, 2024
e665817
replace ifs with switch
joe-p Oct 2, 2024
c9e6e5d
hasAccount short circuit logic
joe-p Oct 2, 2024
2ea34f2
check for room and return error in add... methods
joe-p Oct 2, 2024
93e7b81
mixed resources test
joe-p Oct 2, 2024
292a9b9
use arrays in txn and group result rather than map[int] for API (WIP)
joe-p Oct 9, 2024
035ef72
only populate resources when there's no error
joe-p Oct 30, 2024
daa0e1f
only make ExtraResourceArrays if any extra resources exist
joe-p Nov 23, 2024
41d63dd
properly check for nil err
joe-p Jan 17, 2025
7353379
expect an empty box ref
joe-p Jan 17, 2025
64fd855
Merge branch 'master' into feat/populate_resources
joe-p Jan 18, 2025
db6f01b
update extra resource arrays description
joe-p Jan 28, 2025
affa449
TestPopulatorWithAlreadyAvailableResources
joe-p Jan 28, 2025
c4091e0
TestPopulatorWithNoRoom
joe-p Jan 28, 2025
cf29efb
check all txns to see if they have a resource before adding
joe-p Jan 28, 2025
e2f08c3
ensure all txn fields are accounted for to ensure there are no dups
joe-p Jan 29, 2025
bc58ba6
test no room for empty box ref
joe-p Jan 29, 2025
e29877d
use consensus params for each max ref
joe-p Jan 29, 2025
989e746
remove printlns
joe-p Jan 29, 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
8 changes: 8 additions & 0 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3948,6 +3948,10 @@
"fix-signers": {
"description": "If true, signers for transactions that are missing signatures will be fixed during evaluation.",
"type": "boolean"
},
"populate-resource-arrays": {
joe-p marked this conversation as resolved.
Show resolved Hide resolved
"description": "If true, return populated resource arrays for each transaction based on unnamed resources",
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -4265,6 +4269,10 @@
},
"unnamed-resources-accessed": {
"$ref": "#/definitions/SimulateUnnamedResourcesAccessed"
},
"populated-resource-arrays": {
"description": "Present if populate-resource-arrays is true in the request. In that case, it will be a map of transaction index in the group to populated resource arrays. There may be moure resource arrays given than transaction in the group, which means more app call transactions would be needed for extra resources.",
joe-p marked this conversation as resolved.
Show resolved Hide resolved
"type": "object"
joe-p marked this conversation as resolved.
Show resolved Hide resolved
}
}
},
Expand Down
9 changes: 9 additions & 0 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2306,6 +2306,10 @@
"description": "If true, signers for transactions that are missing signatures will be fixed during evaluation.",
"type": "boolean"
},
"populate-resource-arrays": {
"description": "If true, return populated resource arrays for each transaction based on unnamed resources",
"type": "boolean"
},
"round": {
"description": "If provided, specifies the round preceding the simulation. State changes through this round will be used to run this simulation. Usually only the 4 most recent rounds will be available (controlled by the node config value MaxAcctLookback). If not specified, defaults to the latest available round.",
"type": "integer"
Expand Down Expand Up @@ -2386,6 +2390,11 @@
"description": "If present, indicates that the transaction group failed and specifies why that happened",
"type": "string"
},
"populated-resource-arrays": {
"description": "Present if populate-resource-arrays is true in the request. In that case, it will be a map of transaction index in the group to populated resource arrays. There may be moure resource arrays given than transaction in the group, which means more app call transactions would be needed for extra resources.",
"properties": {},
"type": "object"
},
"txn-results": {
"description": "Simulation result for individual transactions",
"items": {
Expand Down
112 changes: 57 additions & 55 deletions daemon/algod/api/server/v2/generated/data/routes.go

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

Loading