Open pinheadmz opened 4 years ago
Another solution, but which needs migration is to change layout.i/layout.B - entries in txdb responsible for bid/reveal tracking to have additional height
after the hash
. (height
referring to the auction open height)
i[namehash][height][txhash][index] -
B[namehash][height][txhash][index]
This allows to query all Bids/Namehash related to the name (+historical) or Specifically the newest one. Unfortunately, writing migration for this will be troublesome, as the information about past auctions per name is not preserved anywhere. So at the point of migration everything in the past will have the same height.
For the better namestate tracking on top of it, it's possible to also introduce this change to name and undo records (and probably all name entries in the db)
Related to: https://github.com/handshake-org/hsd/pull/316
To reproduce:
getbids
: the bid from the first auction is still presentgetbids
: the bid from the first auction is still presentgetbids
: the bid from the first auction is still presentThis is entirely a UI issue (for example, Bob will show the user the old bid on the screen for the new auction, even though this bid IS NOT participating in this new auction). None of the
sendreveal
functions are affected, etc - everything is fine under the hood.Potential solution: add a parameter to
getbids
likeminconf
orminheight
to filter out bids that are inactive or for expired auctions.