-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review and backport EOS PR 3392 packing/unpacking array-like types #995
Comments
Need to be careful with introducing new limits here, to remain compatible with existing code. |
May be related: EOSIO/eos#2424 also EOSIO/eos@50ceb9c |
Note: This is not necessarily a hardfork change, but is an area where we need to use extreme caution. See the PR bitshares/bitshares-fc#55 for more information |
I have taken a step back to re-evaluate. I am adding notes here as a memory aide. I believe the major intent in eos was threefold:
The part that requires caution relates to backward-compatibility. The methods must be able to interpret incoming bytes the same as before. Unit tests will need to be complete and exhaustive, with the ability to read (and for testing, create) byte streams that exactly match the results of the previous pack/unpack versions (need to figure out how best to accomplish this). Edge cases exist at extremely small objects, overly large objects and collections with both small and large numbers of elements. Also, if the limits imposed are different than before, this change requires hardfork protection. |
Just realized that |
Another option to prevent consensus size differences (suggested by @pmconrad) is to prevent network messages above a certain size. This would "catch the problem at the door", and not affect consensus at the pack/unpack level. This has been done as part of pull bitshares/bitshares-fc#100 Should it be decided that pull 100 fixes this issue as well, the following questions remain:
I am looking forward to other's thoughts. |
PR 100 alone probably does not fix the sizeof problem. But IMO with PR 100 we can get rid of the sizeof checks during deserialization without much risk. |
@pmconrad PR 103 fixed the problem of serialization checks, but the sizeof problem probably still exists in areas. Should a new ticket be created, or should we just use this one? |
IMO the sizeof issue has nothing to do with the original ticket. Better close this and create a new one. |
Fixed by bitshares/bitshares-fc/pull/100 and (to a lesser degree) bitshares/bitshares-fc/pull/103. This exposed another issue detailed at #1540 |
I guess this can be put into next feature release? |
Good question. Neither bitshares/bitshares-fc/pull/103 nor bitshares/bitshares-fc/pull/100 have hardfork protection, as the rules should not have changed. The FC_ASSERTs removed in bitshares/bitshares-fc/pull/103 have been replaced by the 1 FC_ASSERT added in bitshares/bitshares-fc/pull/100. Please feel free to put a second set of eyes on those changes. If we all agree, I believe this can go in the feature release. |
EOSIO/eos#3392
The text was updated successfully, but these errors were encountered: