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

feat: add RemoveExpiredPolicies #411

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

pythonberg1997
Copy link
Contributor

@pythonberg1997 pythonberg1997 commented Aug 9, 2023

Description

This pr is to add method to remove expired data from the kv store

Rationale

To reduce the chain data

Changes

Notable changes:

  • GroupMember expiration can be nil now
  • add RemoveExpiredPolicies

x/permission/abci.go Outdated Show resolved Hide resolved
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
google.protobuf.Timestamp expiration_time = 2 [(gogoproto.stdtime) = true];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the expiration can be nil (means no expiration)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do this change still needed? if Change this, off-chain service should adapt to this, nil == expiration

@pythonberg1997 @guagualvcha

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or we can set nil to maxTimestamp when getting members from rpc, producing events

@pythonberg1997 pythonberg1997 changed the title feat: add RemoveExpiredMembers and RemoveExpiredPolicies feat: add RemoveExpiredPolicies Aug 14, 2023
@pythonberg1997 pythonberg1997 added this pull request to the merge queue Aug 14, 2023
Merged via the queue into bnb-chain:develop with commit 7aa9933 Aug 14, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants