Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[1.2.0] - 2023-02-16
Feature
Fixed
Features
This version introduces a new feature called
signMessage
. The intention of this feature is to get the possibility to sign a human-readable buffer that could be used to verify if the user has access to the private key for the specified public key.This method is widely used within the Hive ecosystem to log in to multiple decentralized applications. Those apps can read the account's posting public key from the blockchain, ask the user to sign the message, and verify the signature against the public key.
An example implementation of such a mechanism can be found in a test file:
test/tests/signMessage.test.ts
.Fixes
Some serializers were wrongly implemented. For example, a string serializer uses a variable-length encoding which means that the size of the "length" property can vary from 1 up to 4 bytes. The previous implementation incorrectly assumed that the length of the string cannot take more than one byte (uint8_t). A new method for buffer operation was introduced to read a
varint
, therefore fixing some serializers (like string and array).Appropriate unit tests were updated and added if necessary.
Moreover, some operation decoders were missing additional
extension
properties which resulted in a wrong signature for such operation types. This is fixed now. One example is therecurrent_transfer
operation which was impossible to broadcast as the ledger application generated an incorrect signature for a transaction with such an operation.To test this fix, it is recommended to use
hive-ledger-cli
application and broadcast the recurrent transfer. Example:hive-ledger-cli recurrent-transfer "m/48'/13'/0'/1'/0'" "engrave" "engrave.cold" "0.001 HIVE" 30 3
Improvements
Some additional global variables were introduced to share between different signing methods, resulting in lower RAM consumption which allowed me to increase the maximum string length that can be handled by the application. This makes it possible to sign more operations without using the blind signing method, increasing the overall security of the Hive application.