floblockchain / flo

The Flo Blockchain allows for 1080 bytes of arbitrary data storage on every transaction! FLO is an Archival Blockchain dedicated to long-term data storage and preservation. It offers a secure and decentralized platform for storing important information like public records, ensuring their integrity and accessibility over time.
MIT License
32 stars 21 forks source link

Flo-cli fails to parse select transactions #16

Open bitspill opened 4 years ago

bitspill commented 4 years ago
flo-cli getrawtransaction bab76ed38ae19ad7e0ca758f99695883d6498a896eb456cf2aa10b10e54bb872 1
error: couldn't parse reply from server
bitspill commented 4 years ago

Location of error: https://github.com/floblockchain/flo/blob/v0.15.2.1/src/bitcoin-cli.cpp#L279

The CLI attempts to decode the JSON received via RPC before printing to the console, however it appears the parsing by univalue [1][2] doesn't like something about the JSON, presumably the floData encoding (or lack thereof)

[1] https://github.com/jgarzik/univalue [2] https://github.com/floblockchain/flo/tree/v0.15.2.1/src/univalue

bitspill commented 4 years ago

Utilizing a few online services to inspect the hex I believe the issue comes down to UniValue expecting UTF-8 or Unicode and rejecting the floData for not being such

https://github.com/jgarzik/univalue This class is aligned with the JSON standard, RFC 7159.

https://tools.ietf.org/html/rfc7159.html#section-8

   However, the ABNF in this specification allows member names and
   string values to contain bit sequences that cannot encode Unicode
   characters [...] The behavior of software that
   receives JSON texts containing such values is unpredictable; for
   example, implementations might return different values for the length
   of a string value or even suffer fatal runtime exceptions.

https://hexed.it/ https://onlineutf8tools.com/convert-hexadecimal-to-utf8 http://www.endmemo.com/unicode/unicodeconverter.php

floData hex: 76a914adcfd792793fb204ec4e8cf2d0215fea6963b97388ac

image

freelancerstudio commented 3 years ago

deamon fold encounter an issue

addrman.h:321: void CAddrMan...= nNew' failed.