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

centralize tx size computation across tx subsytem and overlay #4023

Closed
marta-lokhova opened this issue Nov 10, 2023 · 0 comments · Fixed by #4064
Closed

centralize tx size computation across tx subsytem and overlay #4023

marta-lokhova opened this issue Nov 10, 2023 · 0 comments · Fixed by #4064
Assignees
Labels
bug cleanup refactoring or other internal improvements help wanted

Comments

@marta-lokhova
Copy link
Contributor

Multiple subsystems in core rely on transaction size computation. For these systems to interact correctly, they must compute tx size in the same way. We've already encountered bugs related to the fact that core has several places where the same computation is done, e.g. in overlay:

return static_cast<uint64_t>(xdr::xdr_size(msg) -

and in tx the subsystem:
int64_t txSize = xdr::xdr_size(mEnvelope);

We should centralize this logic in one util function to prevent footguns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cleanup refactoring or other internal improvements help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants