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

[3.2] Backport push_transaction optimizations. #484

Merged
merged 3 commits into from
Jun 23, 2022

Conversation

ndcgundlach
Copy link
Contributor

Optimize push_transaction by using deque instead of vector to avoid vector having to reallocate and move transaction receipts and max transaction metas in block.
std::deque used for boost < 1.71 now since configurable boost::container::deque is not available until boost 1.71. boost deque used if boost >= 1.71 available.
Calculate action_receipt digest at action execution time to avoid copying of action_receipts and to bill for hash.
Calculate transaction_receipt digest at transaction execution time to bill for hash.

Resolves: #358

@ndcgundlach ndcgundlach added the OCI OCI working this issue... label Jun 21, 2022
@ndcgundlach ndcgundlach self-assigned this Jun 21, 2022
@ndcgundlach ndcgundlach marked this pull request as ready for review June 21, 2022 18:57
vector<transaction_metadata_ptr> _pending_trx_metas;
vector<transaction_receipt> _pending_trx_receipts;
vector<digest_type> _action_receipt_digests;
deque<transaction_metadata_ptr> _pending_trx_metas;
Copy link
Member

Choose a reason for hiding this comment

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

seems like the whitespace could have been fixed up on all these

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleaned up indentation.

@ndcgundlach ndcgundlach requested a review from spoonincode June 22, 2022 17:12
@ndcgundlach ndcgundlach merged commit be93354 into main Jun 23, 2022
@ndcgundlach ndcgundlach deleted the backport_optimize_push_transaction branch June 23, 2022 14:12
@arhag arhag changed the title Backport push_transaction optimizations. [3.2] Backport push_transaction optimizations. Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI OCI working this issue...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backport Optimize push_transaction
3 participants