Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 116 additions & 50 deletions common/proto/accounts/accounts.pb.go

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

9 changes: 9 additions & 0 deletions common/proto/accounts/accounts.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ message AccountNonceSyncRequest {
checksum.Checksum checksum = 8; // optional: versioned digest (shared checksum.proto)
}

// AccountSyncRequestAccounts is a stateless targeted fetch request.
// map<string, bool> gives set semantics at the wire level — duplicate addresses
// are structurally impossible (map keys are unique in protobuf).
// Used post-PoTS / post-Reconciliation when tagging identifies missing accounts.
message AccountSyncRequestAccounts {
map<string, bool> addresses = 1; // key = address hex or DID string
phase.Phase phase = 2;
}

// ================================================================
// Server-side stream envelope (server → client)
// ================================================================
Expand Down
4 changes: 4 additions & 0 deletions common/types/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ const (
ACCOUNTS_SYNC_REQUEST_END = "state:accountssync:accountssyncrequest:end"
ACCOUNTS_SYNC_REQUEST = "state:accountssync:accountssyncrequest"
ACCOUNTS_SYNC_RESPONSE = "state:accountssync:accountssyncresponse"

// Take the array of accounts required from the client as request, and send the array of accounts to the server.
ACCOUNTS_SYNC_REQUEST_ACCOUNTS = "state:accountssync:accountssyncrequest:accounts"
ACCOUNTS_SYNC_REQUEST_ACCOUNTS_RESPONSE = "state:accountssync:accountssyncrequest:accounts:response"
)

const (
Expand Down
1 change: 1 addition & 0 deletions common/types/constants/protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const (
DataSyncProtocol protocol.ID = "/fastsync/v1/datasync"
AccountsSyncProtocol protocol.ID = "/fastsync/v1/accountssync"
AccountsSyncDataProtocol protocol.ID = "/fastsync/v1/accountssync/data"
AccountsSyncFetchProtocol protocol.ID = "/fastsync/v1/accountssync/fetch"
PoTSProtocol protocol.ID = "/fastsync/v1/pots"
)

Expand Down
Loading
Loading