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 a way to broadcast signatures onchain #148

Open
colin-axner opened this issue May 6, 2019 · 3 comments · May be fixed by #188
Open

Add a way to broadcast signatures onchain #148

colin-axner opened this issue May 6, 2019 · 3 comments · May be fixed by #188
Assignees
Milestone

Comments

@colin-axner
Copy link
Member

Problem

There currently exists no way to send confirmation signatures to all nodes without spending the utxo's.

Proposal

This can be implemented in the same way as include-deposit, though I think users should still have the option to spend utxo's without confirm signatures being broadcasted first.

@colin-axner colin-axner added this to the Version 2.0 milestone Nov 19, 2019
@hamdiallam hamdiallam modified the milestones: Version 2.0, Version 1.0 Feb 28, 2020
@hamdiallam
Copy link
Member

hamdiallam commented Feb 28, 2020

Also requires a design doc/spec before implementing regarding how this fits into the data store.

@wesgraham
Copy link
Contributor

wesgraham commented Mar 4, 2020

Thoughts on implementation approach below.

Sample Usage:

./plasmacli tx broadcast-sigs
./plasmacli tx broadcast-sigs <input1, input2>
./plasmacli tx broadcast-sigs --confirmSigs0 --confirmSig1

Broadcasting Steps as follows:

  1. Retrieve confirm sigs from local storage (iterating over inputs - accessing via clistore)
  2. Parse confirm sigs (checking for --confirmSig flag usage overwriting confirm sigs)
  3. Create new sigMsg containing confirm Signatures
  4. Validate sigMsg
  5. Broadcast using cli.BroadcastAndAwaitCommit()

Validate sigMsg includes:
{
plasma.Input1
plasma.Input2
}

Handling Steps as follows:
AnteHandler defines sigMsgHandler

  1. Retrieves sigMsgSigner
  2. Validates Inputs
    2a) validateConfirmSignatures() already exists
    • Checks signer of confirmhash = signer of sigMsg

Add route for sigMsgHandler

  1. Receives validated sigMsg
  2. Stores Signature type in DataStore - contains {signature, inputs, signer}

@hamdiallam would appreciate insight on other things needed here

@wesgraham wesgraham self-assigned this Mar 4, 2020
@hamdiallam
Copy link
Member

We don't need the signer because we want to allow anyone to broadcast the confirm signature. The ante handler would check that the confirm signature is correctly constructed.

Looks good to me

@wesgraham wesgraham linked a pull request Mar 8, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants