-
Notifications
You must be signed in to change notification settings - Fork 8
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
Depositor rework #164
Depositor rework #164
Conversation
ad9e9a0
to
5d14be5
Compare
4403e84
to
5d14be5
Compare
@F4ever some of your commits are unverified, pls check GPG |
Revert "Merge pull request #164 from lidofinance/feat/depositor-rework"
…or-rework"" This reverts commit 0e52d3f.
Revert "Revert "Merge pull request #164 from lidofinance/feat/deposit…
FLASHBOTS_RPC=https://relay-goerli.flashbots.net | ||
FLASHBOT_SIGNATURE=0xbb0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ffaa |
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.
We need to use other mempools that support sending private bundles. Flashbots are building less than a third of the mev blocks
Found this RPCs, but maybe there's more, need to research:
https://builder0x69.io
https://rpc.beaverbuild.org
https://relay.flashbots.net
https://rsync-builder.xyz
https://api.blocknative.com/v1/auction
https://mev.api.blxrbdn.com
https://eth-builder.com
https://builder.gmbit.co/rpc
https://buildai.net
https://rpc.payload.de
https://rpc.lightspeedbuilder.info
https://rpc.titanbuilder.xyz
https://rpc.nfactorial.xyz
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.
| RABBIT_MQ_URL | - | RabbitMQ url | | ||
| RABBIT_MQ_USERNAME | - | RabbitMQ username for virtualhost | | ||
| RABBIT_MQ_PASSWORD | - | RabbitMQ password for virtualhost | | ||
| -------------------------------------- | --- _kafka is not used at the moment_ --- | ----------------------------------------- | |
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.
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.
Fixed
#173
- Set WEB3_RPC_ENDPOINTS | ||
- Set WALLET_PRIVATE_KEY | ||
- Set CREATE_TRANSACTIONS to true | ||
- Set TRANSPORTS to rabbit |
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.
in many readme and sample.env (maybe somewhere else) the variable is listed as TRANSPORTS
but in the code MESSAGE_TRANSPORTS
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.
Fixed
@@ -0,0 +1,4256 @@ | |||
{ |
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.
We mostly use yarn (and therefore yarn.lock) in js/ts projects. I would suggest using it for consistency
guardians_list = self.w3.lido.deposit_security_module.get_guardians() | ||
|
||
def message_filter(message: DepositMessage) -> bool: | ||
if message['guardianAddress'] not in guardians_list: |
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.
looks like we have an unspoken convention here that guardians should send addresses as a checksum address. I would suggest to explicitly convert both addresses to the same formats
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.
Fixed #173
|
||
| ATTEST_MESSAGE_PREFIX | blockNumber | blockHash | depositRoot | stakingModuleId | nonce | | ||
""" | ||
response = self.functions.depositBufferedEther( |
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.
response -> tx
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.
Fixed
#173
is_active = self.w3.lido.staking_router.is_staking_module_active(module_id) | ||
is_deposits_paused = self.w3.lido.staking_router.is_staking_module_deposits_paused(module_id) | ||
return is_active and not is_deposits_paused |
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.
The pause check is excessive. A module can be in one of 3 states: active, deposits paused, stopped. Thus, if the module is active than deposits can not be paused
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.
Yeah, quite unexpected)
class StakingRouterContract(ContractInterface): | ||
abi_path = './interfaces/StakingRouter.json' | ||
|
||
def get_max_deposits_count( |
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.
unused duplicate for get_staking_module_deposits_count
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.
Fixed
return recommended_max_gas | ||
|
||
def _get_pending_base_fee(self): | ||
base_fee_per_gas = self.w3.eth.get_block('pending')['baseFeePerGas'] |
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.
If I remember correctly we had an issue with unavailability of pending block in some node during oracle development and used latest block because of it. Don't we want to make it more bulletproof here too?
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.
Yeah, found comment in Oracle about Erigon.
Just tested with Erigon - no exceptions found (maybe they fixed it).
I've done 1000 requests in 15 minutes - no issues.
No description provided.