Skip to content

Commit

Permalink
Merge pull request #200 from spacemeshos/add-new-post-state
Browse files Browse the repository at this point in the history
Update PoST setup status response
  • Loading branch information
fasmat authored Dec 14, 2022
2 parents e085019 + 6bb7a8a commit 51db8ae
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: lint and check build
run: |
# Runs the buf linter and checks for breaking changes
make https
# make https # Temporary disable check for breaking changes (re-enable after merge)
# Attempts to build using `protoc`. Probably redundant given the next step.
make protoc
Expand Down
8 changes: 4 additions & 4 deletions release/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ go 1.19
require (
github.com/golang/protobuf v1.5.2
github.com/grpc-ecosystem/grpc-gateway/v2 v2.14.0
google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37
google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.28.1
)

require (
golang.org/x/net v0.2.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
)
16 changes: 8 additions & 8 deletions release/go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.14.0 h1:t7uX3JBHdVwAi3G7sSSdbsk8NfgA+LnUS88V/2EKaA0=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.14.0/go.mod h1:4OGVnY4qf2+gw+ssiHbW+pq4mo2yko94YxxMmXZ7jCA=
golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc=
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 h1:jCw9YRd2s40X9Vxi4zKsPRvSPlHWNqadVkpbMsCPzPQ=
google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSgaFAGyInDXeWzUhvYH57G/5GKMn70=
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
Expand Down
52 changes: 23 additions & 29 deletions release/go/spacemesh/v1/smesher_types.pb.go

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

36 changes: 18 additions & 18 deletions spacemesh/v1/smesher_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,37 +96,37 @@ message PostConfigResponse {
}

message PostSetupComputeProvider {
uint32 id = 1; // 0, 1, 2...
string model = 2; // e.g. Nvidia GTX 2700
uint32 id = 1; // 0, 1, 2...
string model = 2; // e.g. Nvidia GTX 2700
enum ComputeApiClass {
COMPUTE_API_CLASS_UNSPECIFIED = 0;
COMPUTE_API_CLASS_CPU = 1; // useful for testing on systems without a cuda or vulkan GPU
COMPUTE_API_CLASS_CPU = 1; // useful for testing on systems without a cuda or vulkan GPU
COMPUTE_API_CLASS_CUDA = 2;
COMPUTE_API_CLASS_VULKAN = 3;
}
ComputeApiClass compute_api = 3; // A provided compute api
uint64 performance = 4; // Estimated performance in hashes per second
ComputeApiClass compute_api = 3; // A provided compute api
uint64 performance = 4; // Estimated performance in hashes per second
}

// Post setup options, used to define the setup requirements.
message PostSetupOpts {
string data_dir = 1; // User provided path to create the setup data files at
uint32 num_units = 2; // Number of Post data units to generate
uint32 num_files = 3; // Number of files to equally distribute the data among
uint32 compute_provider_id = 4; // A `PostSetupComputeProvider` id
bool throttle = 5; // Throttle down setup phase computations while user is interactive on system
string data_dir = 1; // User provided path to create the setup data files at
uint32 num_units = 2; // Number of Post data units to generate
uint32 num_files = 3; // Number of files to equally distribute the data among
uint32 compute_provider_id = 4; // A `PostSetupComputeProvider` id
bool throttle = 5; // Throttle down setup phase computations while user is interactive on system
}

message PostSetupStatus {
enum State {
STATE_UNSPECIFIED = 0; // Lane's favorite impossible value
STATE_NOT_STARTED = 1; // Setup not started
STATE_IN_PROGRESS = 2; // Setup in progress
STATE_COMPLETE = 3; // Setup is complete
STATE_ERROR = 4; // Setup last session ended with an error
STATE_UNSPECIFIED = 0; // Lane's favorite impossible value
STATE_NOT_STARTED = 1; // Setup not started
STATE_IN_PROGRESS = 2; // Setup in progress
STATE_PAUSED = 3; // Setup paused
STATE_COMPLETE = 4; // Setup is complete
STATE_ERROR = 5; // Setup last session ended with an error
}
State state = 1;
uint64 num_labels_written = 2; // Number of labels (hashes) written to the data files
PostSetupOpts opts = 3; // setup options previously set by the user
string error_message = 4; // The error message, if the state is STATE_ERROR
uint64 num_labels_written = 2; // Number of labels (hashes) written to the data files
PostSetupOpts opts = 3; // setup options previously set by the user
}

0 comments on commit 51db8ae

Please sign in to comment.