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

assert on missing active validators' attestations when verifying finalization #1387

Merged
merged 2 commits into from
Aug 1, 2020

Conversation

tersec
Copy link
Contributor

@tersec tersec commented Jul 28, 2020

Along the lines of #1386, but where that one shouldn't flag any conditions that wouldn't already (an epoch later) have triggered finalization failure, this tightens the requirements the 2/3 balance quorum, to being able not to receive only 10 of the testnet0/testnet1) 128 active validators' attestations. 8 of those will already come from some validators programmed not to attest, so that leaves a tolerance currently of 3 validators allowed not to attest without this firing.

So, this is quite a tighter check on the interactions between nbc and libp2p losing track of attestations in the context of justification and finalization.

Building: build/beacon_node
Building: build/deposit_contract
INF 2020-07-28 17:39:22+02:00 Generating deposits                        tid=343442 file=keystore_management.nim:107 totalValidators=128 validatorsDir=local_testnet_data/validators secretsDir=local_testnet_data/secrets
INF 2020-07-28 17:40:04+02:00 Deposit data written                       tid=343442 file=deposit_contract.nim:184 filename=local_testnet_data/deposits.json
Wrote local_testnet_data/network_dir/genesis.ssz
Wrote local_testnet_data/network_dir/bootstrap_nodes.txt
Wrote local_testnet_data/network.json:
{
  "runtimePreset": {
    "MIN_GENESIS_ACTIVE_VALIDATOR_COUNT": 128,
    "MIN_GENESIS_TIME": 0,
    "GENESIS_DELAY": 10,
    "GENESIS_FORK_VERSION": "0x00000000"
  },
  "depositContractAddress": "0x0000000000000000000000000000000000000000",
  "depositContractDeployedAt": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
That was run #1
Building: build/beacon_node
Building: build/deposit_contract
INF 2020-07-28 17:48:53+02:00 Generating deposits                        tid=346112 file=keystore_management.nim:107 totalValidators=128 validatorsDir=local_testnet_data/validators secretsDir=local_testnet_data/secrets
INF 2020-07-28 17:49:34+02:00 Deposit data written                       tid=346112 file=deposit_contract.nim:184 filename=local_testnet_data/deposits.json
Wrote local_testnet_data/network_dir/genesis.ssz
Wrote local_testnet_data/network_dir/bootstrap_nodes.txt
Wrote local_testnet_data/network.json:
{
  "runtimePreset": {
    "MIN_GENESIS_ACTIVE_VALIDATOR_COUNT": 128,
    "MIN_GENESIS_TIME": 0,
    "GENESIS_DELAY": 10,
    "GENESIS_FORK_VERSION": "0x00000000"
  },
  "depositContractAddress": "0x0000000000000000000000000000000000000000",
  "depositContractDeployedAt": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
That was run #2
Building: build/beacon_node
Building: build/deposit_contract
INF 2020-07-28 18:00:28+02:00 Generating deposits                        tid=350773 file=keystore_management.nim:107 totalValidators=128 validatorsDir=local_testnet_data/validators secretsDir=local_testnet_data/secrets
INF 2020-07-28 18:01:10+02:00 Deposit data written                       tid=350773 file=deposit_contract.nim:184 filename=local_testnet_data/deposits.json
Wrote local_testnet_data/network_dir/genesis.ssz
Wrote local_testnet_data/network_dir/bootstrap_nodes.txt
Wrote local_testnet_data/network.json:
{
  "runtimePreset": {
    "MIN_GENESIS_ACTIVE_VALIDATOR_COUNT": 128,
    "MIN_GENESIS_TIME": 0,
    "GENESIS_DELAY": 10,
    "GENESIS_FORK_VERSION": "0x00000000"
  },
  "depositContractAddress": "0x0000000000000000000000000000000000000000",
  "depositContractDeployedAt": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
That was run #3

@tersec tersec requested a review from dryajov July 28, 2020 16:09
@tersec
Copy link
Contributor Author

tersec commented Jul 28, 2020

continuous-integration/travis-ci/pr failure at https://travis-ci.org/github/status-im/nim-beacon-chain/jobs/712622123 seems unrelated, since continuous-integration/travis-ci/push went fine on both platforms and continuous-integration/jerkins/branch both work fine:

/Users/travis/build/status-im/nim-beacon-chain/vendor/nim-confutils/confutils.nim(758, 23) Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]
\e[92mBuilding:\e[39m build/deposit_contract
\e[92mBuilding:\e[39m build/inspector
\e[92mBuilding:\e[39m build/logtrace
/Users/travis/build/status-im/nim-beacon-chain/beacon_chain/logtrace.nim(213, 19) template/generic instantiation of `decode` from here
/Users/travis/build/status-im/nim-beacon-chain/vendor/nim-serialization/serialization.nim(63, 31) Error: type mismatch: got <type JsonReader, InputStreamHandle, forwardCompatible: bool>
but expected one of: 
proc init(T: type JsonReader; stream: InputStream; mode = defaultJsonMode;
         allowUnknownFields = false): T:type
  first type mismatch at position: 3
  unknown named parameter: forwardCompatible
28 other mismatching symbols have been suppressed; compile with --showAllMismatches:on to see them
expression: init(
  JsonReader, stream`gensym36285275, forwardCompatible = true)
make: *** [logtrace] Error 1
make: *** Waiting for unfinished jobs....

@tersec
Copy link
Contributor Author

tersec commented Jul 28, 2020

continuous-integration/travis-ci/pr failure at https://travis-ci.org/github/status-im/nim-beacon-chain/jobs/712622123 seems unrelated, since continuous-integration/travis-ci/push went fine on both platforms and continuous-integration/jerkins/branch both work fine:

/Users/travis/build/status-im/nim-beacon-chain/vendor/nim-confutils/confutils.nim(758, 23) Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]
\e[92mBuilding:\e[39m build/deposit_contract
\e[92mBuilding:\e[39m build/inspector
\e[92mBuilding:\e[39m build/logtrace
/Users/travis/build/status-im/nim-beacon-chain/beacon_chain/logtrace.nim(213, 19) template/generic instantiation of `decode` from here
/Users/travis/build/status-im/nim-beacon-chain/vendor/nim-serialization/serialization.nim(63, 31) Error: type mismatch: got <type JsonReader, InputStreamHandle, forwardCompatible: bool>
but expected one of: 
proc init(T: type JsonReader; stream: InputStream; mode = defaultJsonMode;
         allowUnknownFields = false): T:type
  first type mismatch at position: 3
  unknown named parameter: forwardCompatible
28 other mismatching symbols have been suppressed; compile with --showAllMismatches:on to see them
expression: init(
  JsonReader, stream`gensym36285275, forwardCompatible = true)
make: *** [logtrace] Error 1
make: *** Waiting for unfinished jobs....

Fixed by #1389

@tersec tersec mentioned this pull request Jul 30, 2020
@tersec tersec merged commit 85febf0 into devel Aug 1, 2020
@tersec tersec deleted the ist branch August 1, 2020 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant