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 ответов

15 просмотров
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.

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

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

а через ESC-код ?
Alexey Kulakov
29
30500 за редактор? )
Владимир
47
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
Как передать управляющий символ в открытую через CreateProcess консоль? Собсна, есть процедура: procedure TRedirectThread.WriteData(Data: OEMString); var Written: Cardinal;...
Serjone
6
в JclConsole объявлено так: function CtrlHandler(CtrlType: DWORD): BOOL; stdcall; - где ваше объявление с stdcall? у вас на картинке нет stdcall
Karagy
8
Ребят в СИ можно реализовать ООП?
Николай
33
program test; {$mode delphi} procedure proc(v: int32); overload; begin end; procedure proc(v: int64); overload; begin end; var x: uint64; begin proc(x); end. Уж не знаю...
notme
6
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
Карта сайта