-
-
Notifications
You must be signed in to change notification settings - Fork 8
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: #225 add transaction pruning service #258
Conversation
log.info("<< Transaction Pruning Service Enabled >>"); | ||
} | ||
|
||
@Scheduled(fixedRateString = "${store.transaction.pruning-interval:86400}", timeUnit = TimeUnit.MINUTES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suggestion is to keep the default of around 40 hours -> 36 hours for finality and 4 hours extra buffer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you mean we should set default is 40 hours, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matiwinnetou The current default 2160 (43200 slots) blocks is taken from the protocol parameter "securityParam" as no rollback possible after this duration. We are using the same value for other stores like utxo.
But I think, the application will set their own safe slots based on application requirement.
5cc49d8
to
991931b
Compare
private boolean pruningEnabled = false; | ||
|
||
@Builder.Default | ||
private int pruningInterval = 144000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sotatek-HuyLe3a Let's keep this interval to 24hrs. 86400 sec.
private int pruningInterval = 144000; | ||
|
||
@Builder.Default | ||
private int pruningSafeSlot = 43200; // 2160 blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @matiwinnetou was referring to this value.
But let's keep it as it is, as we are using similar value in other stores and it's configurable.
log.info("<< Transaction Pruning Service Enabled >>"); | ||
} | ||
|
||
@Scheduled(fixedRateString = "${store.transaction.pruning-interval:144000}", timeUnit = TimeUnit.MINUTES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the time unit to second and the default value accordingly.
#255