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

linea_sendBundle #135

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

garyschulte
Copy link
Contributor

@garyschulte garyschulte commented Jan 28, 2025

plugin for linea_sendBundle, endpoints:

linea_sendBundle implements eth_sendBundle interface
linea_cancelBundle implements eth_cancelBundle interface

Notably linea_sendBundle does not implement any behavior for builders . Otherwise feature complete, but PR is in draft state awaiting upstream plugin-api changes in linea-besu that support this endpoint.

example usages:
linea_sendBundle:

curl --location 'http://localhost:8545' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc":"2.0",
    "method":"linea_sendBundle",
    "params":[
        {
        "txs": [
         "0xf84f01821388825208800480820a96a05e69dba6b4413db2df32614646adf27c5774bf49c69ce6fef7a82df426514541a0754f79cba2c3353338496c2ccce98a4457e1ca0b6de4e79456e6619a9832a9e7"],
        "blockNumber": "0x962FC1",
        "minTimestamp": 1738356642,
        "maxTimestamp": 1758356642,
        "revertingTxHashes": [],
        "replacementUUID": "c00f29c8-9763-4254-93fe-88d217edddca",
        "builders" : []
        }
        ],
    "id":1
}'

linea_cancelBundle:

curl --location 'http://localhost:8545' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc":"2.0",
    "method":"linea_cancelBundle",
    "params":["c00f29c8-9763-4254-93fe-88d217edddca"],
    "id":1
}'

Copy link

cla-assistant bot commented Jan 28, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

cla-assistant bot commented Jan 28, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@fab-10 fab-10 left a comment

Choose a reason for hiding this comment

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

Looks very promising, I added a couple of comments and will adjust the API accordingly

Comment on lines 178 to 220
private int calculateWeight(TransactionBundle bundle) {
return bundle.pendingTransactions.stream()
.mapToInt(pt -> pt.getTransaction().getPayload().size())
.sum();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

PendingTransaction has a better way to compute the estimated memory size

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used Transaction:getSize for now, since the PendingTransaction interface doesn't export memorySize()

@garyschulte garyschulte force-pushed the feature/linea-send-bundle branch 2 times, most recently from 6347c4f to 67bfbe1 Compare January 29, 2025 23:47
outstanding work on creating a shared singleton bundle pool before we can smoke test the endpoint.

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte force-pushed the feature/linea-send-bundle branch from b28c5a9 to 3e47c80 Compare January 30, 2025 22:46
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
…ization issues

Signed-off-by: garyschulte <garyschulte@gmail.com>
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