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

Correct the data type of certain fields to store the expected design values. #498

Merged

Conversation

overcat
Copy link
Member

@overcat overcat commented Aug 2, 2023

Closes #494, Closes #499

#487 depends on this PR.

xdrgen-related PR is in stellar/xdrgen#163

This PR includes breaking changes.

The types of the following fields have changed.

field before after
LedgerBounds.minLedger int long
LedgerBounds.maxLedger int long
MemoId.id long BigInteger
TimeBounds.minTime long BigInteger
TimeBounds.maxTime long BigInteger
TransactionBuilder.baseFee int long
TransactionPreconditions.TIMEOUT_INFINITE long BigInteger
TransactionPreconditions.minSeqAge Long BigInteger
TransactionPreconditions.minSeqLedgerGap int long

@overcat
Copy link
Member Author

overcat commented Aug 2, 2023

I have added some TODO items and I am considering whether to complete them in this PR, but it would bring breaking changes.

@overcat overcat force-pushed the fix-xdr-unsigned branch 2 times, most recently from cf1c199 to 12da1c3 Compare August 3, 2023 02:06
@overcat overcat changed the title [WIP] Fix the representation of UnsignedInteger and UnsignedHyperInteger in XDR. Correct the data type of certain fields to store the expected design values. Aug 3, 2023
@overcat overcat marked this pull request as ready for review August 3, 2023 09:21
@sreuland
Copy link
Contributor

sreuland commented Aug 4, 2023

@overcat , I'm starting review, I've looked at stellar/xdrgen#163, and it seems ok but I asked for other reviewers on that one as I don't have much experience there.

@sreuland
Copy link
Contributor

sreuland commented Aug 5, 2023

one small suggestion, could you update the docs for xdr generation in readme.md to reflect the latest command needed to run, I'm not sure it's current for the new soroban .x files ?

@overcat
Copy link
Member Author

overcat commented Aug 5, 2023

one small suggestion, could you update the docs for xdr generation in readme.md to reflect the latest command needed to run, I'm not sure it's current for the new soroban .x files ?

This command is already up to date, but if you want to generate the xdr classes in this PR, you need to merge the following four PRs.

Copy link
Contributor

@sreuland sreuland left a comment

Choose a reason for hiding this comment

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

the updates look fine, before merging can you respond to the comment about BigInteger conversions to longs here:

https://github.com/stellar/java-stellar-sdk/pull/498/files#r1285301854

thanks!

Copy link
Contributor

@sreuland sreuland left a comment

Choose a reason for hiding this comment

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

the changes look good, one remaining discussion of overflow on datetime's from the xdr HyperIntegers - #498 (comment)

once that is resolved, we can merge?

@sreuland sreuland merged commit 17180d9 into lightsail-network:soroban Aug 8, 2023
@overcat overcat deleted the fix-xdr-unsigned branch August 9, 2023 01:27
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.

2 participants