-
Notifications
You must be signed in to change notification settings - Fork 970
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
Implement rent fees. #3813
Implement rent fees. #3813
Conversation
12f4b65
to
8c1d1dc
Compare
continue; | ||
} | ||
bool isTemporary = isTemporaryEntry(lk); | ||
// Enforce minimum expiration for the new entries. |
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.
The minimum is already set by the host, so you could just set entryChange.newExpirationLedger
to the expiration ledger on the entry.
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.
Do we actually need to set it on the host side? I feel like it would be safer if we just had one place where all the validation is performed.
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.
Well we either have to set it to the min or 0 on creation, and we thought min made more sense.
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.
Actually the host logic is currently wrong (off-by-one error, as usual).
I think we should have just one place that handles all the bump logic. If that's host, then it should do all the deduplication, min/max boundary enforcement and autobump logic, such that the final bump vector can be simply applied to the respective entries. Otherwise, all this work should be performed by core. Doing this on the host side is probably nicer for the sake of preflight/CLI etc., so maybe we should move everything there? I would still do that as a followup though.
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.
Yeah we can do that as a followup.
This also includes cleanup for the expiration bump related code.
r+ 07c05a0 |
Description
Resolves #3777, #3804 and stellar/rs-soroban-env#903
This also includes cleanup for the expiration bump related code.
Checklist
clang-format
v8.0.0 (viamake format
or the Visual Studio extension)