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

Slatepack Workflow #423

Merged
merged 13 commits into from
Jun 3, 2020
Merged

Slatepack Workflow #423

merged 13 commits into from
Jun 3, 2020

Conversation

yeastplume
Copy link
Member

@yeastplume yeastplume commented May 29, 2020

Aims to implement the command-line workflow as specified in the Slatepack RFC.

As with all other slatepack-related PRs to date, note there's going to be a lot of extra code here to deal with backwards compatibility needed between release and HF3.

  • Removes the method flag in favor of slatepack workflows
  • dest is no longer mandatory for all functions that produce a slate. If provided, the slatepack sync-send workflow is invoked, followed by slatepack output if that fails. If not provided the slatepack is automatically output.
  • if dest is provided as a slatepack address, slates are encrypted for the recipient.
  • The sender field in the slate is filled out by default.
  • All command-line functions that produce a slate for sending to the other party (init_send_tx, receive_tx, process_invoice_tx, etc) attempt to send via the slatepack's sender field if available, otherwise they revert to slatepack output.
  • The OwnerAPI functions init_send_tx and process_invoice_tx will optionally invoke the slatepack sync workflow if the appropriate InitSendTx arguments are provided. The ForeignAPI function receive_tx will attempt to send if a return address is provided. This functionality is provided for convenience for upstream wallet developers. If these functions are used, the caller should check the slate's sta field to determine whether the sync send attempt succeeded, and invoke the slatepack workflow otherwise.
  • All command-line functions that produce a slate output the slatepack to the terminal, as well as save the slatepack in a file [slatepack/[slate-id].[slate.state].slatepack.
  • The input argument for all command-line functions that accept a slate is no longer mandatory. If included, the function will attempt to read from the given file. If not, the function will prompt the user to paste slatepack data into the terminal directly.
  • TOR send is fixed via a custom version of the hyper-socks2 crate
  • Adds an http(s) deprecation warning and nag prompt when the provided send address begins with 'http'

@yeastplume yeastplume mentioned this pull request Jun 1, 2020
@yeastplume yeastplume changed the title [WIP] Slatepack Workflow Slatepack Workflow Jun 2, 2020
@yeastplume
Copy link
Member Author

Ready for merge, top comment is updated with details of changes.

@yeastplume yeastplume requested a review from j01tz June 2, 2020 12:40
@quentinlesceller
Copy link
Member

Currently reviewing the code but out of curiosity a send from this version to a v3.1.1 node through Tor fails. Is it expected?

@yeastplume
Copy link
Member Author

No, but there are now dozens of permutations of sends and receives that need to be tested, particularly between wallet versions. There are definitely issues that will need to be worked through over the beta period

Copy link
Member

@j01tz j01tz left a comment

Choose a reason for hiding this comment

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

Reviewed to verify the slatepack workflow logic: this PR accurately captures the workflow of the specification.

minor note: it looks like keybase method is essentially removed, we should probably make sure this is explicit in release notes just in case anyone is relying on it.

Really looking forward to testing and refining further. Great work putting this all together so fast, inspiring!

@yeastplume yeastplume merged commit 60ab372 into mimblewimble:master Jun 3, 2020
@yeastplume yeastplume deleted the slatepack_cl branch July 13, 2020 10:20
antiochp pushed a commit to antiochp/grin-wallet that referenced this pull request Aug 7, 2020
* debugging tor sends

* use fixed yeast version of hyper-socks2

* send command working according to slatepack

* changes to handling proof address

* modifications of recieve command to work with slatepack and to attempt to return to sender via TOR

* finalize command tested

* attempting to add invoice processing

* fixes to tests, propagation of test mode where needed

* modify return values of api functions that can send as sync

* cleanup, testing and post_tx function

* revert changes to API, many test fixes

* deprecate http on the command-line warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants