Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    phahulin
    @phahulin
    Hello one more time, sorry about the chat room changing.
    So I'll just briefly repeat that instructions are here: https://github.com/poanetwork/wiki/wiki/How-to-launch-POA-Network-bridged-to-stable-ERC20-coin
    Fabian Vogelsteller
    @frozeman
    hi
    just saw it now
    we are following the setup for a normal PoA network right now
    we would be later interested in the native bridge. But for now i would ask if we get questions concerning the basic PoA setup
    Fabian Vogelsteller
    @frozeman
    but basically its:
    1. start MoC node with precompiled contract
    2. deploy validator contracts, and make first validator and remove MoC address
    3. vote more in
    done
    right?
    Fabian Vogelsteller
    @frozeman
    when will the MoC be removed, to prevent that he can add more initial keys?
    varasev
    @varasev
    Hi Fabian, The steps above are correct except that MoC cannot be removed unless all 12 initial keys are initialized. After you initiate all 12 keys, you will be able to create a ballot to remove MoC.
    Fabian Vogelsteller
    @frozeman
    Which function is called to remove the moc?
    And we could simply change the threshold of the 12 keys. It’s in the KeysManager right?
    And after the moc is removed he can’t add initial keys and is not a mining address anymore?
    varasev
    @varasev

    Which function is called to remove the moc?

    Removing MoC (just like removing any other validator) is made by KeysManager.removeMiningKey function which is called by VotingToChangeKeys contract (when you finalize a corresponding ballot): https://github.com/poanetwork/poa-network-consensus-contracts/blob/b0fc8789850ef44f0eb0c277748415d3d194e94a/contracts/KeysManager.sol#L394

    And we could simply change the threshold of the 12 keys. It’s in the KeysManager right?

    Yes, you can change the constant of the threshold inside KeysManager.maxNumberOfInitialKeys getter before deploying contracts: https://github.com/poanetwork/poa-network-consensus-contracts/blob/b0fc8789850ef44f0eb0c277748415d3d194e94a/contracts/KeysManager.sol#L133

    And after the moc is removed he can’t add initial keys and is not a mining address anymore?

    Yes. Removed MoC means that the threshold defined in KeysManager.maxNumberOfInitialKeys has been reached, so KeysManager.initiateKeys function reverts in this case: https://github.com/poanetwork/poa-network-consensus-contracts/blob/b0fc8789850ef44f0eb0c277748415d3d194e94a/contracts/KeysManager.sol#L262

    MoC removing is only possible when the threshold is reached (https://github.com/poanetwork/poa-network-consensus-contracts/blob/b0fc8789850ef44f0eb0c277748415d3d194e94a/contracts/KeysManager.sol#L397).

    Fabian Vogelsteller
    @frozeman
    Thanks! Will have a look later
    Fabian Vogelsteller
    @frozeman
    Hi @varasev where is the min quorum set for voting on mining keys etc?
    i cant find it in the contracts
    Fabian Vogelsteller
    @frozeman
    ok we foudn ti its in deoploy_contracts.js here you guys pass ballotsStorage.init([3, 2]). What is ths first and the second value?
    varasev
    @varasev

    The first threshold value for BallotsStorage.init() is the threshold for keys (used by VotingToChangeKeys and VotingToChangeMinThreshold contracts), the second one - is for metadata changing (used by ValidatorMetadata contract).

    Thus, ballotsStorage.init([3, 2]) means that at least 3 validators need to vote for a ballot to make it finalizable. And 2 means that at least two validators need to confirm changes in ValidatorMetadata contract.

    Fabian Vogelsteller
    @frozeman
    thanks
    Fabian Vogelsteller
    @frozeman
    Does the MoC count in the initial keys where the max is set in the keymanager?
    Fabian Vogelsteller
    @frozeman
    We have the problem that we added two initial keys, set the max keys to 2 and can do any voting.
    When generating the 3 keys from the initial keys, only the first one was added as miner, but the second 3 keys not.
    any idea?
    varasev
    @varasev

    Does the MoC count in the initial keys where the max is set in the keymanager?

    No, you can have initial keys and MoC separately.

    We have the problem that we added two initial keys, set the max keys to 2 and can do any voting.

    You can create ballots anyway but can't finalize them if the threshold (which you set in BallotsStorage) is greater than the number of validators.

    When generating the 3 keys from the initial keys, only the first one was added as miner, but the second 3 keys not.
    any idea?

    Did you call KeysManager.initiateKeys function by MoC for each of your initial keys?

    Also make sure you called KeysManager.createKeys function by each of your initial keys (after calling of KeysManager.initiateKeys) to create mining/voting/payout keys associated with the initial key.

    When you call KeysManager.createKeys, only the _miningKey is added as validator: https://github.com/poanetwork/poa-network-consensus-contracts/blob/b0fc8789850ef44f0eb0c277748415d3d194e94a/contracts/KeysManager.sol#L292

    If you call KeysManager.createKeys and see it's reverted, check that you don't violate any of requirements inside KeysManager.createKeys: https://github.com/poanetwork/poa-network-consensus-contracts/blob/b0fc8789850ef44f0eb0c277748415d3d194e94a/contracts/KeysManager.sol#L277-L291

    You can check whether the miningKey is added or not using KeysManager.isMiningActive or PoaNetworkConsensus.isValidator.
    Fabian Vogelsteller
    @frozeman
    we used the key generation dapp and the moc scripts for generting the keys. Thanks for pointing me to the right code pieces we will have a look! @Leondroids did you see the above?
    Santosh A
    @elviric
    Any js source for creating xdai-chain wallet?
    Luke Duncan
    @lkngtn
    Hi!
    is this a good channel to ask questions?
    RANJI
    @1022ranji

    Hi team,
    Could anyone help me?
    I'm Ran Ji from the Crab Network team.
    Crab is an EVM-compatible Polkadot smart contract platform.
    We hope to be able to integrate with your project, users and developers will have access to developer tools and network statistics, which provide detailed "insights" into Crab's EVM. Developers will be able to see specific transfer records with tools such as smart contract execution and data collection.
    Who is the best person in your team to connect with and discuss how we can work together?

    Warmest regards,
    Ran Ji
    Product Manager @Itering Tech
    E-mail: ran.ji@itering.com
    https://www.itering.com/
    https://darwinia.network/
    https://crab.network/

    is this a good channel to ask questions?