implementing generic header interface for rollmint header#652
implementing generic header interface for rollmint header#652gupadhyaya wants to merge 3 commits intoevstack:mainfrom
Conversation
types/header.go
Outdated
| // Time returns time when header was created. | ||
| // Time() time.Time |
There was a problem hiding this comment.
We can't just remove Time from this interface. Header.Time should be renamed (to Header.time?) and Header.Time() method should just return it (of course we need to update usages in codebase).
There was a problem hiding this comment.
it will be odd to just rename the two fields (Height and Time) to lower-case. Either we uniformly rename all fields (even then other structs like Block, Data, etc, have upper-case field names) or find derived names for header interface methods. e.g., Time() => Timestamp() and Height() => Number(). Basically, if you consider the Ethereum header, these alternatives are used. Is it possible to change the header interface this way?
There was a problem hiding this comment.
Let's start with mixing getters with fields to match the header interface from https://github.com/celestiaorg/go-header. We plan to re-work the header in the near future anyways - then we will resolve this issue.
Codecov Report
@@ Coverage Diff @@
## main #652 +/- ##
==========================================
- Coverage 55.37% 55.35% -0.02%
==========================================
Files 50 51 +1
Lines 10293 10405 +112
==========================================
+ Hits 5700 5760 +60
- Misses 3728 3774 +46
- Partials 865 871 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
@tzdybal while the PR is ready for re-review here are some open issues that i need your suggestions on:
|
While
Ah, we started a bit prematurely working on this - see: celestiaorg/celestia-node#1304 (comment) Yes - it seems that we'll need
In case of rollmint, it doesn't work like that - in current "status quo" we just need to check that aggregatorsHash is valid/same. |
| // More specifically, trusting period + time needed to check headers + time | ||
| // needed to report and punish misbehavior should be less than the unbonding | ||
| // period. | ||
| var TrustingPeriod = 168 * time.Hour |
There was a problem hiding this comment.
[non-blocking] Comment Rollkit might have a different shorter or longer trusting period than node. The fraud proof window time might depend on this as well, if you are an optimistic Rollup. This should be toggleable in the future and the default value should be a deliberate value.
|
Replaced by #685. |
Resolves #641