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

Update API to support Athena VM #6409

Open
lrettig opened this issue Oct 23, 2024 · 0 comments
Open

Update API to support Athena VM #6409

lrettig opened this issue Oct 23, 2024 · 0 comments

Comments

@lrettig
Copy link
Member

lrettig commented Oct 23, 2024

In #6380 the Athena VM is being integrated as an alternative VM to the genvm. However, the API still only talks to genvm. For example, ParseTransaction in the TransactionService uses genvm to parse and validate an incoming raw tx. Similarly, ParseTransaction in the v2alpha1 API uses genvm to do the same, as well as to EstimateGas. Moreover, many API tests use the genvm SDKs and templates to construct test transactions. All of this needs to be modified to support Athena, which uses a slightly different transaction format (athenavm/athena#172).

Note that the VM code in go-spacemesh currently doesn't have the ability to destructure a raw, encoded Athena TX to read its args and details such as recipient and amount (for a Spend tx). I suggest the following plan:

  1. Replace all references to genvm with vm.
  2. Skip all tests that use a tx type other than Spend/Spawn
  3. Update tx-related services to match the Athena tx format, leaving out for now any information that requires parsing/decoding the tx
  4. Discuss and decide whether we intend go-spacemesh to be able to parse/decode Athena txs, or whether we'll require callers to do this on their own

CC @poszu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant