ethereum / sharding

Sharding manager contract, and related software and tests
480 stars 105 forks source link

SMC: missing notary deposit #80

Closed hwwhww closed 6 years ago

hwwhww commented 6 years ago

What is wrong?

It seems the balance storage is forgotten...? But might only worthwhile to fix if there will be slashing condition for the notaries. Right now I just add it to backlogs, not a high priority.

How can it be fixed

notary_registry: should be notary_registry: {deregistered: int128, pool_index: int128, deposit: wei_value}[address]. https://github.com/ethereum/sharding/blob/38f437ca2e942cccf551faa1d5090108fc4ebde4/contracts/validator_manager.v.py#L37-L40

When release_notary: should return the balances instead of NOTARY_DEPOSIT: https://github.com/ethereum/sharding/blob/38f437ca2e942cccf551faa1d5090108fc4ebde4/contracts/validator_manager.v.py#L230

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.08 ETH (58.27 USD @ $728.39/ETH) attached to it.

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 8 months, 4 weeks ago. Please review their action plans below:

1) dilatebrave has started work.

I will keep informed every few days

Learn more on the Gitcoin Issue Details page.

hwwhww commented 6 years ago

Hi @dilatebrave! This ticket has two parts:

  1. Update Vyper code:
    • Adding deposit: wei_value field in notary_registry to store the deposit size. (msg.value)
    • Updating logic that related to deposit, refund deposit when release_notary.
  2. Upload json file bytecode

Note that Vyper version we are using is: https://github.com/ethereum/sharding/blob/cb8f5b54a20dc95e48f000ab549405c0353f11fc/requirements-dev.txt#L11

Thanks! Feel free to ask question here.

dilatebrave commented 6 years ago

@hwwhww --- thanks a lot but i can not view https://hackmd.io/s/BysXg663M

hwwhww commented 6 years ago

@dilatebrave Sorry! We just updated the permission, can you view it now?

dilatebrave commented 6 years ago

@hwwhww --- thanks a lot ^^ my previous commit use https://vyper.readthedocs.io/en/latest/compiling-a-contract.html to compile, it looks like the result are the same so i think it done

hwwhww commented 6 years ago

Thanks, @dilatebrave!

@vs77bb LGTM to pay @dilatebrave. 👍

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 0.08 ETH (58.66 USD @ $733.26/ETH) has been submitted by:

  1. @dilatebrave

@vs77bb please take a look at the submitted work:


gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 0.08 ETH (58.55 USD @ $731.87/ETH) attached to this issue has been approved & issued to @dilatebrave.

vs77bb commented 6 years ago

@hwwhww Bounty funds have been released! Great work, @dilatebrave 😄