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

Add SPV Handler to Pact Service #429

Merged
merged 26 commits into from
Sep 17, 2019
Merged

Conversation

emilypi
Copy link
Member

@emilypi emilypi commented Sep 16, 2019

This PR uses Greg's tx index lookup to take a request key and produce an SPV transaction output proof. The workflow is as follows:

  1. Lookup the index of the transaction on the current (source) chain, producing a block height and block hash.

  2. Using the block height, lookup the specific index of the transaction in the block associated with that height.

  3. Construct a transaction output proof using the SPV api for the given target chain id, at the blockheight associated with the transaction, at its index in the block.

  4. Return this as unpadded B64url-encoded text.

@fosskers fosskers added the component: pact-service The Pact Service, or Pact language updates in general. label Sep 16, 2019
@emilypi emilypi closed this Sep 17, 2019
@emilypi emilypi reopened this Sep 17, 2019
@emilypi emilypi marked this pull request as ready for review September 17, 2019 19:49
Copy link
Contributor

@mightybyte mightybyte left a comment

Choose a reason for hiding this comment

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

Merging to expedite release. If there are any issues, we can fix in a follow-on.

@emilypi emilypi merged commit 8aa492b into master Sep 17, 2019
@emilypi emilypi deleted the emily/pact-spv-endpoint-pardeux branch September 17, 2019 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pact-service The Pact Service, or Pact language updates in general.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants