rollkit / go-da

Generic Data Availability Interface for Modular Blockchains
Apache License 2.0
43 stars 21 forks source link

Handling of forks #46

Open pepyakin opened 8 months ago

pepyakin commented 8 months ago

It's not clear how the forks are going to be handled. Given the following function:

https://github.com/rollkit/go-da/blob/011ba6919abc161b0703d1e3d87b45adf2f96464/da.go#L16-L17

Two calls with the same height and namespace can return different IDs.

You can fit the definition by considering only finalized blocks for height. I would imagine it may be slightly annoying for Avail since it uses BABE & GRANDPA which is pretty fast most of the time. In Ethereum however finality time is way longer.

  1. Am I missing something?
  2. What is the suggested way to handle non-finalized chain heads?
  3. What's the game of plan of Avail, if known.
  4. Are there plans to change the API to accomodate non-single-slot-finality chains?
nashqueue commented 8 months ago
  1. No you are correct
  2. This interface assumes single slot finality or to wait until a height that is final
  3. You can follow the development in https://github.com/rollkit/avail-da
  4. You can write a proposal how to accommodate for non-single-slot-finality chains. :)