sumoprojects / sumokoin

Sumokoin - Digital Cash For Highly-Confidential Transactions
https://www.sumokoin.org
Other
131 stars 69 forks source link

[serialization] replace most boost serialization with existing sumokoin serialization #1112

Closed sumogr closed 4 years ago

sumogr commented 4 years ago

Ref Monero # 6690 with minor adjustments for sumo

It affects wallet2 in a big way so please test extensively as well

Quote This reduces the attack surface for data that can come from malicious sources (exported output and key images, multisig transactions...) since the monero(sumokoin) serialization is already exposed to the outside, and the boost lib we were using had a few known crashers.

For interoperability, a new load-deprecated-formats wallet setting is added (off by default). This allows loading boost format data if there is no alternative. It will likely go at some point, along with the ability to load those.

Notably, the peer lists file still uses the boost serialization code, as the data it stores is define in epee, while the new serialization code is in monero, and migrating it was fairly hairy. Since this file is local and not obtained from anyone else, the marginal risk is minimal, but it could be migrated later if needed.

Some tests and tools also do, this will stay as is for now. Unquote