Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Conversation

@Ruteri
Copy link
Collaborator

@Ruteri Ruteri commented Jan 2, 2023

📝 Summary

Introduces bundle replacement and cancellation via replacementUuid.
Since the replacement is tied to a specific sender, eth_sendBundle gets two additional optional fields: the replacement uuid and the signingAddress of the bundle submission.
func (b *EthAPIBackend) SendBundle(ctx context.Context, txs types.Transactions, blockNumber rpc.BlockNumber, uuid uuid.UUID, signingAddress common.Address, minTimestamp uint64, maxTimestamp uint64, revertingTxHashes []common.Hash) error.

The DB requests are done in the background, and cancellations are resolved while non-cancelable bundles are already being simulated to avoid waiting for DB to reply.
If anything goes wrong with the cancellations, the cancelable bundles are not considered.

Note: every block is now sent to the relay, as we can no longer rely on the highest-profit rule!

📚 References

Cancellations docs: https://github.com/flashbots/flashbots-docs/pull/317/files


insertBuiltBlockStmt *sqlx.NamedStmt
insertMissingBundleStmt *sqlx.NamedStmt
fetchPrioBundlesStmt *sqlx.NamedStmt
fetchGetLatestUuidBundles *sqlx.NamedStmt
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpicking : to make it consistent

Suggested change
fetchGetLatestUuidBundles *sqlx.NamedStmt
fetchGetLatestUuidBundlesStmt *sqlx.NamedStmt

}

return simBundles, nil
ccBundles := <-ccBundlesCh
Copy link

@hsouf hsouf Jan 2, 2023

Choose a reason for hiding this comment

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

Nitpick: I wouldn't separate the simulation of bundles here, as long as I don't return simBundles & simCcBundles separately. But I would add a log to give an insight on the size of simCcBundles.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The bundles coming from the channel are not ready when we start the simulation of the other bundles, it can take up to few ms for the channel to be ready.

@cgebe
Copy link

cgebe commented Jan 9, 2023

What is actually the reason to submit the block every 500ms. From experience the best block is usually built in the last second of the slot time. Wouldn't it be more efficient to start the building job in the last third or quarter to reduce load on the relays?

@Ruteri
Copy link
Collaborator Author

Ruteri commented Jan 16, 2023

What is actually the reason to submit the block every 500ms. From experience the best block is usually built in the last second of the slot time. Wouldn't it be more efficient to start the building job in the last third or quarter to reduce load on the relays?

The builder doesn't know when is the proposer going to request the block. The proposer is free to chose any time they want.

@Ruteri Ruteri merged commit 8caba1f into main Jan 16, 2023
@Ruteri Ruteri deleted the bundle-cancellations branch January 16, 2023 15:07
avalonche pushed a commit that referenced this pull request Feb 7, 2023
* miner logs
* builder logs
avalonche pushed a commit that referenced this pull request Feb 7, 2023
Introduces bundle replacement and cancellation via replacementUuid.
Since the replacement is tied to a specific sender, eth_sendBundle gets two additional optional fields: the replacement uuid and the signingAddress of the bundle submission.

The DB requests are done in the background, and cancellations are resolved while non-cancelable bundles are already being simulated to avoid waiting for DB to reply.
If anything goes wrong with the cancellations, the cancelable bundles are not considered.

Note: every block is now sent to the relay, as we can no longer rely on the highest-profit rule!
avalonche pushed a commit that referenced this pull request Mar 9, 2023
* miner logs
* builder logs
avalonche pushed a commit that referenced this pull request Mar 9, 2023
Introduces bundle replacement and cancellation via replacementUuid.
Since the replacement is tied to a specific sender, eth_sendBundle gets two additional optional fields: the replacement uuid and the signingAddress of the bundle submission.

The DB requests are done in the background, and cancellations are resolved while non-cancelable bundles are already being simulated to avoid waiting for DB to reply.
If anything goes wrong with the cancellations, the cancelable bundles are not considered.

Note: every block is now sent to the relay, as we can no longer rely on the highest-profit rule!
avalonche pushed a commit that referenced this pull request Mar 15, 2023
* miner logs
* builder logs
avalonche pushed a commit that referenced this pull request Mar 15, 2023
Introduces bundle replacement and cancellation via replacementUuid.
Since the replacement is tied to a specific sender, eth_sendBundle gets two additional optional fields: the replacement uuid and the signingAddress of the bundle submission.

The DB requests are done in the background, and cancellations are resolved while non-cancelable bundles are already being simulated to avoid waiting for DB to reply.
If anything goes wrong with the cancellations, the cancelable bundles are not considered.

Note: every block is now sent to the relay, as we can no longer rely on the highest-profit rule!
avalonche pushed a commit that referenced this pull request Mar 17, 2023
* miner logs
* builder logs
avalonche pushed a commit that referenced this pull request Mar 17, 2023
Introduces bundle replacement and cancellation via replacementUuid.
Since the replacement is tied to a specific sender, eth_sendBundle gets two additional optional fields: the replacement uuid and the signingAddress of the bundle submission.

The DB requests are done in the background, and cancellations are resolved while non-cancelable bundles are already being simulated to avoid waiting for DB to reply.
If anything goes wrong with the cancellations, the cancelable bundles are not considered.

Note: every block is now sent to the relay, as we can no longer rely on the highest-profit rule!
avalonche pushed a commit that referenced this pull request Mar 22, 2023
* miner logs
* builder logs
avalonche pushed a commit that referenced this pull request Mar 22, 2023
Introduces bundle replacement and cancellation via replacementUuid.
Since the replacement is tied to a specific sender, eth_sendBundle gets two additional optional fields: the replacement uuid and the signingAddress of the bundle submission.

The DB requests are done in the background, and cancellations are resolved while non-cancelable bundles are already being simulated to avoid waiting for DB to reply.
If anything goes wrong with the cancellations, the cancelable bundles are not considered.

Note: every block is now sent to the relay, as we can no longer rely on the highest-profit rule!
avalonche pushed a commit that referenced this pull request Jul 6, 2023
* miner logs
* builder logs
avalonche pushed a commit that referenced this pull request Jul 6, 2023
Introduces bundle replacement and cancellation via replacementUuid.
Since the replacement is tied to a specific sender, eth_sendBundle gets two additional optional fields: the replacement uuid and the signingAddress of the bundle submission.

The DB requests are done in the background, and cancellations are resolved while non-cancelable bundles are already being simulated to avoid waiting for DB to reply.
If anything goes wrong with the cancellations, the cancelable bundles are not considered.

Note: every block is now sent to the relay, as we can no longer rely on the highest-profit rule!
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants