Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

feat(prover): change block signing to use timestamp as key #466

Merged
merged 9 commits into from
Dec 7, 2023

Conversation

cyberhorsey
Copy link
Contributor

@cyberhorsey cyberhorsey commented Dec 6, 2023

key previously used block ID which made it difficult to iterate using the DB iterator, because key prefixes would be like blockid-1, blockid-100 instead of something like blockid-1, blockid-2.

also fixes issue where all block hashes were using latestBlock, we now store the block hash as part of the value.

adds a more comprehensive test as well.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (51fd8f9) 60.53% compared to head (8c5286e) 60.56%.
Report is 2 commits behind head on main.

Files Patch % Lines
prover/server/api.go 41.93% 17 Missing and 1 partial ⚠️
prover/prover.go 40.00% 9 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #466      +/-   ##
==========================================
+ Coverage   60.53%   60.56%   +0.02%     
==========================================
  Files          45       45              
  Lines        5440     5472      +32     
==========================================
+ Hits         3293     3314      +21     
- Misses       1813     1826      +13     
+ Partials      334      332       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cyberhorsey cyberhorsey self-assigned this Dec 7, 2023
@cyberhorsey cyberhorsey marked this pull request as draft December 7, 2023 01:52
@cyberhorsey cyberhorsey marked this pull request as ready for review December 7, 2023 02:11
@davidtaikocha davidtaikocha merged commit eb5bc7a into main Dec 7, 2023
4 checks passed
@davidtaikocha davidtaikocha deleted the signed_block_db_fix branch December 7, 2023 02:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants