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

fix: export expiration block number procedures #925

Merged
merged 9 commits into from
Oct 24, 2024

Conversation

tomyrd
Copy link
Collaborator

@tomyrd tomyrd commented Oct 21, 2024

Exposes procedures to get and set the expiration block number so that they can be used by the client

@tomyrd tomyrd force-pushed the tomyrd-export-expiration-proc branch from 63997b4 to 293f9d4 Compare October 21, 2024 19:09
#!
#! Inputs: [block_height_delta, ...]
#! Output: [...]
#!
#! Where:
#! - block_height_delta is the desired expiration time delta (1 to 0xFFFF).
export.update_expiration_block_num
export.update_expiration_delta
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we want to keep this name the same as it was although I don't mind this option too much either.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would keep the name the same here.

@tomyrd tomyrd added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Oct 22, 2024
@tomyrd tomyrd changed the title fix: export update_expiration_delta procedure fix: export expiration block number procedures Oct 22, 2024
@tomyrd tomyrd marked this pull request as ready for review October 22, 2024 14:44
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

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

LGTM! Left a small comment, let's wait for confirmation before merging.

#!
#! Where:
#! - block_height_delta is the desired expiration time delta (1 to 0xFFFF).
export.update_expiration_block_num
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we want update_expiration_block_delta here (ie, in the user-facing procedure), unless I misunderstood @bobbinth. If this is the case, comment on line 203 should probably be updated as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, exactly. From the user's standpoint, we are operating with the delta rather than the block number. So, the user should be setting and getting the current delta. The fact that we are storing it as expiration block number internally, I think, is an implementation details.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left a few more comments inline.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

All looks good! Thank you!

@tomyrd tomyrd force-pushed the tomyrd-export-expiration-proc branch from 7b9383f to fbfbeb1 Compare October 24, 2024 12:56
@tomyrd tomyrd merged commit ea1de49 into next Oct 24, 2024
8 checks passed
@tomyrd tomyrd deleted the tomyrd-export-expiration-proc branch October 24, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog This PR does not require an entry in the `CHANGELOG.md` file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants