Sorry for dumb question..
What is current delay between a new transaction on eth and It actually registered on block? I have a webapp that perform a call on a Smart contract (adding a data to a dictionary) on frontend and then check that transaction on backend for security purposes ( checking if the record has been added) Can I check it immediately or do I have to handle some delay?

Jul 16, 2022, 8:26 PM
Turns out that telling the entire world about what you did and also getting it to agree with you that no one else just did that takes more time than telling 1 server what you just did
Jul 16, 2022, 8:32 PM
you can wait for tx receipt. If you want to be sure that the block reorganization won't happen you can add a delay in block. Recommended delay in blocks differ from chain to chain
Jul 16, 2022, 8:34 PM
Obviously, but the operativity of the app need the "trustability" of the c'hai
Ok that could be my case
Even sending eth can be delayed, right?
Jul 16, 2022, 8:44 PM
wdym?
Jul 16, 2022, 8:46 PM
If I send Eth to an address, do they arrive immediately?
Jul 16, 2022, 8:48 PM
as soon as the tx is mined
Jul 16, 2022, 8:48 PM
You need to wait for the block to be mined and also, depending on your application, wait for a certain number of confirmations so that the chances of a chain reorg are low. I believe on eth1 mainnet 35 or so is the standard due to the nature of probabilistic finality and the fact that eth has 15 second blocks
Jul 16, 2022, 8:48 PM
So my time would be around 35 seconds delay? That would be totally acceptable
Jul 16, 2022, 8:51 PM
wont advice you use time, adding transactions to a block is determined by network congestion you can always check transactions status to know if it has been mined.
Jul 16, 2022, 8:55 PM
Thanks a lot everybody, I'll further investigate :)
Jul 16, 2022, 8:56 PM
35 block confirmations
35*15/60 = number of minutes. But use confirmations since block mine time can vary greatly
Jul 16, 2022, 8:57 PM
I'd have expected it to be the same but only the compiler knows how and why he does stuff
but idk if there would be changes in gas or if they produce same bytecode
Jul 16, 2022, 9:03 PM
so far i can read you deployment values in bytecode then bro don't keep any secret on chain.
Jul 16, 2022, 9:08 PM
good things would be to hash them or encrypt them, but even there I would not recommend storing a secret onchain
reading the slots in storage of the contract
Jul 16, 2022, 9:26 PM

© 2024 Draquery.com All rights reserved.