We release the python and ruby implementaion for the Libra Canonical Serialization (LCS) Spec.
Feedback is welcome.
We release the python and ruby implementaion for the Libra Canonical Serialization (LCS) Spec.
Feedback is welcome.
LCS for python canoser-python is updated from version 0.3.x to version 0.4, with following updates:
We implemented all libra test cases, even those in the libra readme document.
Libra Canonical Serialization Readme Test
During writting test cases for the LCS Readme document, we found some mismatches between the document and the libra code. For example:
Program in document:
{
sender: 3a24a61e05d129cace9e0efc8bc9e33831fec9a9be66f50fd352a2638a49b9ee,
sequence_number: 32,
payload: Program {
code: āmoveā,
args: [{STRING: CAFE D00D}, {STRING: cafe d00d}],
modules: [[CA][FED0][0D]],
} ,
max_gas_amount: 10000,
gas_unit_price: 20000,
expiration_time: 86400 seconds
}
Real code output:
{
sender: 3a24a61e05d129cace9e0efc8bc9e33831fec9a9be66f50fd352a2638a49b9ee,
sequence_number: 32,
payload: Program(
Program {
code: āmoveā,
args: [
{STRING: CAFE D00D},
{STRING: cafe d00d},
],
},
),
max_gas_amount: 10000,
gas_unit_price: 20000,
expiration_time: 86400s,
}
The modules
fields is missing.
The WriteSet
has even more mismatches.
LCS for python canoser-python is updated to version 0.6, support the latest address change in LCS. Now, there are three types of bytes in LCS.
code : [Uint8]
public_key, [Uint8, ED25519_PUBLIC_KEY_LENGTH]
signature, [Uint8, ED25519_SIGNATURE_LENGTH]
Address, [Uint8, 32, False]
Because the address format is changed, many address related path is changed too.
For example:
libra-client has made all this changes by using canoser-python
.
LCS for pythoner is update to version 0.8.2 to support uleb128 encoding
commit b9a97072a62b5f941c041368145fe3ff8e461899
[LCS] uleb128 for lengths and variant indexes