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

algod: Simulate Endpoint #743

Merged
merged 35 commits into from
Mar 16, 2023
Merged

algod: Simulate Endpoint #743

merged 35 commits into from
Mar 16, 2023

Conversation

algochoi
Copy link
Contributor

@algochoi algochoi commented Feb 24, 2023

This PR:

  • Generates Simulate-related objects/types
  • Adds algod support for the simulate endpoint
  • Implements cucumber tests from this SDK testing PR

To support sending unsigned transactions to the simulate endpoint, also adds encodeNoSigTransaction() to encode them. Currently, algod does not seem to decode Transaction, so we wrap them in a SignedTransaction-like object, but set the sig field to null. For simulating unsigned txns in the ATC, added makeNoSigTransactionSigner to allow the transaction signer to encode unsigned transactions and simulate them.

TODO:

  • SDK Tests need to be merged in first
  • Need to fix CI tests due to some issues with indexer in dev mode (local tests pass for the new @simulate tag)

.test-env Outdated
@@ -1,6 +1,6 @@
# Configs for testing repo download:
SDK_TESTING_URL="https://github.com/algorand/algorand-sdk-testing"
SDK_TESTING_BRANCH="master"
SDK_TESTING_BRANCH="simulate-endpoint-tests"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: revert back to master

@algochoi algochoi changed the title [Draft] Simulate Endpoint algod: Simulate Endpoint Mar 3, 2023
@algochoi algochoi marked this pull request as ready for review March 8, 2023 21:29
* Encode unsigned transactions for simulation

* Implement unsigned txn simulate in ATC

* Change test branch
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Overall, looks good. I had several possible nits and other very minor suggestions.

tests/cucumber/steps/steps.js Show resolved Hide resolved
tests/cucumber/steps/steps.js Show resolved Hide resolved
src/transaction.ts Outdated Show resolved Hide resolved
src/encoding/encoding.ts Show resolved Hide resolved
src/client/v2/algod/models/types.ts Show resolved Hide resolved
src/client/v2/algod/models/types.ts Show resolved Hide resolved
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

LGTM

@algochoi algochoi closed this Mar 16, 2023
@algochoi algochoi reopened this Mar 16, 2023
@algochoi algochoi merged commit 0039284 into develop Mar 16, 2023
@algochoi algochoi deleted the simulate-endpoint-generate branch March 16, 2023 18:45
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.

None yet

3 participants