Skip to content

Instantly share code, notes, and snippets.

Oracle startup.
Start healthcheck server for Docker container on port 9010
Start http server with prometheus metrics on port 9000
Initialize multi web3 provider.
Initialize FallbackProviderModule
Modify web3 with custom contract function call.
Initialize consensus client.
Initialize keys api client.
Add metrics middleware for ETH1 requests.
Sanity checks.
TL;DR
* CL Balance - 7880439030063898 Gwei
* Validator count - 247929
* Exited validators - 1739
# from line 47 above:
(1, 6984000, 247929, 7880438321299961, [1], [1739], 290361781563000000000, 348985722707450082758, 0, [5465], 1133893924749520071100361053, False, 0, HexBytes('0x0000000000000000000000000000000000000000000000000000000000000000'), 0)
This corresponds to
ReportData(
from hashlib import sha256
def to_hash_block(value: int) -> bytes:
return value.to_bytes(16 * 2, "little", signed=False)
hasher = sha256()
print(to_hash_block(1).hex())
print(to_hash_block(2).hex())
hasher.update(to_hash_block(1))
hasher.update(to_hash_block(2))