-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api: Add stable marshaling #597
Commits on Jul 16, 2024
-
internal/proto: Exclude NaN floating point numbers from testing
They are not comparable. Previously, unit tests could fail. Signed-off-by: Leonard Lyubich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 01b4607 - Browse repository at this point
Copy the full SHA 01b4607View commit details -
internal/proto: Test that all marshaling functions panic on short buffer
As they state in the docs. Signed-off-by: Leonard Lyubich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 79f9438 - Browse repository at this point
Copy the full SHA 79f9438View commit details -
internal/proto: Prevent potentially incorrect encoding of byte arrays
Previously, `MarshalToBytes` and `MarshalToRepeatedBytes` may have encoded data incorrectly. If there was nothing left in the buffer to accommodate the entire array, only the part that could fit was written. Now the functions check that the buffer will actually hold the required bytes, and only then calls built-in `copy`. Corresponding unit tests now pass. Signed-off-by: Leonard Lyubich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d7cb390 - Browse repository at this point
Copy the full SHA d7cb390View commit details -
proto/status: Declare constants for status codes
Protocol Buffers V3 has no constants, and they are missing in the generated code as well. To make them easier to access, they are exported manually. Signed-off-by: Leonard Lyubich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 49db262 - Browse repository at this point
Copy the full SHA 49db262View commit details -
proto: Support stable marshaling for NeoFS messages
Specific encoding of NeoFS messages is required to implement protocol checksums and signatures. Continues 51fa18f. Signed-off-by: Leonard Lyubich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 99e8303 - Browse repository at this point
Copy the full SHA 99e8303View commit details -
lint: Refresh deprecated config
This fixes ``` $ golangci-lint --version golangci-lint has version 1.59.1 built with go1.22.3 from 1a55854a on 2024-06-09T18:08:33Z $ golangci-lint run ./... WARN [config_reader] The configuration option `output.format` is deprecated, please use `output.formats` ``` The configuration file is updated according to https://golangci-lint.run/usage/configuration/. Signed-off-by: Leonard Lyubich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 88b92b2 - Browse repository at this point
Copy the full SHA 88b92b2View commit details -
According to https://golangci-lint.run/usage/linters/#govet, `check-shadowing` no longer exists. Now it should be ```yaml govet: disable: [shadow] ``` but `shadow` is disabled by default. Thus, whole `govet` section is not needed anymore. ``` $ golangci-lint --version golangci-lint has version 1.59.1 built with go1.22.3 from 1a55854a on 2024-06-09T18:08:33Z ``` Signed-off-by: Leonard Lyubich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d1a668c - Browse repository at this point
Copy the full SHA d1a668cView commit details