Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
TxPool: refactoring for blob txs #5953
TxPool: refactoring for blob txs #5953
Changes from 169 commits
d366741
53fcffa
2bc9be5
79588f0
1a25885
414fb8f
c508930
45115fa
c0db165
15087f4
c6ea9fe
d1c66c1
a6a65c5
5cf90f5
2e91dcb
b38a40d
7f3df36
a3d86d7
109cca4
0b8f72d
5a20486
5a6b7fe
a6e1e16
6596c1d
07870f1
73872e1
b11a27d
5da9488
3071be3
9cc03cc
761a6c5
028f650
1b47921
8145f44
1d3ec8d
6201cae
56d9dd4
091bde6
d7daff3
fb54eb9
d8cf261
647873f
5fdff5a
12e9b9a
53f4415
e646940
dbd8890
82a5110
44b145e
5a6cf30
771858c
a822d6f
f4df112
965a003
6f045a6
c3fbde1
4aa0e0e
a91b8d8
0ea2bc5
17e997a
c41717f
7c71180
ccc93e0
3d3fe14
78de5be
4923d2e
e515f32
58fc2fd
edd4fca
f8801b9
c98b83c
001fa5c
0fbc778
185b22d
06c3b53
5fbf208
93d00b1
b8030ce
b1b2c15
fc8e258
a0bd04b
ff01c02
40456ec
58e8b96
a026341
bb6a6b4
768ba88
2901068
69cbeba
4eee1cf
a35b8af
29c30b9
6b4a438
2ff8309
890ee24
9b36393
288b0e3
e43ad49
0154927
b3a5ffe
22d8de7
2488460
5b78cf4
ee4dfb1
d0bc319
6ffeb44
127e1b5
59fb8a3
416ab31
c236326
056fb15
1b5c1cc
051c89b
d16bf52
6f211b6
96352c8
8f6b3f4
b100533
7de7fe6
bbe23e3
cc33167
8173c81
6195466
ee1891b
d2131bd
ae671d4
ccc1799
d535ae1
0bb5cf0
3040dfa
5413f84
84e8e79
f2b284d
75163e7
8f9980e
ce6be6c
0ade121
a4d3600
918c7b6
3b63ce5
f43c8a0
e6d1e46
1a928e6
d2e5904
c50c44b
16d99b3
188de15
a19c4ce
a804f51
f9e7030
7cd6d1b
ca5a37e
8e2ce35
1542e2e
574725d
91d420c
eeb9b9b
76b6e25
3b150cd
29f73f1
2df4ae2
d90e4a2
544dc68
9700c48
222cd92
70babe9
4e26565
fb97b14
112fb91
001be21
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm wondering if we can do it in more efficient/simpler way - let's discuss it.
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.
It's already simplified a lot comparing to initial version 😄 But I'm open for discussion. What is important here, we need to have all transactions (mix of blob and non-blob) in correct order, so we can't add blobs at the beginning or at the end.
In current implementation we are picking max possible number of blob transactions which can be included in the block (from Eip4844Constants - 6 blobs for now) and then we are iterating non-blob txs and adding blob txs in between according to priority fee, from highest to lowest
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.
Not sure if it's needed cos is already fast enough. But if we could sort SelectBlobTransactions firstly and pass it as iterator to PickBlobTxsBetterThanCurrentTx it might save some cycles, because it's seems more efficient to merge already sorted datas.
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.
It is already sorted.
PickBlobTxsBetterThanCurrentTx
in first step is comparing best blob tx with current std tx, if best blob tx is worse, than breaking thewhile
loop, not iterating and comparing moreThere 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.
you have to shift all the blob transactions each time, would be better to keep blob transactions in reverse order and remove last
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.
Why do we need to get full blob tx's here?
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.
Because in
TxPoolTxSource
we are working on light blob txs, without actual blobs. At the end we need to load full tx to include it to the blockThere 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.
why do we need to load full tx's?