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

Add SPV Handler to Pact Service #429

merged 26 commits into from Sep 17, 2019

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 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 Sep 17, 2019
Copy link
Contributor

@mightybyte mightybyte left a comment

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
1 check passed
@emilypi emilypi deleted the emily/pact-spv-endpoint-pardeux branch Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pact-service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants