Infura überträgt meine Transaktionen nicht

Ich verwende Infura mit dem Mainnet und web3py, um mit Smart Contracts zu interagieren und Transaktionen zu senden. Letzte Woche hat derselbe Code einwandfrei funktioniert, aber heute, als ich versuche, die Transaktion für die Bereitstellung des Vertrags zu senden, erhalte ich diese Fehlermeldung in der Methode waitForTransactionReceipt:

File "pruebaPagos.py", line 303, in <module>
tempsensorContract, w3, nonce = construirContrato()
File "pruebaPagos.py", line 139, in construirContrato
tx_receipt = w3.eth.waitForTransactionReceipt(tx)
File "/root/Proyectos/bchain/rafa-py3/local/lib/python3.5/site-packages/web3/eth.py", line 223, in waitForTransactionReceipt
return wait_for_transaction_receipt(self.web3, transaction_hash, timeout)
File "/root/Proyectos/bchain/rafa-py3/local/lib/python3.5/site-packages/web3/utils/transactions.py", line 70, in wait_for_transaction_receipt
_timeout.sleep(poll_latency)
File "/root/Proyectos/bchain/rafa-py3/local/lib/python3.5/site-packages/web3/utils/threads.py", line 68, in sleep
self.check()
File "/root/Proyectos/bchain/rafa-py3/local/lib/python3.5/site-packages/web3/utils/threads.py", line 61, in check
raise self
web3.utils.threads.Timeout: 120 seconds

Unten ist mein Python-Code, der web3 für die Bereitstellung des Vertrags verwendet. Ich habe versucht, verschiedene Gaspreise anzugeben, aber es funktioniert auch nicht. Weiß jemand was hier los ist? Ist das ein Infura-Problem?

contract_source_code = '''
   #my solidity source code
'''

compiled_sol = compile_source(contract_source_code)
contract_interface = compiled_sol['<stdin>:tempSensor']

#connection to infura
w3 = Web3(HTTPProvider('https://mainnet.infura.io/MY-API-KEY'))


from web3.middleware import geth_poa_middleware

w3.middleware_stack.inject(geth_poa_middleware, layer=0)

count =  w3.eth.getTransactionCount(account,"pending") 

gasPrice = w3.toWei('3.5','gwei')

#creating the contract and its transaction for the deployment
TempSensor = w3.eth.contract(abi=contract_interface['abi'], bytecode=contract_interface['bin'])
transaction = TempSensor.constructor().buildTransaction({
        'gas': w3.toHex(850000),
        'gasPrice': w3.toHex(gasPrice),
        'nonce': w3.toHex(count),
    })

#sign the transaction and send
key = 'PRIVATE-KEY'
signed = w3.eth.account.signTransaction(transaction, key)
tx = w3.eth.sendRawTransaction(Web3.toHex(signed.rawTransaction))
print('Transaction for the deployment:')
print(Web3.toHex(tx))

tx_receipt = w3.eth.waitForTransactionReceipt(tx)

tempsensorContract = w3.eth.contract(
    address = tx_receipt.contractAddress,
    abi = contract_interface['abi'],
)

In etherscan.io kann es nicht einmal meinen Transaktionshash finden. Es sagt:

  • Leider können wir diesen Transaktions-Hash nicht finden

Antworten (1)

Der aktuelle Netzgaspreis beträgt ~60 gwei. Ihre Transaktion wird wahrscheinlich übertragen, aber Ihr Skript läuft ab, während es darauf wartet, dass es abgebaut wird, da es aufgrund eines niedrigen Gaspreises in den nächsten 120 Sekunden nicht abgebaut wird.

Ebenso indexiert Etherscan häufig keine Transaktionen, die derzeit weit unter dem Netzwerkgaspreis liegen.

Aber ich weiß nicht, warum letzte Woche jede Transaktion, die ich mit weniger als 10 Gwei Gaspreis getätigt habe, in weniger als einer Minute übertragen wurde. Und weiß, dass es das nicht ist.
Der Gaspreis war letzte Woche niedriger.
Danke, gibt es eine Seite, auf der ich den aktuellen Gaspreis und den Gaspreis der letzten Wochen sehen kann?
Sie können die aktuelle auf ethgasstation.info sehen , nicht sicher über historische Quellen