veres-one / veres-one-validator

A ledger validator that accepts either signatures or proof of work
Other
3 stars 0 forks source link

Update to 2020 cryptosuites, witness pool, zcap invocation, tighter string validation. #37

Closed msporny closed 3 years ago

msporny commented 3 years ago

There were a ridiculous number of changes needed to update to support the 2020 cryptosuites. The ZCAP context isn't in here yet, leaving that to @aljones15.

@dlongley @davidlehn @dmitrizagidulin ... please pay particular attention to these changes I had to make in did-veres-one:

https://github.com/veres-one/did-veres-one/pull/60/commits/1a3970348d3416f232a58b782cd9c6c9b8d9612e https://github.com/veres-one/did-veres-one/pull/60/commits/7b798da9b3cbb0d0e0957a6d2c25719aa177eaeb

I feel like I had to abuse the did-veres-one API to use it in the tests. fromNym() seems like something we'd want exposed... I'm not so sure the same is true for attachAcceleratorProof().

This also feels unsustainable:

https://github.com/digitalbazaar/bedrock-ledger-context/blob/v1-dingo-rc1/lib/index.js#L29-L50 https://github.com/veres-one/did-veres-one/blob/v14.x/lib/documentLoader.js#L13-L20

We use /both/ of those document loaders in parallel in veres-one-validator, btw... which gets super confusing when they depend on different context versions. :)

The good news is that we have lots of tests here, and while it was a horrible pain to get them working again, I couldn't imagine doing this PR without them.

codecov-commenter commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@8e9d7d1). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #37   +/-   ##
=======================================
  Coverage        ?   90.00%           
=======================================
  Files           ?       15           
  Lines           ?      370           
  Branches        ?        0           
=======================================
  Hits            ?      333           
  Misses          ?       37           
  Partials        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8e9d7d1...7524a2a. Read the comment docs.