From 377c0974645487b30b849c3d20d21f7281ca632a Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Fri, 26 Apr 2024 12:26:01 +0700 Subject: [PATCH] downloader: dbg upgrade whitelist (#213) --- downloader/downloader.proto | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/downloader/downloader.proto b/downloader/downloader.proto index 26d3fbb..c6de2a7 100644 --- a/downloader/downloader.proto +++ b/downloader/downloader.proto @@ -10,8 +10,12 @@ package downloader; service Downloader { // Erigon "download once" - means restart/upgrade/downgrade will not download files (and will be fast) // After "download once" - Erigon will produce and seed new files - // Downloader will able: seed new files (already existing on FS), download uncomplete parts of existing files (if Verify found some bad parts) - rpc ProhibitNewDownloads (ProhibitNewDownloadsRequest) returns (google.protobuf.Empty) {} + // After `Prohibit` call - downloader stil will able: + // - seed new (generated by Erigon) files + // - seed existing on Disk files + // - download uncomplete parts of existing on Disk files (if Verify found some bad parts) + // `Prohibit` has `whitelist` feature - based on file-type + rpc Prohibit (ProhibitRequest) returns (ProhibitReply) {} // Adding new file to downloader: non-existing files it will download, existing - seed rpc Add (AddRequest) returns (google.protobuf.Empty) {} @@ -46,8 +50,12 @@ message VerifyRequest { message StatsRequest { } -message ProhibitNewDownloadsRequest { - string type = 1; +message ProhibitRequest { + repeated string whitelistAdd = 1; // nil - means "don't modify". non-nil - means "merge with current whitelist". + repeated string whitelistRemove = 2; // nil - means "don't modify" +} +message ProhibitReply { + repeated string whitelist = 1; // current whitelist } message StatsReply {