from web3 import Web3
w3 = Web3(Web3.HTTPProvider('https://opt-mainnet.g.alchemy.com/v2/YOURAPIKEY'))
assert w3.isConnected()
tx_hash = '0x134b8e636baf60053503b5065b5493e5bdd2d67c0e760c265fcc79ef554be02f'Syncing an Ethereum node is largely reliant on IOPS, I/O Per Second. Budget SSDs will struggle to an extent, and some won't be able to sync at all.
This document aims to snapshot some known good and known bad models.
For size, 2TB come recommended as of mid-2022. 1TB can work for now but is getting tight.
High-level, QLC and DRAMless are far slower than "mainstream" SSDs.
Geth (Go-Ethereum) as of July 2022 takes about 650 GiB of space on a fast/snap sync, and then grows by ~ 14 GiB/week with default cache, ~ 8 GiB/week with more cache.
This will fill a 1TB SSD in a few months, to the point where space usage should be brought down again with an offline prune.
There is an odd behavior with Geth 1.10.20 where initial DB size is large after sync until Geth has been restarted twice. This is expected to be fixed soon, possibly as soon as 1.10.21.
Happily, Geth 1.10.x introduces "snapshot offline prune", which brings it back down to about its original size. It takes roughly 4-6 hours to prune the Geth database, and this has to be done while Geth is not running.
Caveat that while several folx have used offline pruning successfully, there is risk associated with it. The two failure mode
Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target| """ | |
| there should be an instance with hardhat running at localhost port 8547 | |
| """ | |
| import os | |
| from dotenv import load_dotenv | |
| from web3 import Web3 | |
| from web3.types import RPCEndpoint | |
| load_dotenv() |
| import concurrent.futures | |
| import logging | |
| import time | |
| from random import randrange | |
| from timeit import default_timer as timer | |
| import redis | |
| from redis_wrapper.definitions import REDIS_CONN0 | |
| lredis: redis = redis.Redis(**REDIS_CONN0) |
| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.6.6 <0.9.0; | |
| import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; | |
| contract FundMe{ | |
| mapping(address => uint256) public addressToAmountFunded; | |
| address[] public funders; |
| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.6.6 <0.9.0; | |
| import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; | |
| contract FundMe{ | |
| mapping(address => uint256) public addressToAmountFunded; | |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface AggregatorV3Interface { | |
| function decimals() | |
| external | |
| view | |
| returns ( | |
| uint8 |