pubky / pkarr

Public Key Addressable Resource Records (sovereign TLDs)
https://app.pkarr.org
MIT License
153 stars 17 forks source link

Consider storing historical data #42

Open decentralgabe opened 7 months ago

decentralgabe commented 7 months ago

Add a query parameter to the GET API to query by sequence number.

Allow relays to optionally store historical data, which may be useful.

Nuhvi commented 7 months ago

@decentralgabe sorry missed this, have you implemented this somewhere and suggesting to add it to the relay API design?

I don't have a strong opinion against it except for managing expectations. Would like to see your implementation if any.

Nuhvi commented 7 months ago

I wouldn't want to promise any persistence or even a large cache. Relays were meant for helping browsers not much more.

decentralgabe commented 7 months ago

have you implemented this somewhere and suggesting to add it to the relay API design

impl is in progress, but it is in our spec under Historical Resolution

we pretty much return a sorted list of seq numbers when you do a GET for an identifier, and then you can add a query param for a specific seq number

I wouldn't want to promise any persistence or even a large cache. Relays were meant for helping browsers not much more.

Agree, don't think it should be a requirement but optional for relays that wish to do this.

Nuhvi commented 7 months ago

@decentralgabe storing historical data is a good idea for many use cases and could even serve as soft key rotation mechanism if enough watch towers are around. But I want to keep an eye first on your efforts for rate limiting and see if it works, scales, and endures better than ION.

Keeping this issue open for that.