Skip to content

Simulate: Fix simulate request error & support ATC simulation#611

Merged
jasonpaulos merged 4 commits intodevelopfrom
simulate-fix
Sep 15, 2023
Merged

Simulate: Fix simulate request error & support ATC simulation#611
jasonpaulos merged 4 commits intodevelopfrom
simulate-fix

Conversation

@jasonpaulos
Copy link
Copy Markdown
Contributor

@jasonpaulos jasonpaulos commented Sep 14, 2023

A user reported that the following error occurred when trying to use the algod simulate endpoint:

HTTP 400: {"message":"failed to decode object: json decode error [pos 13]: no matching struct field found when decoding stream map with key Format"}

I reproduced the error and saw that it was because the simulate endpoint needed to be added to rawRequestPaths, otherwise the code uses the query params as the POST body. This required a code generation change as well: algorand/generator#68

In order to add coverage, I enabled the @simulate cucumber tests and added the necessary step defs.

Note that these tests also cover simulating with the AtomicTransactionComposer, which this SDK didn't support. Instead of modifying the test tags to separate this out (and updating the other SDKs' tags), I ended up implementing the missing feature instead.

@jasonpaulos jasonpaulos changed the title Fix simulate requests & support ATC simulation Simulate: Fix simulate request error & support ATC simulation Sep 14, 2023
@jasonpaulos jasonpaulos self-assigned this Sep 14, 2023
Comment thread transaction/atomicTransactionComposer.go Outdated
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changes here are from algorand/generator#68

@jasonpaulos jasonpaulos marked this pull request as ready for review September 14, 2023 16:41
@jasonpaulos jasonpaulos requested a review from winder September 14, 2023 16:41
@jasonpaulos jasonpaulos merged commit 5c2f06a into develop Sep 15, 2023
@jasonpaulos jasonpaulos deleted the simulate-fix branch September 15, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants