Chain Adapter Implementation for BMR #6
Replies: 5 comments 13 replies
-
'Sender' and 'Receiver' interfaces are designed as you suggested ( btp/cmd/btpsimple/module/type.go Line 88 in f28c29b 'Receiver' has responsibility which is collecting proofs from source chain and generate. 'type ReceiveCallback func(bu *BlockUpdate, rps []*ReceiptProof)' shows that. |
Beta Was this translation helpful? Give feedback.
-
@jspark-icon In Sender interface design , the type Sender interface {
Segment(rm *RelayMessage, height int64) ([]*Segment, error)
UpdateSegment(bp *BlockProof, segment *Segment) error
Relay(segment *Segment) (GetResultParam, error)
GetResult(p GetResultParam) (TransactionResult, error)
GetStatus() (*BMCLinkStatus, error)
// Move these methods in Receiver
MonitorLoop(height int64, cb MonitorCallback, scb func()) error
StopMonitorLoop()
//
FinalizeLatency() int
} |
Beta Was this translation helpful? Give feedback.
-
I'm having some problems with the wallet implementation of the Ethereum client. I suggest we put all of the wallet implementations in chain-specific modules? |
Beta Was this translation helpful? Give feedback.
-
Request for change in module interfaces to adapt a new RelayMessage structure in Prachain. Prachain RelayMessage structure compares to btp/cmd/btpsimple/module/type.go Lines 3 to 43 in d73d1cf I want to replace |
Beta Was this translation helpful? Give feedback.
-
Hi team, We are implementing adapter for BMR. Our intention is to make BMR implementation more generic and easier to integrate new chains, As part of it we have broken down the chain implementation into two parts base and chain-specific modules.
kindly let us know any suggestion and improvements |
Beta Was this translation helpful? Give feedback.
-
Overview
The existing implementation of BMR is coupled with specific chain logics which need to be rewritten based on the chain's specifications. Due to this it creates an overhead for the developers to accommodate new chains and increases cost and risk factors as they need to test the complete BMR implementation.
Implementing adapters for chains realizes the goal of ICON to hyper-connect the world by enabling the community to just focus on creating and reusing chain adapters for BMR.
Existing Implementation
As per the existing implementation the code is coupled with chain specifics as in reference [chain.go#L560, chain.go#L573, chain.go#L499, chain.go#L137 etc..] which creates an overhead for implementing BMR for other chains.
Suggestion
We recommend creating an interface for the high level BMR implementation and adapters for specific chains to adapt to these implementations without affecting the core logic of BMR.
Impact on other teams
Implementing adapters can ease the development of BMR for multiple chains and provide a standard interface. As we have working groups working to create interoperability with multiple chains we need to bring in a standard where the adapters should follow certain specification, At times the team might require to create adapters with custom apis for specific chains which might not be available in go.
Beta Was this translation helpful? Give feedback.
All reactions