Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why fees and rewards are included in block and transaction? #2

Closed
cryatk opened this issue Aug 18, 2018 · 5 comments
Closed

Why fees and rewards are included in block and transaction? #2

cryatk opened this issue Aug 18, 2018 · 5 comments

Comments

@cryatk
Copy link

cryatk commented Aug 18, 2018

As changes,

Why fees and rewards are included in block and transaction through core/types.go, core/types/block.go and so on.

What's the meaning of fees? I cannot understand why it is needed even if there is already gas.
What's the meaning of rewards? you cannot know how many people attested in mining.

There is no documentation and comments. It is one of the biggest change compared with go-ethereum. You should mention why.

@sadoci
Copy link

sadoci commented Aug 22, 2018

In Metadium, rewards (block reward + fees) are distributed according to stakes in the governance contract. Stakes in the previous block's governance contract are used. The exact way, including the exact block reward, is to be defined in governance contract. This is still in progress, if not obvious enough.

We believe this is necessary to satisfy our TPS requirement, at least several thousands per second.

@cryatk
Copy link
Author

cryatk commented Aug 22, 2018

I mean why they are on platform code-level? not contract as protocol. Then block producer can manipulate reward amount for them. Authorities have too many permissions.

Still I’m curious about fees, should user pay fee with gas? and why it makes TPS faster? What is difference with fee and gas

@sadoci
Copy link

sadoci commented Aug 23, 2018

Fees = Sum(tx.gasUsed * tx.gasPrice) is not the same as block.gasUsed.

For faster TPS, Metadium has greater gas limits and generates blocks immediately, which means that number of blocks, hence total amount of block rewards per given duration is not bounded. Hence the need of controlling block reward, which comes from governance contract for now for more flexibility, at least during testnet period.

If received block's fees and reward are incorrect, the block gets rejected.

In stock ethereum code, fees are awarded during evm execution, and block reward is awarded when a block gets in the chain. This model doesn't work with our reward model where reward (block reward + fees) is distributed among authorities according to stakes.

@cryatk
Copy link
Author

cryatk commented Aug 24, 2018

Did you think I do not know fee equation? No, why did you do that even if ethereum don’t adopt

Explanation for TPS is totally unacceptable. Gas limit is just limit, not computing power bound. How will you solve the problem technically compared with others such as Plasma

@cryatk
Copy link
Author

cryatk commented Sep 3, 2018

There is no more discussion lol. Amazing project and commiter @sadoci I cant believe

cp-wjhan pushed a commit to cp-wjhan/go-metadium that referenced this issue Jul 31, 2023
cp-wjhan pushed a commit to cp-wjhan/go-metadium that referenced this issue Aug 1, 2023
Merge pull request METADIUM#35 from wemixarchive/dev-0.10.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants