Skip to content

Commit

Permalink
Arb exec impl: Fix more unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dowlandaiello committed May 1, 2024
1 parent dfd91c0 commit 093d74d
Show file tree
Hide file tree
Showing 16 changed files with 1,520 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build/gen:

.PHONY: proto
proto: build/gen $(PROTO_SOURCES)
protoc --proto_path=$(PROTO_DIR) --python_out=build/gen --mypy_out=build/gen $(PROTO_SOURCES)
protoc --proto_path=$(PROTO_DIR) --python_out=build/gen --mypy_out=build/gen --go-grpc_out=build/gen --mypy_grpc_out=build/gen $(PROTO_SOURCES)

.PHONY: test
test:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This tool requires the following to be installed:

* Python 3.11
* `protoc`
* `protoc-gen-grpc`
* `make`

## Installation
Expand Down
56 changes: 56 additions & 0 deletions proto/cosmos/base/query/v1beta1/pagination.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
syntax = "proto3";
package cosmos.base.query.v1beta1;

import "cosmos_proto/cosmos.proto";

option go_package = "github.com/cosmos/cosmos-sdk/types/query";

// PageRequest is to be embedded in gRPC request messages for efficient
// pagination. Ex:
//
// message SomeRequest {
// Foo some_parameter = 1;
// PageRequest pagination = 2;
// }
message PageRequest {
// key is a value returned in PageResponse.next_key to begin
// querying the next page most efficiently. Only one of offset or key
// should be set.
bytes key = 1;

// offset is a numeric offset that can be used when key is unavailable.
// It is less efficient than using key. Only one of offset or key should
// be set.
uint64 offset = 2;

// limit is the total number of results to be returned in the result page.
// If left empty it will default to a value to be set by each app.
uint64 limit = 3;

// count_total is set to true to indicate that the result set should include
// a count of the total number of items available for pagination in UIs.
// count_total is only respected when offset is used. It is ignored when key
// is set.
bool count_total = 4;

// reverse is set to true if results are to be returned in the descending order.
bool reverse = 5 [(cosmos_proto.field_added_in) = "cosmos-sdk 0.43"];
}

// PageResponse is to be embedded in gRPC response messages where the
// corresponding request message has used PageRequest.
//
// message SomeResponse {
// repeated Bar results = 1;
// PageResponse page = 2;
// }
message PageResponse {
// next_key is the key to be passed to PageRequest.key to
// query the next page most efficiently. It will be empty if
// there are no more results.
bytes next_key = 1;

// total is total number of results available if PageRequest.count_total
// was set, its value is undefined otherwise
uint64 total = 2;
}
30 changes: 30 additions & 0 deletions proto/cosmos/msg/v1/msg.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";

package cosmos.msg.v1;

import "google/protobuf/descriptor.proto";

// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated.
// We need this right now because gogoproto codegen needs to import the extension.
option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice";

extend google.protobuf.ServiceOptions {
// service indicates that the service is a Msg service and that requests
// must be transported via blockchain transactions rather than gRPC.
// Tooling can use this annotation to distinguish between Msg services and
// other types of services via reflection.
bool service = 11110000;
}

extend google.protobuf.MessageOptions {
// signer must be used in cosmos messages in order
// to signal to external clients which fields in a
// given cosmos message must be filled with signer
// information (address).
// The field must be the protobuf name of the message
// field extended with this MessageOption.
// The field must either be of string kind, or of message
// kind in case the signer information is contained within
// a message inside the cosmos message.
repeated string signer = 11110000;
}
93 changes: 93 additions & 0 deletions proto/cosmos/upgrade/v1beta1/upgrade.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
syntax = "proto3";
package cosmos.upgrade.v1beta1;

import "google/protobuf/any.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";

option go_package = "cosmossdk.io/x/upgrade/types";
option (gogoproto.goproto_getters_all) = false;

// Plan specifies information about a planned upgrade and when it should occur.
message Plan {
option (amino.name) = "cosmos-sdk/Plan";
option (gogoproto.equal) = true;

// Sets the name for the upgrade. This name will be used by the upgraded
// version of the software to apply any special "on-upgrade" commands during
// the first BeginBlock method after the upgrade is applied. It is also used
// to detect whether a software version can handle a given upgrade. If no
// upgrade handler with this name has been set in the software, it will be
// assumed that the software is out-of-date when the upgrade Time or Height is
// reached and the software will exit.
string name = 1;

// Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
// has been removed from the SDK.
// If this field is not empty, an error will be thrown.
google.protobuf.Timestamp time = 2
[deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// The height at which the upgrade must be performed.
int64 height = 3;

// Any application specific upgrade info to be included on-chain
// such as a git commit that validators could automatically upgrade to
string info = 4;

// Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
// moved to the IBC module in the sub module 02-client.
// If this field is not empty, an error will be thrown.
google.protobuf.Any upgraded_client_state = 5 [deprecated = true];
}

// SoftwareUpgradeProposal is a gov Content type for initiating a software
// upgrade.
// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
// proposals, see MsgSoftwareUpgrade.
message SoftwareUpgradeProposal {
option deprecated = true;
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
option (amino.name) = "cosmos-sdk/SoftwareUpgradeProposal";
option (gogoproto.equal) = true;

// title of the proposal
string title = 1;

// description of the proposal
string description = 2;

// plan of the proposal
Plan plan = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
// upgrade.
// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
// proposals, see MsgCancelUpgrade.
message CancelSoftwareUpgradeProposal {
option deprecated = true;
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
option (amino.name) = "cosmos-sdk/CancelSoftwareUpgradeProposal";
option (gogoproto.equal) = true;

// title of the proposal
string title = 1;

// description of the proposal
string description = 2;
}

// ModuleVersion specifies a module and its consensus version.
message ModuleVersion {
option (gogoproto.equal) = true;
option (cosmos_proto.message_added_in) = "cosmos-sdk 0.43";

// name of the app module
string name = 1;

// consensus version of the app module
uint64 version = 2;
}
31 changes: 31 additions & 0 deletions proto/google/api/annotations.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2015 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.api;

import "google/api/http.proto";
import "google/protobuf/descriptor.proto";

option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
option java_multiple_files = true;
option java_outer_classname = "AnnotationsProto";
option java_package = "com.google.api";
option objc_class_prefix = "GAPI";

extend google.protobuf.MethodOptions {
// See `HttpRule`.
HttpRule http = 72295728;
}
Loading

0 comments on commit 093d74d

Please sign in to comment.