Some checks failed
Build SimApp / build (amd64) (push) Waiting to run
Build SimApp / build (arm64) (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Build & Push / build (push) Waiting to run
Run Gosec / Gosec (push) Waiting to run
Lint / golangci-lint (push) Waiting to run
Checks dependencies and mocks generation / Check go mod tidy (push) Waiting to run
Checks dependencies and mocks generation / Check up to date mocks (push) Waiting to run
System Tests / setup (push) Waiting to run
System Tests / test-system (push) Blocked by required conditions
System Tests / test-system-legacy (push) Blocked by required conditions
Tests / Code Coverage / split-test-files (push) Waiting to run
Tests / Code Coverage / tests (00) (push) Blocked by required conditions
Tests / Code Coverage / tests (01) (push) Blocked by required conditions
Tests / Code Coverage / tests (02) (push) Blocked by required conditions
Tests / Code Coverage / tests (03) (push) Blocked by required conditions
Tests / Code Coverage / test-integration (push) Waiting to run
Tests / Code Coverage / test-e2e (push) Waiting to run
Tests / Code Coverage / repo-analysis (push) Blocked by required conditions
Tests / Code Coverage / test-sim-nondeterminism (push) Waiting to run
Tests / Code Coverage / test-clientv2 (push) Waiting to run
Tests / Code Coverage / test-core (push) Waiting to run
Tests / Code Coverage / test-depinject (push) Waiting to run
Tests / Code Coverage / test-errors (push) Waiting to run
Tests / Code Coverage / test-math (push) Waiting to run
Tests / Code Coverage / test-schema (push) Waiting to run
Tests / Code Coverage / test-collections (push) Waiting to run
Tests / Code Coverage / test-cosmovisor (push) Waiting to run
Tests / Code Coverage / test-confix (push) Waiting to run
Tests / Code Coverage / test-store (push) Waiting to run
Tests / Code Coverage / test-log (push) Waiting to run
Tests / Code Coverage / test-x-tx (push) Waiting to run
Tests / Code Coverage / test-x-nft (push) Waiting to run
Tests / Code Coverage / test-x-circuit (push) Waiting to run
Tests / Code Coverage / test-x-feegrant (push) Waiting to run
Tests / Code Coverage / test-x-evidence (push) Waiting to run
Tests / Code Coverage / test-x-upgrade (push) Waiting to run
Tests / Code Coverage / test-tools-benchmark (push) Waiting to run
Build & Push SDK Proto Builder / build (push) Has been cancelled
60 lines
2.9 KiB
Protocol Buffer
60 lines
2.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
package cosmos.epochs.v1beta1;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/protobuf/duration.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/epochs/types";
|
|
|
|
// EpochInfo is a struct that describes the data going into
|
|
// a timer defined by the x/epochs module.
|
|
message EpochInfo {
|
|
// identifier is a unique reference to this particular timer.
|
|
string identifier = 1;
|
|
// start_time is the time at which the timer first ever ticks.
|
|
// If start_time is in the future, the epoch will not begin until the start
|
|
// time.
|
|
google.protobuf.Timestamp start_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
// duration is the time in between epoch ticks.
|
|
// In order for intended behavior to be met, duration should
|
|
// be greater than the chains expected block time.
|
|
// Duration must be non-zero.
|
|
google.protobuf.Duration duration = 3
|
|
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.jsontag) = "duration,omitempty"];
|
|
// current_epoch is the current epoch number, or in other words,
|
|
// how many times has the timer 'ticked'.
|
|
// The first tick (current_epoch=1) is defined as
|
|
// the first block whose blocktime is greater than the EpochInfo start_time.
|
|
int64 current_epoch = 4;
|
|
// current_epoch_start_time describes the start time of the current timer
|
|
// interval. The interval is (current_epoch_start_time,
|
|
// current_epoch_start_time + duration] When the timer ticks, this is set to
|
|
// current_epoch_start_time = last_epoch_start_time + duration only one timer
|
|
// tick for a given identifier can occur per block.
|
|
//
|
|
// NOTE! The current_epoch_start_time may diverge significantly from the
|
|
// wall-clock time the epoch began at. Wall-clock time of epoch start may be
|
|
// >> current_epoch_start_time. Suppose current_epoch_start_time = 10,
|
|
// duration = 5. Suppose the chain goes offline at t=14, and comes back online
|
|
// at t=30, and produces blocks at every successive time. (t=31, 32, etc.)
|
|
// * The t=30 block will start the epoch for (10, 15]
|
|
// * The t=31 block will start the epoch for (15, 20]
|
|
// * The t=32 block will start the epoch for (20, 25]
|
|
// * The t=33 block will start the epoch for (25, 30]
|
|
// * The t=34 block will start the epoch for (30, 35]
|
|
// * The **t=36** block will start the epoch for (35, 40]
|
|
google.protobuf.Timestamp current_epoch_start_time = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
// epoch_counting_started is a boolean, that indicates whether this
|
|
// epoch timer has began yet.
|
|
bool epoch_counting_started = 6;
|
|
reserved 7;
|
|
// current_epoch_start_height is the block height at which the current epoch
|
|
// started. (The block height at which the timer last ticked)
|
|
int64 current_epoch_start_height = 8;
|
|
}
|
|
|
|
// GenesisState defines the epochs module's genesis state.
|
|
message GenesisState {
|
|
repeated EpochInfo epochs = 1 [(gogoproto.nullable) = false];
|
|
}
|