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

Check ATTRIBUTE export keys. Do not import empty set. #2565

Merged
merged 9 commits into from
Oct 12, 2023

Conversation

Bushstar
Copy link
Member

@Bushstar Bushstar commented Oct 11, 2023

Summary

  • Do not allow setting of an empty attribute map. It is possible to send an ATTRIBUTE Gov var TX for a yet to be defined value as Export without knowing that value will export an empty ATTRIBUTE map which will be accepted by Import and will be accepted. This PR rejects empty ATTRIBUTE imports.
  • Before exporting ATTRIBUTES to import check the keys are valid as invalid keys are currently ignored when they should generate an error.

Implications

  • Storage

    • Database reindex required
    • Database reindex optional
    • Database reindex not required
    • None
  • Consensus

    • Network upgrade required (rollback on testnet)
    • Includes backward compatible changes (maybe for mainnet)
    • Includes consensus workarounds
    • Includes consensus refactors
    • None

@Bushstar Bushstar changed the title Do not allow setting of an empty attribute map Check ATTRIBUTE export keys. Do not import empty set. Oct 11, 2023
prasannavl
prasannavl previously approved these changes Oct 11, 2023
@prasannavl
Copy link
Member

prasannavl commented Oct 11, 2023

Full sync tests:

Fork guarded, but affected blocks:

@prasannavl prasannavl added the v/next-release Items ready or targeted for upcoming release(s) label Oct 11, 2023
@prasannavl prasannavl merged commit 5a9376d into master Oct 12, 2023
@prasannavl prasannavl deleted the bush/reject-empty-var branch October 12, 2023 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v/next-release Items ready or targeted for upcoming release(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants