mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-26 05:27:19 +00:00
835b954f5c
* Remove interfaces * Squashed 'interfaces/' content from commit e06631eb4 git-subtree-dir: interfaces git-subtree-split: e06631eb4d0926c2d6a4f552497b920b4ed8d1bd * Update KV interface * Squashed 'interfaces/' changes from e06631eb4..014677ffe 014677ffe Merge remote-tracking branch 'origin/master' into stream 08c32a09e add version method to txPool and ethbackend 5b6bf70b9 Update README.md 7712cb267 Update README.md f895ece4c save (#37) git-subtree-dir: interfaces git-subtree-split: 014677ffe5bff0dee1a333f06c92e6110d791468 * Fix old interfaces * Squashed 'interfaces/' changes from 014677ffe..df31e1146 df31e1146 remove action from storage change git-subtree-dir: interfaces git-subtree-split: df31e1146c368eda2e2b15ab252b78fba7a0a6f3 * add Accumulator * add location * Squashed 'interfaces/' changes from df31e1146..472584639 472584639 Merge remote-tracking branch 'origin/master' into stream dd6a42724 Refactor of consensus interface (#28) git-subtree-dir: interfaces git-subtree-split: 472584639f637189dfb906ef1ed03665f98d55d2 * Fix compilation in cons * Pass accumulator to Execution stage * Fix test * Pass accumulator to unwind and plain writer * Add accumulator use to plain writer * Squashed 'interfaces/' changes from 472584639f..5c36f038b8 5c36f038b8 State change stream to KV (#38) REVERT: 472584639f Merge remote-tracking branch 'origin/master' into stream REVERT: df31e1146c remove action from storage change REVERT: 014677ffe5 Merge remote-tracking branch 'origin/master' into stream REVERT: e06631eb4d Fix REVERT: 9c10d79d2d Fix REVERT: 61ae9307de Fix REVERT: 4fcf34ecc5 State change stream to KV git-subtree-dir: interfaces git-subtree-split: 5c36f038b87096ffb6b07e90c6762c21b864cd3b * Add state.stream flag Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
88 lines
1.8 KiB
Protocol Buffer
88 lines
1.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "types/types.proto";
|
|
|
|
package remote;
|
|
|
|
option go_package = "./remote;remote";
|
|
|
|
// Provides methods to access key-value data
|
|
service KV {
|
|
// Version returns the service version number
|
|
rpc Version(google.protobuf.Empty) returns (types.VersionReply);
|
|
|
|
// Tx exposes read-only transactions for the key-value store
|
|
rpc Tx(stream Cursor) returns (stream Pair);
|
|
|
|
rpc ReceiveStateChanges(google.protobuf.Empty) returns (stream StateChange);
|
|
}
|
|
|
|
enum Op {
|
|
FIRST = 0;
|
|
FIRST_DUP = 1;
|
|
SEEK = 2;
|
|
SEEK_BOTH = 3;
|
|
CURRENT = 4;
|
|
LAST = 6;
|
|
LAST_DUP = 7;
|
|
NEXT = 8;
|
|
NEXT_DUP = 9;
|
|
NEXT_NO_DUP = 11;
|
|
PREV = 12;
|
|
PREV_DUP = 13;
|
|
PREV_NO_DUP = 14;
|
|
SEEK_EXACT = 15;
|
|
SEEK_BOTH_EXACT = 16;
|
|
|
|
OPEN = 30;
|
|
CLOSE = 31;
|
|
}
|
|
|
|
message Cursor {
|
|
Op op = 1;
|
|
string bucketName = 2;
|
|
uint32 cursor = 3;
|
|
bytes k = 4;
|
|
bytes v = 5;
|
|
}
|
|
|
|
message Pair {
|
|
bytes k = 1;
|
|
bytes v = 2;
|
|
uint32 cursorID = 3;
|
|
}
|
|
|
|
enum Action {
|
|
STORAGE = 0; // Change only in the storage
|
|
UPSERT = 1; // Change of balance or nonce (and optionally storage)
|
|
CODE = 2; // Change of code (and optionally storage)
|
|
UPSERT_CODE = 3; // Change in (balance or nonce) and code (and optinally storage)
|
|
DELETE = 4; // Account is deleted
|
|
}
|
|
|
|
message StorageChange {
|
|
types.H256 location = 1;
|
|
bytes data = 2;
|
|
}
|
|
|
|
message AccountChange {
|
|
types.H160 address = 1;
|
|
uint64 incarnation = 2;
|
|
Action action = 3;
|
|
bytes data = 4; // nil if there is no UPSERT in action
|
|
bytes code = 5; // nil if there is no CODE in action
|
|
repeated StorageChange storageChanges = 6;
|
|
}
|
|
|
|
enum Direction {
|
|
FORWARD = 0;
|
|
UNWIND = 1;
|
|
}
|
|
|
|
message StateChange {
|
|
Direction direction = 1;
|
|
uint64 blockHeight = 2;
|
|
types.H256 blockHash = 3;
|
|
repeated AccountChange changes = 4;
|
|
} |