169 похожих чатов

Let’s say I’m bad miner and I executed contract incorrectly

but I properly calculated all balances and hashes. Who will say too me that I’m wrong? Someone have to execute that contract too to check my result

11 ответов

17 просмотров
Phil-Star Автор вопроса

Who in the blockchain checks smart contacts executed right? Or maybe it’s unnecessary?

Phil Star
Who in the blockchain checks smart contacts execut...

All nodes check the txns. If a miner submits a bad block, all good nodes would reject it. And likely the miner would be blacklisted.

Phil-Star Автор вопроса

So everyone executes smart contracts after miner to proof that he do it right?

Phil-Star Автор вопроса
Phil Star
So everyone executes smart contracts after miner t...

But gas goes only to the miner? Am I right? Or how all other nodes trust to miner without actually execute the contracts?

Phil Star
But gas goes only to the miner? Am I right? Or how...

Yes the gas goes to the miner who submitted the correct block. The hard part is not executing the transactions, so the miner puts profitable txns in the block and then solves the hash and then submits it hopefully faster than any other miner.

Yes, I am pretty sure that is correct. As I said, the gas from txns in a block goes to the miner who submitted the block.

Phil-Star Автор вопроса
William Oney
Yes, I am pretty sure that is correct. As I said,...

Yes, ok. What I’m bothering is that If you need to validate long fork for example in the bitcoin it easy to do, but in the “evm” blockchains it is much harder, because you should not just check simple transactions but also run plenty of the smart contracts that was previously executed by miners

Phil Star
Yes, ok. What I’m bothering is that If you need to...

In what circumstance would you feel you need to validate historical txns?

Phil-Star Автор вопроса
William Oney
In what circumstance would you feel you need to va...

In real life this is probably not needed, but there could potentially be a long fork that needs to be tested.

Phil Star
In real life this is probably not needed, but ther...

Well, in practice, it really doesn't matter if historic transactions and chain state content is valid or not... the only thing that matters is what the majority of nodes on the network agree on. In this way you can change everything about the chain so long as the majority of nodes want to make the same changes. But yes, to execute every txn ever would certainly take a long time, perhaps days or weeks. I think it takes a week to sync a full node, but probably depends on hardware.

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
14
Добрый день! Скажите пожалуйста, а какие программы вы бы рекомендовали написать для того, чтобы научиться управлять памятью? Можно написать динамический массив, можно связный ...
Филипп
7
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
Ребят в СИ можно реализовать ООП?
Николай
33
https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_h_common.erl#L174 https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_olp.erl#L76 15 лет назад...
Maksim Lapshin
20
Карта сайта