Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

[permission] finalizeChange is not being called in validator contract #9485

Closed
KimiWu123 opened this issue Sep 6, 2018 · 10 comments
Closed
Labels
M4-core ⛓ Core client code / Rust. Z1-question 🙋‍♀️ Issue is a question. Closer should answer.
Milestone

Comments

@KimiWu123
Copy link

Before filing a new issue, please provide the following information.

  • Parity Ethereum version: 2.0.3-beta-a0a2bed-20180831
  • Operating system: Linux
  • Installation: one-line installer
  • Network: private

I followed this wiki post to create my validator contract and I checked issue#9131. I can see InitiateChange event, but my validator address is still in pending list not validator list. My validator contract is based on here.
Here is my genesis,

"engine": {
        "tendermint": {
            "params": {
               "gasLimitBoundDivisor": "0x400",
                "validators" : {
                   "multi": {
                       "0": {
                           "list": [
                               "0x452e132dad56f288b0bbbd956b064778578cfc71"
                           ]
                       },
                       "100": {
                           "contract": "0x0000000000000000000000000000000000000006"
                       }
                   }
               }
            }
       }
    },

And I set force-sealing to true as comment in issue #9193. Now I only have one node because I just want to verify this functionality. Is it okay?

@Tbaut
Copy link
Contributor

Tbaut commented Sep 6, 2018

You genesis uses tendermint consensus that is not supported anymore. You need to use authorityRound as seen here: https://wiki.parity.io/Pluggable-Consensus

@Tbaut Tbaut added Z1-question 🙋‍♀️ Issue is a question. Closer should answer. M4-core ⛓ Core client code / Rust. labels Sep 6, 2018
@Tbaut Tbaut added this to the 2.1 milestone Sep 6, 2018
@KimiWu123
Copy link
Author

Oh! Thank you. That's why I only can get genesis sample of tendermint on StackOverflow... There are a lot of "not update to date" information on the Internet. Suggest you to comment "tendermint" as deprecated in you wiki. Thanks.

@KimiWu123
Copy link
Author

@Tbaut , In permission page, Tendermint is still in your validator set list, That's why I thought it is supported now.

@KimiWu123 KimiWu123 reopened this Sep 7, 2018
@KimiWu123
Copy link
Author

It's still not working after I use authorityRound. Basically, my validator contract copies from issue 9193 and remove all modifier for verifying.

My genesis is like,

"engine": {
       "authorityRound": {
           "params": {
               "stepDuration": "3",
               "blockReward": 1000000000000000000,
               "validators" : {
                   "multi": {
                       "0": {
                           "list": [
                               "0x452e132dad56f288b0bbbd956b064778578cfc71"
                           ]
                       },
                       "100": {
                           "contract": "0x0000000000000000000000000000000000000006"
                       }
                   }
               }
           }
       }
    }

finalizeChange is still not being called. I still use one node only. Any helps would be appreciate.

@KimiWu123
Copy link
Author

I found finalizeChange is only called after the validator contract is enabled which means 100th block in my case.
Another quick question, is it allowed to remove validators? I remove the pending list and emit InitiateChange successfully. However, finalizeChange is still not being called.

@Tbaut
Copy link
Contributor

Tbaut commented Sep 7, 2018

In permission page, Tendermint is still in your validator set list, That's why I thought it is supported now.

Thanks for the heads-up, I fixed it.

is it allowed to remove validators?

yes

I remove the pending list and emit InitiateChange successfully. However, finalizeChange is still not being called.

How many validators do you have? What kind of change do you do, like just removing one? The change must be signed by 2/3 of the validators right?

@KimiWu123
Copy link
Author

Oh! I didn't realize that it needs to be signed by 2/3 validators . I have 3 validators, 2 of them are active, and want to remove one. It's not allowed, right?! Thanks for your answer.

@Tbaut
Copy link
Contributor

Tbaut commented Sep 9, 2018

Sorry, my mistake, it need the approval of 51% at least. This is not related to the amount of validators, you can switch to 1 validator if you wish to, just that 51% of the validators need to be online and sign on this.

@KimiWu123
Copy link
Author

Got it! thanks for your explanation. Could you please provide the link about the rule of approval of 51%? I think I missed it. Thanks.

@Tbaut
Copy link
Contributor

Tbaut commented Sep 11, 2018

You can find it under Finality in the following article, it's expressed with >n/2 with n the number of validators: https://wiki.parity.io/Aura

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
M4-core ⛓ Core client code / Rust. Z1-question 🙋‍♀️ Issue is a question. Closer should answer.
Projects
None yet
Development

No branches or pull requests

2 participants