Skip to content

Commit

Permalink
Bring back reserved fields as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
swift1337 committed Dec 16, 2024
1 parent c04b979 commit a6b2250
Show file tree
Hide file tree
Showing 8 changed files with 580 additions and 152 deletions.
2 changes: 2 additions & 0 deletions docs/openapi/openapi.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57603,6 +57603,8 @@ definitions:
type: string
tx_signer:
type: string
proved:
type: boolean
cryptoPubKeySet:
type: object
properties:
Expand Down
6 changes: 6 additions & 0 deletions docs/spec/crosschain/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ message MsgAddOutboundTracker {
int64 chain_id = 2;
uint64 nonce = 3;
string tx_hash = 4;
pkg.proofs.Proof proof = 5;
string block_hash = 6;
int64 tx_index = 7;
}
```

Expand All @@ -25,6 +28,9 @@ message MsgAddInboundTracker {
int64 chain_id = 2;
string tx_hash = 3;
pkg.coin.CoinType coin_type = 4;
pkg.proofs.Proof proof = 5;
string block_hash = 6;
int64 tx_index = 7;
}
```

Expand Down
8 changes: 6 additions & 2 deletions proto/zetachain/zetacore/crosschain/outbound_tracker.proto
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
syntax = "proto3";
package zetachain.zetacore.crosschain;

import "gogoproto/gogo.proto";
option go_package = "github.com/zeta-chain/node/x/crosschain/types";

message TxHash {
string tx_hash = 1;
string tx_signer = 2;

// used to be `bool proven` (for block header verification)
reserved 3;
bool proved = 3 [
deprecated = true,
(gogoproto.jsontag) = "-",
(gogoproto.moretags) = "yaml:\"-\""
];
}
message OutboundTracker {
string index = 1; // format: "chain-nonce"
Expand Down
34 changes: 30 additions & 4 deletions proto/zetachain/zetacore/crosschain/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,21 @@ message MsgAddInboundTracker {
string tx_hash = 3;
pkg.coin.CoinType coin_type = 4;

// used to be block header profs properties
reserved 5, 6, 7;
pkg.proofs.Proof proof = 5 [
deprecated = true,
(gogoproto.jsontag) = "-",
(gogoproto.moretags) = "yaml:\"-\""
];
string block_hash = 6 [
deprecated = true,
(gogoproto.jsontag) = "-",
(gogoproto.moretags) = "yaml:\"-\""
];
int64 tx_index = 7 [
deprecated = true,
(gogoproto.jsontag) = "-",
(gogoproto.moretags) = "yaml:\"-\""
];
}
message MsgAddInboundTrackerResponse {}

Expand All @@ -93,8 +106,21 @@ message MsgAddOutboundTracker {
uint64 nonce = 3;
string tx_hash = 4;

// used to be block header profs properties
reserved 5, 6, 7;
pkg.proofs.Proof proof = 5 [
deprecated = true,
(gogoproto.jsontag) = "-",
(gogoproto.moretags) = "yaml:\"-\""
];
string block_hash = 6 [
deprecated = true,
(gogoproto.jsontag) = "-",
(gogoproto.moretags) = "yaml:\"-\""
];
int64 tx_index = 7 [
deprecated = true,
(gogoproto.jsontag) = "-",
(gogoproto.moretags) = "yaml:\"-\""
];
}

message MsgAddOutboundTrackerResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export declare class TxHash extends Message<TxHash> {
*/
txSigner: string;

/**
* @generated from field: bool proved = 3 [deprecated = true];
* @deprecated
*/
proved: boolean;

constructor(data?: PartialMessage<TxHash>);

static readonly runtime: typeof proto3;
Expand Down
37 changes: 37 additions & 0 deletions typescript/zetachain/zetacore/crosschain/tx_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import type { CoinType } from "../pkg/coin/coin_pb.js";
import type { Proof } from "../pkg/proofs/proofs_pb.js";
import type { ReceiveStatus } from "../pkg/chains/chains_pb.js";
import type { CallOptions, ProtocolContractVersion, RevertOptions } from "./cross_chain_tx_pb.js";
import type { RateLimiterFlags } from "./rate_limiter_flags_pb.js";
Expand Down Expand Up @@ -135,6 +136,24 @@ export declare class MsgAddInboundTracker extends Message<MsgAddInboundTracker>
*/
coinType: CoinType;

/**
* @generated from field: zetachain.zetacore.pkg.proofs.Proof proof = 5 [deprecated = true];
* @deprecated
*/
proof?: Proof;

/**
* @generated from field: string block_hash = 6 [deprecated = true];
* @deprecated
*/
blockHash: string;

/**
* @generated from field: int64 tx_index = 7 [deprecated = true];
* @deprecated
*/
txIndex: bigint;

constructor(data?: PartialMessage<MsgAddInboundTracker>);

static readonly runtime: typeof proto3;
Expand Down Expand Up @@ -278,6 +297,24 @@ export declare class MsgAddOutboundTracker extends Message<MsgAddOutboundTracker
*/
txHash: string;

/**
* @generated from field: zetachain.zetacore.pkg.proofs.Proof proof = 5 [deprecated = true];
* @deprecated
*/
proof?: Proof;

/**
* @generated from field: string block_hash = 6 [deprecated = true];
* @deprecated
*/
blockHash: string;

/**
* @generated from field: int64 tx_index = 7 [deprecated = true];
* @deprecated
*/
txIndex: bigint;

constructor(data?: PartialMessage<MsgAddOutboundTracker>);

static readonly runtime: typeof proto3;
Expand Down
86 changes: 66 additions & 20 deletions x/crosschain/types/outbound_tracker.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a6b2250

Please sign in to comment.