Implement onboarding module for testnet validator enrollment (#3)

* Add proto files for onboarding module

* Add generated proto bindings

* Define onboarding object

* Define the participants state in keeper

* Update genesis file to initialize and export module state to/from genesis

* Add msg to onboard participant

* Register command to enroll participant

* Add functionality to decode ethereum address from signature

* Add comments for messages and fields

* Fix lint errors in proto files

* Add message validation and events in msg_server

* Reuse crypto utils from go-nitro

* Sign entire eth_payload object

* Use google API for rpc method

* Regenerate proto bindings

---------

Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
Isha Venikar
2024-07-16 09:25:39 +05:30
committed by nabarun
co-authored by prathamesh
parent 7369264f0a
commit a21e9ea387
31 changed files with 4419 additions and 181 deletions
-11
View File
@@ -1,11 +0,0 @@
package bond
import "cosmossdk.io/errors"
var (
ErrIndexTooLong = errors.Register(ModuleName, 2, "index too long")
ErrDuplicateAddress = errors.Register(ModuleName, 3, "duplicate address")
ErrInvalidBlack = errors.Register(ModuleName, 4, "black address is invalid: %s")
ErrInvalidRed = errors.Register(ModuleName, 5, "red address is invalid: %s")
ErrGameNotParseable = errors.Register(ModuleName, 6, "game cannot be parsed")
)
+1 -1
View File
@@ -3,7 +3,7 @@ package bond
// bond module event types
const (
EventTypeCreateBond = "crate_bond"
EventTypeCreateBond = "create_bond"
EventTypeRefillBond = "refill_bond"
EventTypeCancelBond = "cancel_bond"
EventTypeWithdrawBond = "withdraw_bond"
+1 -1
View File
@@ -88,7 +88,7 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo
return data.Validate()
}
// InitGenesis performs genesis initialization for the checkers module.
// InitGenesis performs genesis initialization for the bond module.
// It returns no validator updates.
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
var genesisState bond.GenesisState