-
Notifications
You must be signed in to change notification settings - Fork 58
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
Class TxHelpers Revision #529
Conversation
Beyond code review, this PR should be live-tested - including normal & private transactions. |
Has been and is being, for the past few weeks |
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.
code looks good to me, I didn't test it and I'd like more eyes other than mine
…astlane-bot into tx-helpers-revision
…ol/fastlane-bot into tx-helpers-revision
…ol/fastlane-bot into tx-helpers-revision
…ol/fastlane-bot into tx-helpers-revision
Reposted via #542 |
This PR includes several changes, mostly around coding simplification and performance improvements in the
TxHelpers
class, alongside a few related or partially-related cleanups in other modules.The main changes in the
TxHelpers
class are listed below, and only two of them - 1 and 6 - are expected to impact the actual Arb-Behavior of the bot:DEFAULT_GAS_PRICE_OFFSET
constant with agas_strategy
function.maxPriorityFee
via web3 instead of by sending an HTTP request to the node.gasPrice
instead of fetching the entire block in order to retrieve thebaseFee
.accessList
via web3 instead of by sending an HTTP request to the node.EXPECTED_GAS_MODIFIER
constant used for producing an optimistic gas consumption.eth_sendPrivateTransaction
HTTP requests via web3 instead of via the node.tx
dictionary manually and then set itsgas
attribute by callingestimate_gas
, instead of doing both of these things viabuild_transaction
; following that, set theaccessList
attribute in this dictionary, and possibly update itsgas
attribute, by callingcreate_access_list
; the gas-fee attributes (maxFeePerGas
andmaxPriorityFeePerGas
) are set only at the end, in order to avoid getting the "max fee per gas less than block base fee" error.