diff --git a/api/opinit/ophost/v1/types.pulsar.go b/api/opinit/ophost/v1/types.pulsar.go index 0d6de0d..04b346c 100644 --- a/api/opinit/ophost/v1/types.pulsar.go +++ b/api/opinit/ophost/v1/types.pulsar.go @@ -3482,24 +3482,24 @@ type BatchInfo_ChainType int32 const ( // Unspecified chain type. - BatchInfo_CHAIN_TYPE_UNSPECIFIED BatchInfo_ChainType = 0 + BatchInfo_UNSPECIFIED BatchInfo_ChainType = 0 // The chain type of the initia chain. - BatchInfo_CHAIN_TYPE_INITIA BatchInfo_ChainType = 1 + BatchInfo_INITIA BatchInfo_ChainType = 1 // The chain type of the celestia chain. - BatchInfo_CHAIN_TYPE_CELESTIA BatchInfo_ChainType = 2 + BatchInfo_CELESTIA BatchInfo_ChainType = 2 ) // Enum value maps for BatchInfo_ChainType. var ( BatchInfo_ChainType_name = map[int32]string{ - 0: "CHAIN_TYPE_UNSPECIFIED", - 1: "CHAIN_TYPE_INITIA", - 2: "CHAIN_TYPE_CELESTIA", + 0: "UNSPECIFIED", + 1: "INITIA", + 2: "CELESTIA", } BatchInfo_ChainType_value = map[string]int32{ - "CHAIN_TYPE_UNSPECIFIED": 0, - "CHAIN_TYPE_INITIA": 1, - "CHAIN_TYPE_CELESTIA": 2, + "UNSPECIFIED": 0, + "INITIA": 1, + "CELESTIA": 2, } ) @@ -3711,7 +3711,7 @@ func (x *BatchInfo) GetChainType() BatchInfo_ChainType { if x != nil { return x.ChainType } - return BatchInfo_CHAIN_TYPE_UNSPECIFIED + return BatchInfo_UNSPECIFIED } // TokenPair defines l1 and l2 token pair @@ -3928,59 +3928,57 @@ var file_opinit_ophost_v1_types_proto_rawDesc = []byte{ 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x22, 0xc8, 0x01, 0x0a, 0x09, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, + 0x64, 0x61, 0x74, 0x61, 0x22, 0xa7, 0x01, 0x0a, 0x09, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x57, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, - 0x49, 0x54, 0x49, 0x41, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x45, 0x4c, 0x45, 0x53, 0x54, 0x49, 0x41, 0x10, 0x02, 0x22, - 0x41, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, - 0x6c, 0x31, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6c, 0x31, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x32, 0x5f, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x32, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x22, 0xc8, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, - 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0d, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, - 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, - 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x99, 0x01, - 0x0a, 0x13, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x45, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, - 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x06, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, - 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, - 0x01, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, - 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, - 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, - 0x6f, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, - 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x10, 0x01, + 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x45, 0x4c, 0x45, 0x53, 0x54, 0x49, 0x41, 0x10, 0x02, 0x22, 0x41, + 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6c, + 0x31, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, + 0x31, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x32, 0x5f, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x32, 0x44, 0x65, 0x6e, 0x6f, + 0x6d, 0x22, 0xc8, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, + 0x0f, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0d, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, + 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, + 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x99, 0x01, 0x0a, + 0x13, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x12, 0x45, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x06, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, + 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, + 0xe2, 0x1e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, 0x6f, + 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/contrib/launchtools/config.go b/contrib/launchtools/config.go index 6f412e7..2d39015 100644 --- a/contrib/launchtools/config.go +++ b/contrib/launchtools/config.go @@ -137,16 +137,16 @@ func (opBridge *OpBridge) Finalize(buf *bufio.Reader) error { opBridge.OutputSubmissionStartHeight = 1 } - if opBridge.BatchSubmissionTarget == ophosttypes.BatchInfo_CHAIN_TYPE_UNSPECIFIED { + if opBridge.BatchSubmissionTarget == ophosttypes.BatchInfo_UNSPECIFIED { useCelestia, err := input.GetConfirmation("Use Celestia as DA layer?", buf, os.Stderr) if err != nil { return err } if useCelestia { - opBridge.BatchSubmissionTarget = ophosttypes.BatchInfo_CHAIN_TYPE_CELESTIA + opBridge.BatchSubmissionTarget = ophosttypes.BatchInfo_CELESTIA } else { - opBridge.BatchSubmissionTarget = ophosttypes.BatchInfo_CHAIN_TYPE_INITIA + opBridge.BatchSubmissionTarget = ophosttypes.BatchInfo_INITIA } } diff --git a/contrib/launchtools/config_test.go b/contrib/launchtools/config_test.go index 27a8e21..6c632b7 100644 --- a/contrib/launchtools/config_test.go +++ b/contrib/launchtools/config_test.go @@ -17,7 +17,7 @@ func Test_opBridgeConfig_JSON(t *testing.T) { OutputSubmissionInterval: &submissionInterval, OutputFinalizationPeriod: &finalizationPeriod, OutputSubmissionStartHeight: 1, - BatchSubmissionTarget: ophosttypes.BatchInfo_CHAIN_TYPE_CELESTIA, + BatchSubmissionTarget: ophosttypes.BatchInfo_CELESTIA, } bz, err := json.Marshal(opBridgeConfig) diff --git a/contrib/launchtools/utils/address.go b/contrib/launchtools/utils/address.go index b4b5629..c0c152b 100644 --- a/contrib/launchtools/utils/address.go +++ b/contrib/launchtools/utils/address.go @@ -47,9 +47,9 @@ func DeriveL2Address(mnemonic string) (string, error) { func DeriveDAAddress(mnemonic string, chainType ophosttypes.BatchInfo_ChainType) (string, error) { var codec address.Codec switch chainType { - case ophosttypes.BatchInfo_CHAIN_TYPE_INITIA: + case ophosttypes.BatchInfo_INITIA: codec = L1AddressCodec() - case ophosttypes.BatchInfo_CHAIN_TYPE_CELESTIA: + case ophosttypes.BatchInfo_CELESTIA: codec = CelestiaAddressCodec() default: return "", errors.New("unsupported chain type") diff --git a/proto/opinit/ophost/v1/types.proto b/proto/opinit/ophost/v1/types.proto index 08a462d..937b88f 100644 --- a/proto/opinit/ophost/v1/types.proto +++ b/proto/opinit/ophost/v1/types.proto @@ -67,11 +67,11 @@ message BatchInfo { // ChainType defines the type of chain. enum ChainType { // Unspecified chain type. - CHAIN_TYPE_UNSPECIFIED = 0; + UNSPECIFIED = 0; // The chain type of the initia chain. - CHAIN_TYPE_INITIA = 1; + INITIA = 1; // The chain type of the celestia chain. - CHAIN_TYPE_CELESTIA = 2; + CELESTIA = 2; } // The address of the batch submitter. diff --git a/x/opchild/keeper/genesis_test.go b/x/opchild/keeper/genesis_test.go index bdf6ec4..f16a5c9 100644 --- a/x/opchild/keeper/genesis_test.go +++ b/x/opchild/keeper/genesis_test.go @@ -41,7 +41,7 @@ func Test_GenesisImportExport(t *testing.T) { Proposer: addrsStr[3], BatchInfo: ophosttypes.BatchInfo{ Submitter: addrsStr[4], - ChainType: ophosttypes.BatchInfo_CHAIN_TYPE_INITIA, + ChainType: ophosttypes.BatchInfo_INITIA, }, SubmissionInterval: time.Minute, FinalizationPeriod: time.Hour, diff --git a/x/opchild/keeper/msg_server_test.go b/x/opchild/keeper/msg_server_test.go index 8137676..3c11172 100644 --- a/x/opchild/keeper/msg_server_test.go +++ b/x/opchild/keeper/msg_server_test.go @@ -292,7 +292,7 @@ func Test_MsgServer_Withdraw(t *testing.T) { Proposer: addrsStr[3], BatchInfo: ophosttypes.BatchInfo{ Submitter: addrsStr[4], - ChainType: ophosttypes.BatchInfo_CHAIN_TYPE_INITIA, + ChainType: ophosttypes.BatchInfo_INITIA, }, SubmissionInterval: time.Minute, FinalizationPeriod: time.Hour, @@ -344,7 +344,7 @@ func Test_MsgServer_SetBridgeInfo(t *testing.T) { Proposer: addrsStr[3], BatchInfo: ophosttypes.BatchInfo{ Submitter: addrsStr[4], - ChainType: ophosttypes.BatchInfo_CHAIN_TYPE_INITIA, + ChainType: ophosttypes.BatchInfo_INITIA, }, SubmissionInterval: time.Minute, FinalizationPeriod: time.Hour, diff --git a/x/opchild/keeper/querier_test.go b/x/opchild/keeper/querier_test.go index 5ddebe7..8a113ea 100644 --- a/x/opchild/keeper/querier_test.go +++ b/x/opchild/keeper/querier_test.go @@ -60,7 +60,7 @@ func Test_QuerySetBridgeInfo(t *testing.T) { Proposer: addrsStr[3], BatchInfo: ophosttypes.BatchInfo{ Submitter: addrsStr[4], - ChainType: ophosttypes.BatchInfo_CHAIN_TYPE_INITIA, + ChainType: ophosttypes.BatchInfo_INITIA, }, SubmissionInterval: time.Minute, FinalizationPeriod: time.Hour, diff --git a/x/ophost/keeper/batch_info_test.go b/x/ophost/keeper/batch_info_test.go index a3de92d..94c76ec 100644 --- a/x/ophost/keeper/batch_info_test.go +++ b/x/ophost/keeper/batch_info_test.go @@ -12,7 +12,7 @@ func Test_SetGetBatchInfo(t *testing.T) { ctx, input := createDefaultTestInput(t) batchInfo1 := types.BatchInfo{ Submitter: addrsStr[0], - ChainType: types.BatchInfo_CHAIN_TYPE_INITIA, + ChainType: types.BatchInfo_INITIA, } output1 := types.Output{ OutputRoot: []byte{1, 2, 3}, @@ -25,7 +25,7 @@ func Test_SetGetBatchInfo(t *testing.T) { batchInfo2 := types.BatchInfo{ Submitter: addrsStr[1], - ChainType: types.BatchInfo_CHAIN_TYPE_INITIA, + ChainType: types.BatchInfo_INITIA, } output2 := types.Output{ OutputRoot: []byte{4, 5, 6}, @@ -38,7 +38,7 @@ func Test_SetGetBatchInfo(t *testing.T) { batchInfo3 := types.BatchInfo{ Submitter: addrsStr[0], - ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA, + ChainType: types.BatchInfo_CELESTIA, } output3 := types.Output{ OutputRoot: []byte{1, 2, 3}, @@ -51,7 +51,7 @@ func Test_SetGetBatchInfo(t *testing.T) { batchInfo4 := types.BatchInfo{ Submitter: addrsStr[1], - ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA, + ChainType: types.BatchInfo_CELESTIA, } output4 := types.Output{ OutputRoot: []byte{4, 5, 6}, @@ -64,7 +64,7 @@ func Test_SetGetBatchInfo(t *testing.T) { batchInfo5 := types.BatchInfo{ Submitter: addrsStr[1], - ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA, + ChainType: types.BatchInfo_CELESTIA, } output5 := types.Output{ OutputRoot: []byte{4, 5, 6}, diff --git a/x/ophost/keeper/bridge_test.go b/x/ophost/keeper/bridge_test.go index 52b8075..7748386 100644 --- a/x/ophost/keeper/bridge_test.go +++ b/x/ophost/keeper/bridge_test.go @@ -17,7 +17,7 @@ func Test_BridgeConfig(t *testing.T) { FinalizationPeriod: time.Second * 10, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } require.NoError(t, input.OPHostKeeper.SetBridgeConfig(ctx, 1, config)) _config, err := input.OPHostKeeper.GetBridgeConfig(ctx, 1) @@ -34,7 +34,7 @@ func Test_IterateBridgeConfig(t *testing.T) { FinalizationPeriod: time.Second * 10, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } config2 := types.BridgeConfig{ Challenger: addrs[2].String(), @@ -43,7 +43,7 @@ func Test_IterateBridgeConfig(t *testing.T) { FinalizationPeriod: time.Second * 10, SubmissionStartHeight: 1, Metadata: []byte{3, 4, 5}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } require.NoError(t, input.OPHostKeeper.SetBridgeConfig(ctx, 1, config1)) require.NoError(t, input.OPHostKeeper.SetBridgeConfig(ctx, 2, config2)) diff --git a/x/ophost/keeper/genesis_test.go b/x/ophost/keeper/genesis_test.go index 4e7360c..61b88f5 100644 --- a/x/ophost/keeper/genesis_test.go +++ b/x/ophost/keeper/genesis_test.go @@ -19,7 +19,7 @@ func Test_GenesisExport(t *testing.T) { FinalizationPeriod: 100, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } config2 := types.BridgeConfig{ Challenger: addrsStr[2], @@ -28,7 +28,7 @@ func Test_GenesisExport(t *testing.T) { FinalizationPeriod: 200, SubmissionStartHeight: 1, Metadata: []byte{3, 4, 5}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } require.NoError(t, input.OPHostKeeper.SetBridgeConfig(ctx, 1, config1)) require.NoError(t, input.OPHostKeeper.SetBridgeConfig(ctx, 2, config2)) @@ -67,9 +67,9 @@ func Test_GenesisExport(t *testing.T) { require.NoError(t, input.OPHostKeeper.RecordProvenWithdrawal(ctx, 1, [32]byte{1, 2, 3})) require.NoError(t, input.OPHostKeeper.RecordProvenWithdrawal(ctx, 1, [32]byte{3, 4, 5})) - require.NoError(t, input.OPHostKeeper.SetBatchInfo(ctx, 1, types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, types.Output{})) - require.NoError(t, input.OPHostKeeper.SetBatchInfo(ctx, 1, types.BatchInfo{Submitter: addrsStr[1], ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA}, output1)) - require.NoError(t, input.OPHostKeeper.SetBatchInfo(ctx, 1, types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, output3)) + require.NoError(t, input.OPHostKeeper.SetBatchInfo(ctx, 1, types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, types.Output{})) + require.NoError(t, input.OPHostKeeper.SetBatchInfo(ctx, 1, types.BatchInfo{Submitter: addrsStr[1], ChainType: types.BatchInfo_CELESTIA}, output1)) + require.NoError(t, input.OPHostKeeper.SetBatchInfo(ctx, 1, types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, output3)) genState := input.OPHostKeeper.ExportGenesis(ctx) require.Equal(t, uint64(3), genState.NextBridgeId) @@ -100,9 +100,9 @@ func Test_GenesisExport(t *testing.T) { {3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, BatchInfos: []types.BatchInfoWithOutput{ - {BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, Output: types.Output{}}, - {BatchInfo: types.BatchInfo{Submitter: addrsStr[1], ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA}, Output: output1}, - {BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, Output: output3}, + {BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, Output: types.Output{}}, + {BatchInfo: types.BatchInfo{Submitter: addrsStr[1], ChainType: types.BatchInfo_CELESTIA}, Output: output1}, + {BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, Output: output3}, }, }, genState.Bridges[0]) } @@ -117,7 +117,7 @@ func Test_GenesisImportExport(t *testing.T) { FinalizationPeriod: 100, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } output1 := types.Output{ OutputRoot: []byte{1, 2, 3}, @@ -167,9 +167,9 @@ func Test_GenesisImportExport(t *testing.T) { {3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, BatchInfos: []types.BatchInfoWithOutput{ - {BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, Output: types.Output{}}, - {BatchInfo: types.BatchInfo{Submitter: addrsStr[1], ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA}, Output: output1}, - {BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, Output: output3}, + {BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, Output: types.Output{}}, + {BatchInfo: types.BatchInfo{Submitter: addrsStr[1], ChainType: types.BatchInfo_CELESTIA}, Output: output1}, + {BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, Output: output3}, }, }}, NextBridgeId: 2, diff --git a/x/ophost/keeper/msg_server.go b/x/ophost/keeper/msg_server.go index ef3ec42..1afd6fe 100644 --- a/x/ophost/keeper/msg_server.go +++ b/x/ophost/keeper/msg_server.go @@ -90,7 +90,7 @@ func (ms MsgServer) CreateBridge(ctx context.Context, req *types.MsgCreateBridge sdk.NewAttribute(types.AttributeKeyCreator, req.Creator), sdk.NewAttribute(types.AttributeKeyProposer, req.Config.Proposer), sdk.NewAttribute(types.AttributeKeyChallenger, req.Config.Challenger), - sdk.NewAttribute(types.AttributeKeyBatchChainType, req.Config.BatchInfo.ChainType.StringWithoutPrefix()), + sdk.NewAttribute(types.AttributeKeyBatchChainType, req.Config.BatchInfo.ChainType.String()), sdk.NewAttribute(types.AttributeKeyBatchSubmitter, req.Config.BatchInfo.Submitter), sdk.NewAttribute(types.AttributeKeyBridgeId, strconv.FormatUint(bridgeId, 10)), sdk.NewAttribute(types.AttributeKeyOracleEnabled, strconv.FormatBool(req.Config.OracleEnabled)), @@ -475,7 +475,7 @@ func (ms MsgServer) UpdateBatchInfo(ctx context.Context, req *types.MsgUpdateBat sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent(sdk.NewEvent( types.EventTypeUpdateBatchInfo, sdk.NewAttribute(types.AttributeKeyBridgeId, strconv.FormatUint(bridgeId, 10)), - sdk.NewAttribute(types.AttributeKeyBatchChainType, req.NewBatchInfo.ChainType.StringWithoutPrefix()), + sdk.NewAttribute(types.AttributeKeyBatchChainType, req.NewBatchInfo.ChainType.String()), sdk.NewAttribute(types.AttributeKeyBatchSubmitter, req.NewBatchInfo.Submitter), sdk.NewAttribute(types.AttributeKeyFinalizedOutputIndex, strconv.FormatUint(finalizedOutputIndex, 10)), sdk.NewAttribute(types.AttributeKeyFinalizedL2BlockNumber, strconv.FormatUint(finalizedOutput.L2BlockNumber, 10)), diff --git a/x/ophost/keeper/msg_server_test.go b/x/ophost/keeper/msg_server_test.go index 3b2a812..a4115a0 100644 --- a/x/ophost/keeper/msg_server_test.go +++ b/x/ophost/keeper/msg_server_test.go @@ -39,7 +39,7 @@ func Test_CreateBridge(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } res, err := ms.CreateBridge(ctx, types.NewMsgCreateBridge(addrsStr[0], config)) require.NoError(t, err) @@ -64,7 +64,7 @@ func Test_ProposeOutput(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } createRes, err := ms.CreateBridge(ctx, types.NewMsgCreateBridge(addrsStr[0], config)) require.NoError(t, err) @@ -102,7 +102,7 @@ func Test_DeleteOutput(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } createReq := types.NewMsgCreateBridge(addrsStr[0], config) createRes, err := ms.CreateBridge(ctx, createReq) @@ -165,7 +165,7 @@ func Test_InitiateTokenDeposit(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } createRes, err := ms.CreateBridge(ctx, types.NewMsgCreateBridge(addrsStr[0], config)) require.NoError(t, err) @@ -193,7 +193,7 @@ func Test_FinalizeTokenWithdrawal(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } _, err := ms.CreateBridge(ctx, types.NewMsgCreateBridge(addrsStr[0], config)) require.NoError(t, err) @@ -265,7 +265,7 @@ func Test_UpdateProposal(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } _, err := ms.CreateBridge(ctx, types.NewMsgCreateBridge(addrsStr[0], config)) @@ -315,7 +315,7 @@ func Test_UpdateChallenger(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } _, err := ms.CreateBridge(ctx, types.NewMsgCreateBridge(addrsStr[0], config)) @@ -365,7 +365,7 @@ func Test_UpdateBatchInfo(t *testing.T) { Metadata: []byte{1, 2, 3}, BatchInfo: types.BatchInfo{ Submitter: addrsStr[1], - ChainType: types.BatchInfo_CHAIN_TYPE_INITIA, + ChainType: types.BatchInfo_INITIA, }, } @@ -377,27 +377,27 @@ func Test_UpdateBatchInfo(t *testing.T) { require.NoError(t, err) msg := types.NewMsgUpdateBatchInfo(govAddr, 1, types.BatchInfo{ Submitter: addrsStr[2], - ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA, + ChainType: types.BatchInfo_CELESTIA, }) _, err = ms.UpdateBatchInfo(ctx, msg) require.NoError(t, err) _config, err := ms.GetBridgeConfig(ctx, 1) require.NoError(t, err) require.Equal(t, _config.BatchInfo.Submitter, addrsStr[2]) - require.Equal(t, types.BatchInfo_CHAIN_TYPE_CELESTIA, _config.BatchInfo.ChainType) + require.Equal(t, types.BatchInfo_CELESTIA, _config.BatchInfo.ChainType) require.Equal(t, input.BridgeHook.batchInfo, _config.BatchInfo) // current proposer signer msg = types.NewMsgUpdateBatchInfo(addrsStr[0], 1, types.BatchInfo{ Submitter: addrsStr[3], - ChainType: types.BatchInfo_CHAIN_TYPE_INITIA, + ChainType: types.BatchInfo_INITIA, }) _, err = ms.UpdateBatchInfo(ctx, msg) require.NoError(t, err) _config, err = ms.GetBridgeConfig(ctx, 1) require.NoError(t, err) require.Equal(t, _config.BatchInfo.Submitter, addrsStr[3]) - require.Equal(t, types.BatchInfo_CHAIN_TYPE_INITIA, _config.BatchInfo.ChainType) + require.Equal(t, types.BatchInfo_INITIA, _config.BatchInfo.ChainType) require.Equal(t, input.BridgeHook.batchInfo, _config.BatchInfo) // invalid signer @@ -405,7 +405,7 @@ func Test_UpdateBatchInfo(t *testing.T) { require.NoError(t, err) msg = types.NewMsgUpdateBatchInfo(invalidAddr, 1, types.BatchInfo{ Submitter: addrsStr[2], - ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA, + ChainType: types.BatchInfo_CELESTIA, }) require.NoError(t, err) @@ -427,7 +427,7 @@ func Test_UpdateOracleConfig(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, OracleEnabled: true, } @@ -472,7 +472,7 @@ func Test_UpdateMetadata(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } _, err := ms.CreateBridge(ctx, types.NewMsgCreateBridge(addrsStr[0], config)) diff --git a/x/ophost/keeper/output_test.go b/x/ophost/keeper/output_test.go index da5b507..39e236d 100644 --- a/x/ophost/keeper/output_test.go +++ b/x/ophost/keeper/output_test.go @@ -90,7 +90,7 @@ func Test_IsFinalized(t *testing.T) { SubmissionInterval: 100, FinalizationPeriod: time.Second * 10, SubmissionStartHeight: 1, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, }) require.NoError(t, err) @@ -149,7 +149,7 @@ func Test_GetLastFinalizedOutput(t *testing.T) { SubmissionInterval: 100, FinalizationPeriod: time.Second * 10, SubmissionStartHeight: 1, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, }) require.NoError(t, err) @@ -196,7 +196,7 @@ func Test_DeleteOutputProposal(t *testing.T) { SubmissionInterval: 100, FinalizationPeriod: time.Second * 10, SubmissionStartHeight: 1, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, }) require.NoError(t, err) diff --git a/x/ophost/keeper/querier_test.go b/x/ophost/keeper/querier_test.go index a4de7da..e32e897 100644 --- a/x/ophost/keeper/querier_test.go +++ b/x/ophost/keeper/querier_test.go @@ -19,7 +19,7 @@ func Test_QueryBridge(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } err := input.OPHostKeeper.SetBridgeConfig(ctx, 1, config) require.NoError(t, err) @@ -46,7 +46,7 @@ func Test_QueryBridges(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } config2 := types.BridgeConfig{ Challenger: addrs[1].String(), @@ -55,7 +55,7 @@ func Test_QueryBridges(t *testing.T) { FinalizationPeriod: time.Second * 60, SubmissionStartHeight: 1, Metadata: []byte{3, 4, 5}, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, } require.NoError(t, input.OPHostKeeper.SetBridgeConfig(ctx, 1, config1)) require.NoError(t, input.OPHostKeeper.SetBridgeConfig(ctx, 2, config2)) @@ -189,7 +189,7 @@ func Test_QueryLastFinalizedOutput(t *testing.T) { SubmissionInterval: 100, FinalizationPeriod: time.Second * 10, SubmissionStartHeight: 1, - BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA}, }) require.NoError(t, err) @@ -265,13 +265,13 @@ func Test_QueryNextL1Sequence(t *testing.T) { func Test_QueryBatchInfos(t *testing.T) { ctx, input := createDefaultTestInput(t) - batchInfo := types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_CHAIN_TYPE_INITIA} + batchInfo := types.BatchInfo{Submitter: addrsStr[0], ChainType: types.BatchInfo_INITIA} require.NoError(t, input.OPHostKeeper.SetBatchInfo(ctx, 1, batchInfo, types.Output{})) newBatchInfo := types.BatchInfoWithOutput{ BatchInfo: types.BatchInfo{ Submitter: addrsStr[0], - ChainType: types.BatchInfo_CHAIN_TYPE_CELESTIA, + ChainType: types.BatchInfo_CELESTIA, }, Output: types.Output{ OutputRoot: []byte{1, 2, 3}, diff --git a/x/ophost/types/bridge_config.go b/x/ophost/types/bridge_config.go index d8e3726..a45c5a5 100644 --- a/x/ophost/types/bridge_config.go +++ b/x/ophost/types/bridge_config.go @@ -8,12 +8,8 @@ import ( "cosmossdk.io/core/address" "cosmossdk.io/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/jsonpb" ) -var _ jsonpb.JSONPBMarshaler = (*BatchInfo_ChainType)(nil) -var _ jsonpb.JSONPBUnmarshaler = (*BatchInfo_ChainType)(nil) - func (config BridgeConfig) Validate(ac address.Codec) error { if _, err := ac.StringToBytes(config.Challenger); err != nil { return err @@ -23,7 +19,7 @@ func (config BridgeConfig) Validate(ac address.Codec) error { return err } - if config.BatchInfo.ChainType == BatchInfo_CHAIN_TYPE_UNSPECIFIED { + if config.BatchInfo.ChainType == BatchInfo_UNSPECIFIED { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "batch chain type must be set") } @@ -55,7 +51,7 @@ func (config BridgeConfig) ValidateWithNoAddrValidation() error { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "challenger must be set") } - if config.BatchInfo.ChainType == BatchInfo_CHAIN_TYPE_UNSPECIFIED { + if config.BatchInfo.ChainType == BatchInfo_UNSPECIFIED { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "batch chain type must be set") } else if _, ok := BatchInfo_ChainType_name[int32(config.BatchInfo.ChainType)]; !ok { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid chain type") @@ -80,12 +76,9 @@ func (config BridgeConfig) ValidateWithNoAddrValidation() error { return nil } -// prefix for chain type enum -const chainTypePrefix = "CHAIN_TYPE_" - // MarshalJSON marshals the BatchInfo_ChainType to JSON func (cy BatchInfo_ChainType) MarshalJSON() ([]byte, error) { - return json.Marshal(cy.StringWithoutPrefix()) + return json.Marshal(cy.String()) } // UnmarshalJSON unmarshals the BatchInfo_ChainType from JSON @@ -96,7 +89,7 @@ func (cy *BatchInfo_ChainType) UnmarshalJSON(b []byte) error { return err } - chainType, ok := BatchInfo_ChainType_value[chainTypePrefix+strings.ToUpper(str)] + chainType, ok := BatchInfo_ChainType_value[strings.ToUpper(str)] if !ok { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid chain type") } @@ -104,18 +97,3 @@ func (cy *BatchInfo_ChainType) UnmarshalJSON(b []byte) error { *cy = BatchInfo_ChainType(chainType) return nil } - -// MarshalJSONPB marshals the BatchInfo_ChainType to JSON -func (cy BatchInfo_ChainType) MarshalJSONPB(_ *jsonpb.Marshaler) ([]byte, error) { - return cy.MarshalJSON() -} - -// UnmarshalJSONPB unmarshals the BatchInfo_ChainType from JSON -func (cy *BatchInfo_ChainType) UnmarshalJSONPB(_ *jsonpb.Unmarshaler, inputBz []byte) error { - return cy.UnmarshalJSON(inputBz) -} - -// StringWithoutPrefix returns the string representation of a BatchInfo_ChainType without the prefix -func (cy BatchInfo_ChainType) StringWithoutPrefix() string { - return cy.String()[len(chainTypePrefix):] -} diff --git a/x/ophost/types/bridge_config_test.go b/x/ophost/types/bridge_config_test.go index 16274ea..eeaf4b2 100644 --- a/x/ophost/types/bridge_config_test.go +++ b/x/ophost/types/bridge_config_test.go @@ -20,7 +20,7 @@ import ( func Test_JSONMarshalUnmarshal(t *testing.T) { batchInfo := BatchInfo{ Submitter: "submitter", - ChainType: BatchInfo_CHAIN_TYPE_INITIA, + ChainType: BatchInfo_INITIA, } bz, err := json.Marshal(batchInfo) @@ -41,14 +41,14 @@ func Test_ValidateBridgeConfig(t *testing.T) { FinalizationPeriod: 100, SubmissionStartHeight: 1, Metadata: []byte{1, 2, 3}, - BatchInfo: BatchInfo{Submitter: "submitter", ChainType: BatchInfo_CHAIN_TYPE_INITIA}, + BatchInfo: BatchInfo{Submitter: "submitter", ChainType: BatchInfo_INITIA}, } require.NoError(t, config.ValidateWithNoAddrValidation()) // 1. wrong batch info chain type // 1.1 unspecified - config.BatchInfo.ChainType = BatchInfo_CHAIN_TYPE_UNSPECIFIED + config.BatchInfo.ChainType = BatchInfo_UNSPECIFIED require.Error(t, config.ValidateWithNoAddrValidation()) // 1.2 unknown chain type @@ -81,5 +81,5 @@ func TestGoGoProtoJsonPB(t *testing.T) { var msg sdk.Msg err = appCodec.UnpackAny(tx.Body.Messages[0], &msg) require.NoError(t, err) - require.Equal(t, BatchInfo_CHAIN_TYPE_CELESTIA, msg.(*MsgCreateBridge).Config.BatchInfo.ChainType) + require.Equal(t, BatchInfo_CELESTIA, msg.(*MsgCreateBridge).Config.BatchInfo.ChainType) } diff --git a/x/ophost/types/tx.go b/x/ophost/types/tx.go index 7a4536a..92d0006 100644 --- a/x/ophost/types/tx.go +++ b/x/ophost/types/tx.go @@ -371,7 +371,7 @@ func (msg MsgUpdateBatchInfo) Validate(ac address.Codec) error { return ErrInvalidBridgeId } - if msg.NewBatchInfo.ChainType == BatchInfo_CHAIN_TYPE_UNSPECIFIED || msg.NewBatchInfo.Submitter == "" { + if msg.NewBatchInfo.ChainType == BatchInfo_UNSPECIFIED || msg.NewBatchInfo.Submitter == "" { return ErrEmptyBatchInfo } diff --git a/x/ophost/types/types.pb.go b/x/ophost/types/types.pb.go index 62bfb01..882851b 100644 --- a/x/ophost/types/types.pb.go +++ b/x/ophost/types/types.pb.go @@ -38,23 +38,23 @@ type BatchInfo_ChainType int32 const ( // Unspecified chain type. - BatchInfo_CHAIN_TYPE_UNSPECIFIED BatchInfo_ChainType = 0 + BatchInfo_UNSPECIFIED BatchInfo_ChainType = 0 // The chain type of the initia chain. - BatchInfo_CHAIN_TYPE_INITIA BatchInfo_ChainType = 1 + BatchInfo_INITIA BatchInfo_ChainType = 1 // The chain type of the celestia chain. - BatchInfo_CHAIN_TYPE_CELESTIA BatchInfo_ChainType = 2 + BatchInfo_CELESTIA BatchInfo_ChainType = 2 ) var BatchInfo_ChainType_name = map[int32]string{ - 0: "CHAIN_TYPE_UNSPECIFIED", - 1: "CHAIN_TYPE_INITIA", - 2: "CHAIN_TYPE_CELESTIA", + 0: "UNSPECIFIED", + 1: "INITIA", + 2: "CELESTIA", } var BatchInfo_ChainType_value = map[string]int32{ - "CHAIN_TYPE_UNSPECIFIED": 0, - "CHAIN_TYPE_INITIA": 1, - "CHAIN_TYPE_CELESTIA": 2, + "UNSPECIFIED": 0, + "INITIA": 1, + "CELESTIA": 2, } func (x BatchInfo_ChainType) String() string { @@ -334,63 +334,62 @@ func init() { func init() { proto.RegisterFile("opinit/ophost/v1/types.proto", fileDescriptor_29cadbd84ee898dd) } var fileDescriptor_29cadbd84ee898dd = []byte{ - // 889 bytes of a gzipped FileDescriptorProto + // 875 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xb4, 0xc6, 0xb5, 0xc7, 0x71, 0x9b, 0x4e, 0x5a, 0xba, 0x31, 0xc5, 0xb6, 0x2c, 0x15, - 0x59, 0x55, 0xb3, 0x2b, 0x9b, 0x3f, 0x42, 0x70, 0x8a, 0x1d, 0x57, 0xb5, 0x04, 0xae, 0xb5, 0x31, - 0xaa, 0xe0, 0xb2, 0x9a, 0xf5, 0x8e, 0xd7, 0xa3, 0xec, 0xee, 0xac, 0x76, 0xc6, 0x11, 0x29, 0xdf, - 0x80, 0x53, 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5, 0xdf, 0xcf, 0xec, + 0xd2, 0x37, 0x77, 0x56, 0x2e, 0x43, 0x99, 0x96, 0xe2, 0xed, 0x04, 0x87, 0xdc, 0xbd, 0x3f, 0x56, + 0x1f, 0x90, 0x6f, 0x17, 0x9f, 0x10, 0x75, 0x2d, 0x86, 0x15, 0xd5, 0xc3, 0x0f, 0xff, 0x09, 0x00, + 0x00, 0xff, 0xff, 0xe3, 0xae, 0x11, 0x04, 0x60, 0x06, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool {