You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perform a detailed (security focused) review on the market health functions and it's tests - @samparsky and @elpiel - you should each do that
rewrite it in rust in a more efficient way and use that in the Supermarket - @elpiel you should do that
it can be optimized by:
not querying the validators if not needed (e.g. channel is expired)
by using the heartbeats returned in last-approved
only retrieving latest NewState/RejectState individually when the ones in last-approved are not recent (to distinct between Invalid and just not having a new New/Approve pair)
In terms of types, this can be represented much more cleanly as an enum of:
Initializing
Waiting
Active
Finalized - should contain another enum containing { Expired, Exhausted }
Unsound - should contain another enum with a struct { disconnected, offline, rejectedState, unhealthy } - where all of those are booleans
This will be implemented in the supermarket first, then the logic should be backported to the JS implementation - we'll figure out how to translate the type considering JS does not have sum types
The text was updated successfully, but these errors were encountered:
As we've discussed with @Ivshti some of the missing statuses, we now have:
#[derive(Debug)]pubenumStatus{// Active and Ready combinedActive,Pending,Initializing,Waiting,Finalized(Finalized),Unsound{disconnected:bool,offline:bool,rejected_state:bool,unhealthy:bool,},}#[derive(Debug)]pubenumFinalized{Expired,Exhausted,Withdraw,}
it can be optimized by:
In terms of types, this can be represented much more cleanly as an enum of:
{ Expired, Exhausted }
{ disconnected, offline, rejectedState, unhealthy }
- where all of those are booleansThis will be implemented in the supermarket first, then the logic should be backported to the JS implementation - we'll figure out how to translate the type considering JS does not have sum types
The text was updated successfully, but these errors were encountered: