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

Transaction Building/Signing/Verifying Test Vector Brainstorm #47

Open
nkohen opened this issue Aug 5, 2020 · 7 comments
Open

Transaction Building/Signing/Verifying Test Vector Brainstorm #47

nkohen opened this issue Aug 5, 2020 · 7 comments

Comments

@nkohen
Copy link
Contributor

nkohen commented Aug 5, 2020

I now have a working implementation of adpator-based DLCs. I would like to begin brainstorming a list of cases we want to make sure are included in the transaction building test vectors I will be generating.

Things that come immediately to my mind:

  • "Vanilla" construction for n outcomes where n = 2, 3, 5, 8, 100 and various oracle signatures with computed completed CETs (Happy Path)
  • "Vanilla" construction with invalid oracle signature
  • "Vanilla" construction with valid oracle signature of invalid event
  • Invalid refund signature
  • Invalid DLEQ proof on one CET, all CETs
  • Invalid adaptor signature (with valid DLEQ proof)
  • Invalid adaptor signature and invalid DLEQ proof
  • Invalid funding signature
  • Non segwit funding input
  • Invalid final address
  • Invalid offer
  • Invalid accept
  • Sign message missing signatures

Please add to this list and/or critique it!

@Christewart
Copy link
Contributor

Closing #30 as this supersedes it

@benthecarman
Copy link
Contributor

benthecarman commented Aug 5, 2020

  • Negative outcome values
  • Incorrect fee rate on tx
  • fee rate given was below network min
  • party did not fund the correct amount
  • invalid change address
  • invalid change amount
  • CET has extra inputs
  • CET has missing/no inputs
  • CET has extra outputs
  • CET has missing/no outputs
  • funding tx has extra inputs
  • funding tx has missing/no inputs
  • funding tx has extra outputs
  • funding tx has missing/no outputs
  • wrong nLocktimes
  • wrong sequence
  • wrong keys in funding output script
  • funding output has wrong script

@nkohen
Copy link
Contributor Author

nkohen commented Aug 5, 2020

* Negative outcome values

* Incorrect fee rate

* party did not fund the correct amount

* invalid change address

These I like

* invalid change amount

* CET has extra inputs

* CET has missing/no inputs

* CET has extra outputs

* CET has missing/no outputs

* funding tx has extra inputs

* funding tx has missing/no inputs

* funding tx has extra outputs

* funding tx has missing/no outputs

* wrong nLocktimes

* wrong sequence

* wrong keys in funding output script

* funding output has wrong script

These I'm a little unsure about as transactions are not actually communicated between parties so these cases will just result in invalid signatures right?

@benthecarman
Copy link
Contributor

These I'm a little unsure about as transactions are not actually communicated between parties so these cases will just result in invalid signatures right?

Yeah, I guess these are more things to that people should testing with the test vectors

@nkohen
Copy link
Contributor Author

nkohen commented Aug 5, 2020

Good point, I guess I could generate a bunch of invalid signatures in this way with error messages about how they were generated to make life easier for people when debugging

@nkohen
Copy link
Contributor Author

nkohen commented Aug 6, 2020

Funding transactions with different kinds of exotic change output SPKs

@nkohen
Copy link
Contributor Author

nkohen commented Aug 6, 2020

Funding transactions with various numbers of inputs from each party

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants