Skip to content
New issue

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

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

Already on GitHub? # to your account

Add miners whitelist to testnet configs #815

Merged
merged 3 commits into from
Nov 30, 2020
Merged

Add miners whitelist to testnet configs #815

merged 3 commits into from
Nov 30, 2020

Conversation

kaii-zen
Copy link
Contributor

@kaii-zen kaii-zen commented Nov 26, 2020

  • Adds a json file with a pool of 1000 public keys allowed to mine
  • Includes that file into the default configuration of the nomad and gac testnets
  • Sets the default consensus.protocol for both testnets (in base-testnet.conf)
    to restricted-ethash in order to enable whitelist.

Tested that a newly deployed gac-based testnet whose miners are not in the whitelist remains at block 0.

@@ -0,0 +1,1004 @@
{
"allowed-miners": [
"006f366775cd73455ee7f208d8dc258ba7c1d48645ef2f4aeef7024652ac10205aed36bfc594e85021acc216762e7ab75f7759a815409f37d05e863651920091",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

long list hehe :P

@@ -149,3 +149,5 @@
# empty means that everybody can mine
allowed-miners = []
}

include "chains/testnet-allowed-miners"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include the same list of the nomad deployer or will different keys be generated there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a draft. only reason it's open is for hydra to pick it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the previous attempt simply didn't work; hocon documentation isn't super clear)

Copy link
Contributor

@KonradStaniec KonradStaniec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just an general comment: the list of public keys is taken into account only if option
mantis.consensus.protocol is set to restricted-ethash

@kaii-zen
Copy link
Contributor Author

just an general comment: the list of public keys is taken into account only if option
mantis.consensus.protocol is set to restricted-ethash

Now you tell me! 😅

@kaii-zen kaii-zen force-pushed the allowed-miners branch 2 times, most recently from 7b0cea4 to 30e70ef Compare November 27, 2020 14:00
@kaii-zen kaii-zen changed the title Add miner whitelist to testnet Add allowed-miners list to testnet configs Nov 27, 2020
@kaii-zen kaii-zen changed the title Add allowed-miners list to testnet configs Add miners whitelist to testnet configs Nov 27, 2020
@kaii-zen kaii-zen marked this pull request as ready for review November 27, 2020 15:04
@ntallar ntallar added the BREAKS PROTOCOL Affects Node2Node interactions in a way that makes them not interoperate label Nov 27, 2020
Copy link

@ntallar ntallar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

 .\\            //.
. \ \          / /.
.\  ,\     /` /,.-
 -.   \  /'/ /  .
 ` -   `-'  \  -
   '.       /.\`
      -    .-
      :`//.'
      .`.'
      .' BP 

@ntallar ntallar merged commit 6f36617 into develop Nov 30, 2020
@ntallar ntallar deleted the allowed-miners branch November 30, 2020 13:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
BREAKS PROTOCOL Affects Node2Node interactions in a way that makes them not interoperate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants