vocdoni / interoperability

Private repository to manage the interoperability between protocol, API, SDK, UIs and documentation
1 stars 0 forks source link

Implement block list endpoint #220

Closed selankon closed 1 week ago

selankon commented 3 weeks ago

This PR implements a block list endpoint on the API: https://github.com/vocdoni/vocdoni-node/pull/1329

This have to be implemented on:

altergui commented 3 weeks ago

here's what i have so far:

chainId and proposerAddress match exactly, hash matches partially (substring)

altergui commented 3 weeks ago

in the reply, not all blocks listed will have all their fields filled in, since back at the time we only indexed height and timestamp. so the first N blocks will only return height and timestamp, i.e. no hash, chainId nor proposerAddress. also those old blocks won't be included in results when using any of those filters, of course

altergui commented 3 weeks ago

since that PR will take longer, i cherry-picked and adapted the relevant code to work without the indexer, to not block this interop issue longer https://github.com/vocdoni/vocdoni-node/pull/1369

altergui commented 2 weeks ago

here's what i have so far:

* GET /chain/blocks

  * page
  * limit
  * chainId
  * hash
  * proposerAddress

chainId and proposerAddress match exactly, hash matches partially (substring)

@marcvelmer this is what i implemented and is merged on backend (the filters don't actually filter yet, but for interop it's irrelevant since the format of the params and the returned reply won't change when that's finished)

https://developer.vocdoni.io/vocdoni-api/list-all-blocks