zcash-swift-wallet-sdk icon indicating copy to clipboard operation
zcash-swift-wallet-sdk copied to clipboard

Add a (swift) script to update checkpoint files

Open dh-ecc opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently the json checkpoint files we use (or atleast will be using after #326 is closed) are updated manually. This creates a possibility for human error, and adds work needed to keep them up to date.

Describe the solution you'd like

Create a swift script that can be run as part of a build process or a CI step or similar, that pulls down the most recent chcekpoints we like and adds them to the bundled resources in the SDK. This should be using GRPC directly to a lightwalletd instance we have access to.

This:

  • reduces the possibility for error
  • reduces the manual work needed to keep these updated
  • is testable
  • Removes an issue we encountered with json responses from lightwalletd that we use to create the checkpoint files having varying serialisation semantics for one of it's properties.

Alternatives you've considered

  • Bash script: decided against since it's not as easily testable and could be susceptable to differences between machines (more so that a swift script)
  • Status Quo: i.e continue to do this manually

Additional context

This came out of an issue discovered as part of #326 (please have a quick read of the description for that). The idea of this came out of the realisation that we could solve two issues at once with this approach, specifically, the ambiguity of the json produced by calling the json rpc of lightwalletd and the fact that the process is still manual.

dh-ecc avatar Mar 24 '22 18:03 dh-ecc