-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: CNS 930: new epoch payments objects (#1335)
* CNS-930: define proto of new epoch cu structs * CNS-930: create epoch CU objects + basic unit tests * CNS-930: updated epoch CU objects implementation * CNS-930: added check for valid key when decoding * CNS-930: updated genesis with new epoch cu objects * CNS-930: added chain ID to epoch CU objects * CNS-930: change the epoch payments mechanism to the new one * CNS-930: add fixed time work around for time dependent unit tests * CNS-930: added provider epoch CU query and updated E2E * CNS-930: migrator * CNS-930: lint fixes * CNS-930: changed query name ProviderEpochCu to ProvidersEpochCu * CNS-930: changed UniqueEpochSessionGenesis to hold the decoded key * CNS-930: change functions names * CNS-930: change get all store return types * CNS-930: fix TODO * CNS-930: change unique session key order * CNS-930: improve unresponsive CU count efficiency * CNS-930: insert the epoch to the key * CNS-930: add cache to epoch CU * CNS-930: small fix * CNS-930: lint * CNS-930: fix protocol proto script * updated * Revert "updated" This reverts commit ec2852e. * CNS-930: change GetAllProviderConsumerEpochCu return type * CNS-930: update unresponsive count to be efficient * CNS-930: small PR fix * CNS-930: another small PR fix * CNS-930: sort complainedProviders keys * CNS-930: small PR fix * make a object just for complainer cu * encode uint instead of convert to string * fix iterators * validate genesis --------- Co-authored-by: Yarom Swisa <yarom@lavanet.xyz git config --global user.name Yarom> Co-authored-by: Yaroms <103432884+Yaroms@users.noreply.github.com>
- Loading branch information
1 parent
67c24df
commit c665e6a
Showing
64 changed files
with
6,178 additions
and
7,627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
syntax = "proto3"; | ||
package lavanet.lava.pairing; | ||
|
||
option go_package = "github.com/lavanet/lava/x/pairing/types"; | ||
|
||
// UniqueEpochSession is used to detect double spend attacks | ||
// It's kept in a epoch-prefixed store with a unique index: provider, project ID, chain ID and session ID | ||
message UniqueEpochSession { | ||
} | ||
|
||
// ProviderEpochCu is used to track the CU of a specific provider in a specific epoch | ||
// It's kept in a epoch-prefixed store with a unique index: provider address | ||
message ProviderEpochCu { | ||
uint64 serviced_cu = 1; | ||
} | ||
|
||
// ProviderEpochComplainerCu is used to track the CU complained of a specific provider in a specific epoch | ||
// It's kept in a epoch-prefixed store with a unique index: provider address | ||
message ProviderEpochComplainerCu { | ||
uint64 complainers_cu = 1; | ||
} | ||
|
||
// ProviderConsumerEpochCu is used to track the CU between a specific provider and | ||
// consumer in a specific epoch | ||
// It's kept in a epoch-prefixed store with a unique index: provider and project ID | ||
message ProviderConsumerEpochCu { | ||
uint64 cu = 1; | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
proto/lavanet/lava/pairing/unique_payment_storage_client_provider.proto
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.