stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 672 forks source link

Chore/cache timestamp calc #5494

Open jferrant opened 12 hours ago

jferrant commented 12 hours ago

I originally tried to create a db that just tracked a cumulative tenure processing time that would reset each time a new tenure change payload arrived, but these had a lot of edge cases due to out of order blocks. Hank suggested keeping a much smaller db copy of blocks to determine the tenure processing time instead which was much cleaner. I also implemented a cleanup for it since technically this is redundant/heuristic info and don't think we should have to keep it around indefinitely like we do other signer data.