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
Implement the required logic in /dot/state/block_notify.go
Create beefy listener in /dot/rpc/subscription/listeners.go
A quick suggestion about the implementation could be
typeBeefyListenerstruct {
Channelchan*types.FinalisationInfowsconn*WSConnsubIDuint32donechanstruct{}
cancelchanstruct{}
cancelTimeout time.Duration
}
func (l*BeefyListener) Listen() {
// Very similar than func (l *BlockFinalizedListener) Listen() but using the methods implemented in part 1.
}
Implement listener in /dot/rpc/subscription/websocket.go
func (c*WSConn) initBeefyBlockFinalizedListener(reqIDfloat64, _interface{}) (Listener, error) {
// Similar than initBlockFinalizedListener but using the methods implemented in part 1
}
Register listener in /dot/rpc/suscription/suscription.go with method beefy_subscribeJustifications
Test
The text was updated successfully, but these errors were encountered:
dimartiro
changed the title
(BEEF): Implement RPCs methods
(BEEFY): Implement RPCs methods
Sep 9, 2024
Description
Implement the require RPCs methods for BEEFY, these are:
beefy_getFinalizedHead
- Returns the hash of the latest BEEFY finalized blockbeefy_subscribeJustifications
- Returns the block finalized by BEEFY alongside its justificationbeefy_unsubscribeJustifications
- Unsuscribe from beefy justificationsDependencies
beefy_getFinalizedHead
/dot/rpc/interfaces
that should be implemented by BEEFY service/lib/beefy/beefy.go
/dot/rpc/modules/beefy.go
beefy_subscribeJustifications & beefy_unsubscribeJustifications
GetBeefyFinalisedNotifierChannel
andFreeBeefyFinalisedNotifierChannel
as part ofBlockAPI
/dot/state/block_notify.go
/dot/rpc/subscription/listeners.go
A quick suggestion about the implementation could be
/dot/rpc/subscription/websocket.go
/dot/rpc/suscription/suscription.go
with methodbeefy_subscribeJustifications
The text was updated successfully, but these errors were encountered: