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

Initial reference implementations #6

Open
owocki opened this issue Mar 5, 2019 · 14 comments
Open

Initial reference implementations #6

owocki opened this issue Mar 5, 2019 · 14 comments
Assignees
Labels
Implementation Tech, EIP talk, code

Comments

@owocki
Copy link

owocki commented Mar 5, 2019

No description provided.

owocki pushed a commit that referenced this issue Mar 8, 2019
* init

* permissions init

* start of permissions service

* Token Validator (#6)

* File naming convention

* Remove previous versions

* remove reference to the old variable

* Update frontmatter as per @Arachnid

* Switch to byte
@lrettig
Copy link
Collaborator

lrettig commented Mar 11, 2019

I intend to implement this myself in Trinity this week, to start. I don't think it will be too complex. (Famous last words.)

@lrettig lrettig self-assigned this Mar 11, 2019
@lrettig
Copy link
Collaborator

lrettig commented Mar 12, 2019

Responding to @GregTheGreek's comment from #5:

@lrettig The idea was to come up with a way to introduce it to protocol level without having to add an additional TX to the block. The problem I identified was thats we need to be able to verify that the amount to be transferred is correct. I've been going through what i wrote and it adds a huge state size overhead, an extra ~115.2kb / day (i believe), which is a bit counterintuitive to the goal.

Could you share this math/code? Why do you think adding one tx per block is such a big deal?

to address the DAO issue, my idea is baked into the concept that every miner has the option of where to send it to. That way they can choose the individual or DAO of choice.

I don't think miners should have an option where to send the reward. I think that should be specified and hardcoded in-protocol to begin. @owocki and I have discussed this a bunch but governance over where the funds go, and what the percentage gets set to, will be contentious so the simplest thing to do in the beginning is to hardcode things in-protocol (so that they can only be changed via a hard fork).

(If miners have the choice where to send it, they could opt to send it to themselves, thus bypassing the tax completely. This is counter to the idea of a community fund.)

@lrettig lrettig changed the title Build Reference Clients Trinity reference implementation Mar 12, 2019
@GregTheGreek
Copy link

@lrettig

Could you share this math/code? Why do you think adding one tx per block is such a big deal?

The ~115kb was in reference to expanding the extra_data field from 32 bytes to 64 bytes.

I don't think miners should have an option where to send the reward. I think that should be specified and hardcoded in-protocol to begin. @owocki and I have discussed this a bunch but governance over where the funds go, and what the percentage gets set to, will be contentious so the simplest thing to do in the beginning is to hardcode things in-protocol (so that they can only be changed via a hard fork).

100% i agree with you, but I didn't really view it as a tax rather as an option. As a tax, it would be very simple to implement I could provide an example in for you on the go-ethereum code base :) I've actually done this before for a client!

@lrettig
Copy link
Collaborator

lrettig commented Mar 12, 2019

Good. I'll do it in Trinity, you do it in geth, I check your code, you check my code, bada-bing, bada-boom, we have two reference implementations. Race you. Go!

@GregTheGreek
Copy link

EIP coding competitions. I love it

@lrettig
Copy link
Collaborator

lrettig commented Mar 12, 2019

It's a thing now. EIP codeathon.

@GregTheGreek
Copy link

GregTheGreek commented Mar 12, 2019

@lrettig soooo here it is without any tests:
Made an assumption, that instead of reducing the fee with a percent (i.e 10% tax on 2 ETH reward) I just reduced the reward constant to prevent the additional computation.

Here's the commit

EDIT: Update commit hash

@lrettig lrettig changed the title Trinity reference implementation Initial reference implementations Mar 12, 2019
lrettig added a commit to lrettig/py-evm that referenced this issue Mar 12, 2019
@lrettig
Copy link
Collaborator

lrettig commented Mar 12, 2019

Here's the initial reference implementation in Trinity: lrettig/py-evm@ee5a23f

@GregTheGreek
Copy link

@lrettig Looks good to me!

@owocki
Copy link
Author

owocki commented Mar 12, 2019

@GregTheGreek @lrettig

Forgive the naive question, but is it enough to build a fee into each individual client? How do other client's that are validating the blocks produced validate that the fee went to the right beneficiary and for the right amount? It would seem we need to protect against some rogue client sending 100000 ETH to a bad beneficiary! Do we need to add some code that validates blocks by other miners, that they've correctly added the fee?

@lrettig
Copy link
Collaborator

lrettig commented Mar 12, 2019

All of the changes we've made here are in-protocol. That means that all clients must agree on them and implement the exact same change or we have a consensus failure.

Simple right? That's the beauty of the protocol 😇

@gitcoinbot
Copy link

Eth Hacker ⚡️ A *Eth Hacker* Kudos has been sent to @lrettig for this issue from @owocki. ⚡️

The sender had the following public comments:

trinity client mod is awesome!

Nice work @lrettig!
Your Kudos has automatically been sent in the ETH address we have on file.

@gitcoinbot
Copy link

Eth Hacker ⚡️ A *Eth Hacker* Kudos has been sent to @GregTheGreek for this issue from @owocki. ⚡️

The sender had the following public comments:

yay, thanks for the client mod! :)

Nice work @GregTheGreek!
To redeem your Kudos, login to Gitcoin at https://gitcoin.co/explorer and select 'Claim Kudos' from dropdown menu in the top right, or check your email for a link to the Kudos redemption page.

@GregTheGreek
Copy link

@owocki To add to Lane's comment. This version would mean its a fixed number to a fixed address. So everyone would need to agree with it!

If you want it to be dynamic, so that anyone could chose their how much and where to send, it gets quite complicated and requires a more extensive mods. Which I eluded to in previous discussions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation Tech, EIP talk, code
Projects
None yet
Development

No branches or pull requests

5 participants