-
Notifications
You must be signed in to change notification settings - Fork 457
Update lisk-transactions to use encoded data - Closes #5270 #5366
Update lisk-transactions to use encoded data - Closes #5270 #5366
Conversation
d6c8702
to
15a9ea1
Compare
Schema changes for encoding and decoding
Rename unlockingObjects to unlockObjects
Remove unwanted validation asset
Define BaseTransactionInput
9886e56
to
08cb5b3
Compare
elements/lisk-chain/src/data_access/transaction_interface_adapter.ts
Outdated
Show resolved
Hide resolved
elements/lisk-transactions/src/12_multisignature_transaction.ts
Outdated
Show resolved
Hide resolved
return binaryMessage; | ||
} | ||
|
||
// First decode base message and then decode asset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this done in two steps instead of doing it in one decode()
call? I think it might be faster in general to call decode only once if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean, create the whole schema and decode? I followed the LIP, according to LIP we need to decode root message first and then decode asset https://github.com/LiskHQ/lips/blob/master/proposals/lip-0028.md#deserialization
@@ -31,67 +30,30 @@ export interface DelegateAsset { | |||
readonly username: string; | |||
} | |||
|
|||
export const delegateAssetFormatSchema = { | |||
export const delegateRegistrationAssetSchema = { | |||
$id: 'lisk/delegate-registration-transaction', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to do in this PR but should I create an issue to hash $id from schemas to avoid having this as the key of the object literal holding the schema cache? (it will work like this but just in case someone uses something different here in the future or in customapps)
What was the problem?
This PR resolves #5270
How was it solved?
How was it tested?