Skip to content
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

Control maxTreeDepth in serialize (same as in deserialize) #781

Closed
3 tasks
aslesarenko opened this issue Feb 8, 2022 · 4 comments
Closed
3 tasks

Control maxTreeDepth in serialize (same as in deserialize) #781

aslesarenko opened this issue Feb 8, 2022 · 4 comments
Labels
C-enhancement Category: A PR with an enhancement or a proposed one in an issue. P3-low Priority: Low

Comments

@aslesarenko
Copy link
Member

aslesarenko commented Feb 8, 2022

This should be done in:

  • DataSerializer
  • SigmaBoolean.serializer
  • ValueSerializer

Key requirement: both deserialize and serialize either both work or both fail on the same data.

@aslesarenko aslesarenko added C-enhancement Category: A PR with an enhancement or a proposed one in an issue. good first issue [Description](https://github.com/nodejs/admin/issues/50#issuecomment-367669993) P2-medium Priority: Medium labels Feb 8, 2022
@aslesarenko aslesarenko mentioned this issue Feb 8, 2022
11 tasks
@jozanek
Copy link
Collaborator

jozanek commented Dec 21, 2022

Hey guys, not sure what abandoned means in this context but it is definitely ready to be reviewed again and/or merged.

@aslesarenko aslesarenko added P3-low Priority: Low and removed Bounty - 1000 SigUSD P2-medium Priority: Medium good first issue [Description](https://github.com/nodejs/admin/issues/50#issuecomment-367669993) labels Dec 23, 2022
@aslesarenko
Copy link
Member Author

@darkdrag00n, I down graded this issue and removed bounty label.
I've also put the PR in draft.
The main reason is this issue solves non existent problem.
The depth limit was initially added to Reader in order to prevent attacks, but actually we have hard limit on the size of every ErgoBox 4K bytes. So, basically doesn't matter what has been put in the box as long as it is < 4K.
With new JIT interpreter this becomes even less important.

Also, both serializers and deserializers are part of network consensus, which put any changes under strict scrutiny.
Any change should come with a proof that it doesn't break the consensus (i.e. there is no situation when the new version behaves differently from a previous version).

For this reason it is better to keep them as simple as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or a proposed one in an issue. P3-low Priority: Low
Projects
None yet
Development

No branches or pull requests

4 participants
@aslesarenko @kushti @jozanek and others