diff --git a/cmd/zetacored/parse_genesis.go b/cmd/zetacored/parse_genesis.go index 89faf9bd2e..33150527e6 100644 --- a/cmd/zetacored/parse_genesis.go +++ b/cmd/zetacored/parse_genesis.go @@ -205,6 +205,8 @@ func ModifyObserverState( currentGenState := observertypes.GetGenesisStateFromAppState(cdc, appState) currentGenState.Ballots = importedObserverGenState.Ballots currentGenState.NonceToCctx = importedObserverGenState.NonceToCctx + // zero operational flags as they are network specific + currentGenState.OperationalFlags = observertypes.OperationalFlags{} currentGenStateBz, err := cdc.MarshalJSON(¤tGenState) if err != nil { diff --git a/proto/zetachain/zetacore/observer/genesis.proto b/proto/zetachain/zetacore/observer/genesis.proto index e9af1fc51a..ce034d86b0 100644 --- a/proto/zetachain/zetacore/observer/genesis.proto +++ b/proto/zetachain/zetacore/observer/genesis.proto @@ -14,6 +14,7 @@ import "zetachain/zetacore/observer/params.proto"; import "zetachain/zetacore/observer/pending_nonces.proto"; import "zetachain/zetacore/observer/tss.proto"; import "zetachain/zetacore/observer/tss_funds_migrator.proto"; +import "zetachain/zetacore/observer/operational.proto"; option go_package = "github.com/zeta-chain/node/x/observer/types"; @@ -35,4 +36,5 @@ message GenesisState { repeated PendingNonces pending_nonces = 13 [ (gogoproto.nullable) = false ]; repeated ChainNonces chain_nonces = 14 [ (gogoproto.nullable) = false ]; repeated NonceToCctx nonce_to_cctx = 15 [ (gogoproto.nullable) = false ]; + OperationalFlags operational_flags = 16 [ (gogoproto.nullable) = false ]; } diff --git a/x/observer/genesis.go b/x/observer/genesis.go index 12a92887c2..e852e407bf 100644 --- a/x/observer/genesis.go +++ b/x/observer/genesis.go @@ -130,6 +130,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) for _, elem := range genState.NonceToCctx { k.SetNonceToCctx(ctx, elem) } + k.SetOperationalFlags(ctx, genState.OperationalFlags) } // ExportGenesis returns the observer module's exported genesis. @@ -185,6 +186,8 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { os = observers } + of, _ := k.GetOperationalFlags(ctx) + return &types.GenesisState{ Ballots: k.GetAllBallots(ctx), ChainParamsList: chainParams, @@ -200,5 +203,6 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { BlameList: k.GetAllBlame(ctx), ChainNonces: k.GetAllChainNonces(ctx), NonceToCctx: k.GetAllNonceToCctx(ctx), + OperationalFlags: of, } } diff --git a/x/observer/genesis_test.go b/x/observer/genesis_test.go index 13f9a54008..f0d9609bbc 100644 --- a/x/observer/genesis_test.go +++ b/x/observer/genesis_test.go @@ -39,9 +39,10 @@ func TestGenesis(t *testing.T) { sample.ChainNonces(1), sample.ChainNonces(2), }, - PendingNonces: sample.PendingNoncesList(t, "sample", 20), - NonceToCctx: sample.NonceToCctxList(t, "sample", 20), - TssHistory: []types.TSS{sample.Tss()}, + PendingNonces: sample.PendingNoncesList(t, "sample", 20), + NonceToCctx: sample.NonceToCctxList(t, "sample", 20), + TssHistory: []types.TSS{sample.Tss()}, + OperationalFlags: sample.OperationalFlags(), } // Init and export @@ -84,6 +85,7 @@ func TestGenesis(t *testing.T) { Keygen: &types.Keygen{}, LastObserverCount: &types.LastObserverCount{}, NodeAccountList: []*types.NodeAccount{}, + OperationalFlags: types.OperationalFlags{}, } require.Equal(t, expectedGenesisState, *got) @@ -148,6 +150,7 @@ func TestGenesis(t *testing.T) { BlameList: k.GetAllBlame(ctx), ChainNonces: k.GetAllChainNonces(ctx), NonceToCctx: k.GetAllNonceToCctx(ctx), + OperationalFlags: types.OperationalFlags{}, } require.Equal(t, expectedGenesisState, *got) diff --git a/x/observer/types/genesis.pb.go b/x/observer/types/genesis.pb.go index 12d65ad082..e73bc3da52 100644 --- a/x/observer/types/genesis.pb.go +++ b/x/observer/types/genesis.pb.go @@ -40,6 +40,7 @@ type GenesisState struct { PendingNonces []PendingNonces `protobuf:"bytes,13,rep,name=pending_nonces,json=pendingNonces,proto3" json:"pending_nonces"` ChainNonces []ChainNonces `protobuf:"bytes,14,rep,name=chain_nonces,json=chainNonces,proto3" json:"chain_nonces"` NonceToCctx []NonceToCctx `protobuf:"bytes,15,rep,name=nonce_to_cctx,json=nonceToCctx,proto3" json:"nonce_to_cctx"` + OperationalFlags OperationalFlags `protobuf:"bytes,16,opt,name=operational_flags,json=operationalFlags,proto3" json:"operational_flags"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -180,6 +181,13 @@ func (m *GenesisState) GetNonceToCctx() []NonceToCctx { return nil } +func (m *GenesisState) GetOperationalFlags() OperationalFlags { + if m != nil { + return m.OperationalFlags + } + return OperationalFlags{} +} + func init() { proto.RegisterType((*GenesisState)(nil), "zetachain.zetacore.observer.GenesisState") } @@ -189,47 +197,50 @@ func init() { } var fileDescriptor_7679b0952a0823f4 = []byte{ - // 640 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcf, 0x4e, 0x13, 0x41, - 0x1c, 0x6e, 0x05, 0x41, 0xa6, 0x40, 0x61, 0xf4, 0x30, 0xc1, 0x64, 0x25, 0x18, 0x63, 0x45, 0xdd, - 0x25, 0xd5, 0x9b, 0xf1, 0x20, 0x44, 0xd0, 0x88, 0xa8, 0x5b, 0x12, 0x13, 0x0f, 0x6c, 0xa6, 0xd3, - 0x61, 0xd9, 0xb8, 0x9d, 0x69, 0x76, 0xa6, 0x06, 0x7c, 0x0a, 0x9f, 0xc4, 0xe7, 0xe0, 0xc8, 0xd1, - 0x93, 0x31, 0xf4, 0x45, 0xcc, 0xfc, 0x6b, 0xbb, 0x3d, 0x0c, 0x7b, 0x9b, 0xfc, 0xe6, 0xfb, 0xbe, - 0x7c, 0xbf, 0xbf, 0xe0, 0xc9, 0x4f, 0x2a, 0x31, 0x39, 0xc3, 0x19, 0x8b, 0xf4, 0x8b, 0x17, 0x34, - 0xe2, 0x5d, 0x41, 0x8b, 0x1f, 0xb4, 0x88, 0x52, 0xca,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xdd, 0x76, 0x8c, 0x97, 0x43, 0xa0, 0x86, 0xd6, 0xdb, 0xf1, 0xeb, 0x09, - 0xb1, 0x3f, 0x64, 0xbd, 0x8f, 0x96, 0xf4, 0x9e, 0x9d, 0x72, 0xab, 0xbf, 0x26, 0xcb, 0x5f, 0xca, - 0x2e, 0xd0, 0xa7, 0xd4, 0xd4, 0x6e, 0x59, 0xab, 0x6f, 0xf9, 0x37, 0x4b, 0xc1, 0xdd, 0x4a, 0x68, - 0xae, 0x1d, 0xdf, 0xd5, 0xf2, 0x95, 0x40, 0x2b, 0x5a, 0x6c, 0xdb, 0x3f, 0x6d, 0x86, 0x72, 0xa4, - 0x19, 0x56, 0x74, 0x65, 0x30, 0x1d, 0x84, 0x5f, 0xc0, 0xf2, 0xf4, 0x0d, 0x47, 0xab, 0x15, 0x16, - 0x4d, 0xf7, 0xb7, 0x24, 0xda, 0x20, 0x93, 0x10, 0x8c, 0xc1, 0x4a, 0xe9, 0xb0, 0xa2, 0x66, 0xa5, - 0xe5, 0x65, 0x84, 0x1e, 0xf3, 0x3d, 0x22, 0xcf, 0x9d, 0x26, 0x9b, 0x0a, 0xbd, 0xbd, 0xbc, 0x0e, - 0xea, 0x57, 0xd7, 0x41, 0xfd, 0xdf, 0x75, 0x50, 0xff, 0x35, 0x0a, 0x6a, 0x57, 0xa3, 0xa0, 0xf6, - 0x67, 0x14, 0xd4, 0xbe, 0x3d, 0x4d, 0x33, 0x79, 0x36, 0xec, 0x86, 0x84, 0xf7, 0xf5, 0x05, 0x7c, - 0x6e, 0x8e, 0xa1, 0xda, 0xff, 0xe8, 0x7c, 0xea, 0x14, 0x5e, 0x0c, 0xa8, 0xe8, 0x2e, 0xe8, 0xf3, - 0xf7, 0xe2, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xb9, 0x0b, 0x93, 0x85, 0x07, 0x00, 0x00, + // 673 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00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3e, 0x59, 0x2e, 0x71, 0x68, 0x30, 0xdf, 0x82, 0x68, 0x8d, + 0x8d, 0x43, 0x38, 0x44, 0x4b, 0x05, 0x1f, 0x26, 0xf5, 0x52, 0xc7, 0x2b, 0x18, 0x3f, 0x92, 0xbb, + 0x4c, 0x9f, 0x39, 0x4d, 0x31, 0x0e, 0xe1, 0x1f, 0x68, 0x75, 0xc2, 0xc5, 0xec, 0xfd, 0xae, 0xc0, + 0xe6, 0x6c, 0xf9, 0x8d, 0x66, 0xcc, 0x82, 0x7b, 0x75, 0xa3, 0x92, 0xd3, 0xf1, 0x77, 0x97, 0xd7, + 0x8d, 0xea, 0xd5, 0x75, 0xa3, 0xfa, 0xef, 0xba, 0x51, 0xbd, 0xb8, 0x69, 0x54, 0xae, 0x6e, 0x1a, + 0x95, 0x3f, 0x37, 0x8d, 0xca, 0xf7, 0xe7, 0x71, 0xa2, 0x4f, 0x87, 0xdd, 0x80, 0xc9, 0x3e, 0x98, + 0xeb, 0x96, 0xf1, 0xd9, 0xdc, 0x61, 0x5a, 0x67, 0x13, 0xde, 0x7c, 0x3e, 0xe0, 0xaa, 0x3b, 0x07, + 0x06, 0xfb, 0xf2, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xd7, 0x9f, 0xa0, 0x16, 0x08, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -252,6 +263,18 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.OperationalFlags.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 if len(m.NonceToCctx) > 0 { for iNdEx := len(m.NonceToCctx) - 1; iNdEx >= 0; iNdEx-- { { @@ -536,6 +559,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + l = m.OperationalFlags.Size() + n += 2 + l + sovGenesis(uint64(l)) return n } @@ -1092,6 +1117,39 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationalFlags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OperationalFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/observer/types/operational.pb.go b/x/observer/types/operational.pb.go index 22e2a25405..b7af5711cf 100644 --- a/x/observer/types/operational.pb.go +++ b/x/observer/types/operational.pb.go @@ -22,6 +22,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Flags for the top-level operation of zetaclient. type OperationalFlags struct { // Height for a coordinated zetaclient restart. // Will be ignored if missed.