Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): add proof-of-inclusion (PoI) endpoints (#854)
* Create proof-of-inclusion endpoints and initial logic * Cleanup and test Merkle tree hasher * Add db query for pastcone in whiteflag order * Create PoI * Improve hasher * Improve hasher 2 * Implement contains check * Impl proof validation part 1 * Clippy + Format * Faulty License header complaint and clippy belitteling * Fix validity check * Add PoI api spec * Add PoI link * Impl proof validation part 2 * Cleanup Merkle hasher * Cleanup Merkle proof * Test dto roundtrip * Format * Remove key_manager module (as it was kinda bloat) * Update api-poi.yaml * Remove hex prefix for milestone validation * Format * I hate you clippy ... sometimes ;) * Nit * Don't need to fetch the milestone on validation * Make PoI feature default * Return error if decoding public key fails * Include 'white_flag_index' into new combound index * Refactor 'Hashable' enum * Improve 'compute_proof' recursive fn Co-authored-by: Alex Coats <alexandcoats@gmail.com> * Refactor 'merkle_proof' module * Document recursive fn * Remove generics from the Merkle hasher Co-authored-by: Alex Coats <alexandcoats@gmail.com> * Nit * Add PoI endpoints for applied blocks * Remove dependency on lazy-static * Remove binary response stubs * Simplify audit path algo * Further simplify and document audit path algo * Improve docs * Refer to Core REST API * Debug 1 * Support single block cone audit paths * Improve docs * Impl AsRef for BlockId and make use of it * Cleanup PoI routes * More cleanup Co-authored-by: Alex Coats <alexandcoats@gmail.com> Co-authored-by: Jochen Görtler <grtlr@users.noreply.github.com>
- Loading branch information