From 5fa7d72bbad05acdc1eb2ec59e53183d1897a903 Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Tue, 26 Nov 2019 15:53:55 +0300 Subject: [PATCH 1/3] service: get rid of signature field in accounting + proto generate --- accounting/withdraw.go | 6 ------ accounting/withdraw.pb.go | Bin 73944 -> 71346 bytes accounting/withdraw.proto | 4 ---- 3 files changed, 10 deletions(-) diff --git a/accounting/withdraw.go b/accounting/withdraw.go index 0a8cf901..11c56081 100644 --- a/accounting/withdraw.go +++ b/accounting/withdraw.go @@ -11,12 +11,6 @@ type ( MessageID = refs.MessageID ) -// SetSignature sets signature to PutRequest to satisfy SignedRequest interface. -func (m *PutRequest) SetSignature(v []byte) { m.Signature = v } - -// SetSignature sets signature to DeleteRequest to satisfy SignedRequest interface. -func (m *DeleteRequest) SetSignature(v []byte) { m.Signature = v } - // PrepareData prepares bytes representation of PutRequest to satisfy SignedRequest interface. func (m *PutRequest) PrepareData() ([]byte, error) { var offset int diff --git a/accounting/withdraw.pb.go b/accounting/withdraw.pb.go index a2116c01a729f0d2f6b3bcbaeedee0341339c404..d80b01cfdc9be61f60f0ff375dd852f07fde9e5d 100644 GIT binary patch delta 3693 zcmZXXIjdb&7=|&4T$5-pg+x$HY~_M`9tcE&O+e6A1cg0{g^ksLh&z>*f(KO8fPWxF zJfK)wS!iKlA*QxSkwUQ7wVr1gF4(NQ?;5`0{oZdlzyEmV+dF5z`R(b$-{+T8`+Juk z-!B&~9qvDK|Ma20^1(&7ul0}Zf31%=`nh`L^x^&P>d~nz+yC&=+uK|nU&(fL9oH$3 zYqP|4F5_BF$LG#wyF82kEFKJ8>bb;syYgMcHRpR`KV$7!moc7J2+i49k+5|c8aiGV z=oy=Mx5lu6HS6Ne&$+# z8_g{mv_&k+DT>QVK|<;PNFG$^?0}^7u{+#E(6;OFq-ATt{|>1mYc1w28Y=#&0kH$V z1TpRwz~G&k(;l4-`WqZfYWQBGo7-+gXg8ywLDGydt>4HfF)ULmz!>P3?+JM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E`AlrCEY?=I`4KYTsl0s4}-Xc+Ag>I&%SrKtJ(;KKaEFoO#opA-~XD5MPNudx3 zfxjwH41)@HOn;XcR}Fqna+M#pBBFl&mh}1=h+B*?7^3^ROq5W>uFNsJ_2Yu7k$ln( z=mWNf3_kkcQZyaXrhz)aHg^e*F$EK0ilAu0ikaGXsdv?wOQk6#6oAp01)#f_QeLpl zR31ms)Oq3BiaTnYv-R51b5Cyn+4-1r+;N?Y!@*$WJh6K3*Y17E+x zon883w7fevf4oj_P5#*bUjg_Apu08sdV1l#JHw@WLg=O+rPC8vUfT0_AG#A)e(gTI zcK@{f_?M)+{rM|9{}!13{N2L*kr^(WRVUxrsMo4lf=(WDPpvptPYmV`bgx}s-1#Sj zv$|^kP#1TD!Hk*i-RnoYrLXqfys>NUoBO&m&f?8?7Uq7M>n`41y!zJS+^f@zccVwU SmCp`zzu$TK|Mh47fj Date: Tue, 26 Nov 2019 15:54:27 +0300 Subject: [PATCH 2/3] service: get rid of signature field in container + proto generate --- container/service.go | 6 ------ container/service.pb.go | Bin 62382 -> 59764 bytes container/service.proto | 6 ------ 3 files changed, 12 deletions(-) diff --git a/container/service.go b/container/service.go index 4d3747e5..24727ee7 100644 --- a/container/service.go +++ b/container/service.go @@ -25,12 +25,6 @@ const ( ErrNotFound = internal.Error("could not find container") ) -// SetSignature sets signature to PutRequest to satisfy SignedRequest interface. -func (m *PutRequest) SetSignature(v []byte) { m.Signature = v } - -// SetSignature sets signature to DeleteRequest to satisfy SignedRequest interface. -func (m *DeleteRequest) SetSignature(v []byte) { m.Signature = v } - // PrepareData prepares bytes representation of PutRequest to satisfy SignedRequest interface. func (m *PutRequest) PrepareData() ([]byte, error) { var ( diff --git a/container/service.pb.go b/container/service.pb.go index 8b98cfa59116761173e6a5fa44f193826114d292..d9febc0e85a9d343fc30293765ae6c0f77e2f52d 100644 GIT binary patch delta 3486 zcmYk9JBwab6o$!!+(u$!R4hzVYhcd(Qd(FG{sB2x#Uh}MUn57bFa}b{`2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iYar0o4Jg_CvOj+4f;$_b3oqkC7CqE+^1ihIO7foeyH7f}# zNvCfR;o00x)&m>}A`#0KXx<_`;R*!+(YZfpjf9QVOGT4MP-cT#&6-pql)TR(x&;kS zvgWEl+Qjaiq!>Q~C@7v8%|*beLKGq~q>E6#R%iSEk)P)ABz>5HXVc__o8UH2A)356 zn_yUxD0N0I4U+*TCz_uxWQj(XJTr&q-pfB6cSogjt{5+^FK_>LJLSCSxXz_cyFGHA zTYYe~PTuQwcJ|iiH=kX2&_I1NKhpA(`q%T1&lj?~{a-mby3aR1H0Ph6OS?}#h@sQA z%%D<#bM2Y=y(_P^{&rV=@5=4@^3_Kk+Y{C&K6riSclrFcj}Eq;+NF}S>LeQ*#W>$B z-I*2l&7M=A_@cYAyu57wm%(UQI`^GgwZDg@Zo7ToLi67NmoC?PuAiL0@X7VV_1zD< l^`}3*^naqbd7!>~bYZ^#v!D0WcWx}yXTE=9e&@zD{||m9zfb@G diff --git a/container/service.proto b/container/service.proto index d4d50cae..8a3f56c0 100644 --- a/container/service.proto +++ b/container/service.proto @@ -41,9 +41,6 @@ message PutRequest { // Rules define storage policy for the object inside the container. netmap.PlacementRule rules = 4 [(gogoproto.nullable) = false]; - // Signature of the user (owner id) - bytes Signature = 5; - // RequestMetaHeader contains information about request meta headers (should be embedded into message) service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; // RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) @@ -59,9 +56,6 @@ message DeleteRequest { // CID (container id) is a SHA256 hash of the container structure bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false]; - // Signature of the container owner - bytes Signature = 2; - // RequestMetaHeader contains information about request meta headers (should be embedded into message) service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; // RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) From 7099e2083edd7e8c1249e0cb9348582bbf540cf3 Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Tue, 26 Nov 2019 15:54:40 +0300 Subject: [PATCH 3/3] docs: regenerate documentation --- docs/accounting.md | 2 -- docs/container.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/docs/accounting.md b/docs/accounting.md index 268a1872..bcae1366 100644 --- a/docs/accounting.md +++ b/docs/accounting.md @@ -362,7 +362,6 @@ Delete allows user to remove unused cheque | ID | [bytes](#bytes) | | ID is cheque identifier | | OwnerID | [bytes](#bytes) | | OwnerID is a wallet address | | MessageID | [bytes](#bytes) | | MessageID is a nonce for uniq request (UUIDv4) | -| Signature | [bytes](#bytes) | | Signature is a signature of the sent request | | Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) | | Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) | @@ -450,7 +449,6 @@ DeleteResponse is empty | Amount | [decimal.Decimal](#decimal.Decimal) | | Amount of funds | | Height | [uint64](#uint64) | | Height is the neo blockchain height until the cheque is valid | | MessageID | [bytes](#bytes) | | MessageID is a nonce for uniq request (UUIDv4) | -| Signature | [bytes](#bytes) | | Signature is a signature of the sent request | | Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) | | Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) | diff --git a/docs/container.md b/docs/container.md index bc559ce2..ef2ba19a 100644 --- a/docs/container.md +++ b/docs/container.md @@ -92,7 +92,6 @@ List returns all user's containers | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | CID | [bytes](#bytes) | | CID (container id) is a SHA256 hash of the container structure | -| Signature | [bytes](#bytes) | | Signature of the container owner | | Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) | | Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) | @@ -165,7 +164,6 @@ via consensus in inner ring nodes | Capacity | [uint64](#uint64) | | Capacity defines amount of data that can be stored in the container (doesn't used for now). | | OwnerID | [bytes](#bytes) | | OwnerID is a wallet address | | rules | [netmap.PlacementRule](#netmap.PlacementRule) | | Rules define storage policy for the object inside the container. | -| Signature | [bytes](#bytes) | | Signature of the user (owner id) | | Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) | | Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |