From 802f9d231bf2f478164f0ed6f1cf52b80c2a11cd Mon Sep 17 00:00:00 2001 From: Sam Ricotta Date: Mon, 1 Aug 2022 12:32:02 +0200 Subject: [PATCH] Remove set option for abci --- abci/cmd/abci-cli/abci-cli.go | 9 --------- abci/tests/test_app/app.go | 7 ------- abci/tests/test_app/main.go | 1 - abci/types/types.pb.go | 7 +------ proto/tendermint/abci/types.proto | 13 ++++++------- proto/tendermint/consensus/types.proto | 2 +- proto/tendermint/types/evidence.proto | 18 +++++++++--------- proto/tendermint/types/types.proto | 8 ++++---- 8 files changed, 21 insertions(+), 44 deletions(-) diff --git a/abci/cmd/abci-cli/abci-cli.go b/abci/cmd/abci-cli/abci-cli.go index dba950916..64788f3b3 100644 --- a/abci/cmd/abci-cli/abci-cli.go +++ b/abci/cmd/abci-cli/abci-cli.go @@ -148,7 +148,6 @@ func addCommands() { RootCmd.AddCommand(consoleCmd) RootCmd.AddCommand(echoCmd) RootCmd.AddCommand(infoCmd) - RootCmd.AddCommand(setOptionCmd) RootCmd.AddCommand(deliverTxCmd) RootCmd.AddCommand(checkTxCmd) RootCmd.AddCommand(commitCmd) @@ -216,13 +215,6 @@ var infoCmd = &cobra.Command{ Args: cobra.ExactArgs(0), RunE: cmdInfo, } -var setOptionCmd = &cobra.Command{ - Use: "set_option", - Short: "set an option on the application", - Long: "set an option on the application", - Args: cobra.ExactArgs(2), - RunE: cmdSetOption, -} var deliverTxCmd = &cobra.Command{ Use: "deliver_tx", @@ -464,7 +456,6 @@ func cmdUnimplemented(cmd *cobra.Command, args []string) error { fmt.Printf("%s: %s\n", deliverTxCmd.Use, deliverTxCmd.Short) fmt.Printf("%s: %s\n", queryCmd.Use, queryCmd.Short) fmt.Printf("%s: %s\n", commitCmd.Use, commitCmd.Short) - fmt.Printf("%s: %s\n", setOptionCmd.Use, setOptionCmd.Short) fmt.Println("Use \"[command] --help\" for more information about a command.") return nil diff --git a/abci/tests/test_app/app.go b/abci/tests/test_app/app.go index 9c32fcc7d..54a4d1dbf 100644 --- a/abci/tests/test_app/app.go +++ b/abci/tests/test_app/app.go @@ -25,13 +25,6 @@ func startClient(abciType string) abcicli.Client { return client } -func setOption(client abcicli.Client, key, value string) { - _, err := client.SetOptionSync(types.RequestSetOption{Key: key, Value: value}) - if err != nil { - panicf("setting %v=%v: \nerr: %v", key, value, err) - } -} - func commit(client abcicli.Client, hashExp []byte) { res, err := client.CommitSync() if err != nil { diff --git a/abci/tests/test_app/main.go b/abci/tests/test_app/main.go index 1dcab1de1..d46ce3c93 100644 --- a/abci/tests/test_app/main.go +++ b/abci/tests/test_app/main.go @@ -79,7 +79,6 @@ func testCounter() { } }() - setOption(client, "serial", "on") commit(client, nil) deliverTx(client, []byte("abc"), code.CodeTypeBadNonce, nil) commit(client, nil) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 5da9c878f..0430528e9 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -228,9 +228,6 @@ type Request_Flush struct { type Request_Info struct { Info *RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof" json:"info,omitempty"` } -type Request_SetOption struct { - SetOption *RequestSetOption `protobuf:"bytes,4,opt,name=set_option,json=setOption,proto3,oneof" json:"set_option,omitempty"` -} type Request_InitChain struct { InitChain *RequestInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"` } @@ -1287,9 +1284,7 @@ type Response_Flush struct { type Response_Info struct { Info *ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof" json:"info,omitempty"` } -type Response_SetOption struct { - SetOption *ResponseSetOption `protobuf:"bytes,5,opt,name=set_option,json=setOption,proto3,oneof" json:"set_option,omitempty"` -} + type Response_InitChain struct { InitChain *ResponseInitChain `protobuf:"bytes,6,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"` } diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 23a6ec2e3..d5945c7c3 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -24,7 +24,6 @@ message Request { RequestEcho echo = 1; RequestFlush flush = 2; RequestInfo info = 3; - RequestSetOption set_option = 4; RequestInitChain init_chain = 5; RequestQuery query = 6; RequestBeginBlock begin_block = 7; @@ -37,6 +36,7 @@ message Request { RequestLoadSnapshotChunk load_snapshot_chunk = 14; RequestApplySnapshotChunk apply_snapshot_chunk = 15; } + Reserve = 4; } message RequestEcho { @@ -75,10 +75,10 @@ message RequestQuery { } message RequestBeginBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; + bytes hash = 1; + tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; + LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; + repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; } enum CheckTxType { @@ -234,7 +234,7 @@ message ResponseDeliverTx { } message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; + repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; ConsensusParams consensus_param_updates = 2; repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; @@ -396,7 +396,6 @@ service ABCIApplication { rpc Echo(RequestEcho) returns (ResponseEcho); rpc Flush(RequestFlush) returns (ResponseFlush); rpc Info(RequestInfo) returns (ResponseInfo); - rpc SetOption(RequestSetOption) returns (ResponseSetOption); rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); rpc Query(RequestQuery) returns (ResponseQuery); diff --git a/proto/tendermint/consensus/types.proto b/proto/tendermint/consensus/types.proto index 6e1f41371..5048f8545 100644 --- a/proto/tendermint/consensus/types.proto +++ b/proto/tendermint/consensus/types.proto @@ -18,7 +18,7 @@ message NewRoundStep { } // NewValidBlock is sent when a validator observes a valid block B in some round r, -//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. +// i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. // In case the block is also committed, then IsCommit flag is set to true. message NewValidBlock { int64 height = 1; diff --git a/proto/tendermint/types/evidence.proto b/proto/tendermint/types/evidence.proto index 3b234571b..451b8dca3 100644 --- a/proto/tendermint/types/evidence.proto +++ b/proto/tendermint/types/evidence.proto @@ -17,20 +17,20 @@ message Evidence { // DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + int64 total_voting_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } message EvidenceList { diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 7f7ea74ca..8d4f00972 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -106,10 +106,10 @@ message Vote { // Commit contains the evidence that a block was committed by a set of validators. message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; } // CommitSig is a part of the Vote included in a Commit.