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

chore: cli: Confirm tooling that assumes knowledge of method params / returns don't break #10173

Merged
merged 2 commits into from
Feb 6, 2023

Conversation

geoff-vball
Copy link
Contributor

Related Issues

Closes #9776 (comment)

Proposed Changes

Tests the decoding the params/returns for InvokeContract and CreateExternal. These were the only new function calls I could find on hyperspace through filfox.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@geoff-vball geoff-vball requested a review from a team as a code owner February 1, 2023 22:25
@arajasek
Copy link
Contributor

arajasek commented Feb 2, 2023

Thank you for this, it's good to see! Can we improve the tests to include actual assertions? I think we should be able to roundtrip the params in question, and use that for assertions. This might look something like:

  • Defining a returnStruct
var dummyReturn Return {
	ActorID: 6491,
	RobustAddress: f275fpmqmhgj3zsfytktprbnftx7bojqyga3wyu5a (decoded from address)
	EthAddress    []byte{...the bytes}
}
  • Marshaling that into a bytestr, which should give you the 8319195b5502ff4af64187327799171354df10b4b3bfc2e4c30654922d6956c99e12dfeb3224dea977d0939758a1fe string
  • Then going through the process this test currently does, and comparing the return against dummyReturn

@jennijuju jennijuju added this to the Network v18 milestone Feb 4, 2023
@jennijuju jennijuju requested a review from arajasek February 6, 2023 14:16
@arajasek arajasek merged commit 725f22a into release/v1.20.0 Feb 6, 2023
@arajasek arajasek deleted the gstuart/check-params branch February 6, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants