Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

feat(network): tag consensus peer #364

Merged

Conversation

zeroqn
Copy link
Contributor

@zeroqn zeroqn commented Jul 20, 2020

What type of PR is this?
feat

What this PR does / why we need it:
Don't share consensus peer info with sync peers

BREAKING CHANGE:

  • Configuration
    • genesis.toml
      • add consensus public key
    • chain.toml
      • use peer id instead of hex encoded public key to do bootstrapping
      • change whitelist to allowlist
      • change whitelist_peer_only to allowlist_only
  • Internal api
    • change users_cast to multicast, use peer id bytes instead

Other:

  • tag consensus peer on every committed block
  • use validator's public key bytes instead of chain address bytes

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@muta-robot muta-robot requested review from homura and yejiayu July 20, 2020 01:55
@muta-robot muta-robot added the size/XXL #d12d0c label Jul 20, 2020
@zeroqn zeroqn force-pushed the feat-network-tag-consensus-support branch from 302da32 to 5ef1ccf Compare July 20, 2020 08:33
@zeroqn
Copy link
Contributor Author

zeroqn commented Jul 20, 2020

/test chaos

@yejiayu
Copy link
Contributor

yejiayu commented Jul 20, 2020

/test all

@zeroqn zeroqn force-pushed the feat-network-tag-consensus-support branch from 5ef1ccf to 17c4119 Compare July 20, 2020 11:04
@zeroqn
Copy link
Contributor Author

zeroqn commented Jul 20, 2020

/test all

@yejiayu
Copy link
Contributor

yejiayu commented Jul 20, 2020

/hold

@yejiayu
Copy link
Contributor

yejiayu commented Jul 20, 2020

/test all

@yejiayu
Copy link
Contributor

yejiayu commented Jul 20, 2020

/test chaos

@zeroqn zeroqn force-pushed the feat-network-tag-consensus-support branch from a03388c to af04f0c Compare July 21, 2020 03:39
@zeroqn
Copy link
Contributor Author

zeroqn commented Jul 21, 2020

/test chaos

2 similar comments
@zeroqn
Copy link
Contributor Author

zeroqn commented Jul 21, 2020

/test chaos

@zeroqn
Copy link
Contributor Author

zeroqn commented Jul 21, 2020

/test chaos

@zeroqn
Copy link
Contributor Author

zeroqn commented Jul 21, 2020

/retest

@muta-robot
Copy link

muta-robot commented Jul 21, 2020

@zeroqn: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pr-build 17c4119 link /test this

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

@zeroqn
Copy link
Contributor Author

zeroqn commented Jul 21, 2020

/retest

@zeroqn zeroqn force-pushed the feat-network-tag-consensus-support branch 2 times, most recently from a87eebf to 2eac67d Compare July 24, 2020 01:26
zeroqn added 9 commits July 27, 2020 11:47
…es (nervosnetwork#354) (#2)

* change(consensus): replace Validator address bytes with pubkey bytes

BREAKING CHANGE:
- replace Validator address bytes with pubkey bytes

* change(consensus): log validator address instead of its public key

Block proposer is address instead public key

* fix: compilation failed
* feat(network): move in discovery protocol from forked

* feat(network): move in ping protocol

* feat(network): move in identify protocol

* chore(network): use tentacle from crate

* refactor(network): change allow_global_ip feature to global_ip_only

* change(network): remove secio_enabled in identify protocol

secio should be always enabled in muta network

* refactor(network): identify protocol

* refactor(network): discovery global_ip_only feature

* chore(network): remove garbage files

* fix(network): clippy on auto generated code

* fix(network): clippy warnings

* refactor(nework): ping message use protobuf instead

* refactor(network): use protobuf to define discovery message

* chore(network): turn off global_ip_only feature by default

* refactor(network): define identify message using protobuf

* fix(network): clippy warnings

* chore(network): remove unused molecule
* refactor(network)!: remove Address, use peer id

BREAKING CHANGE:
- change users_cast to multicast, take peer_ids bytes instead of Address
- network bootstrap configuration now takes peer id instead of pubkey hex

* refactor(network): PeerId api
* feat(network): peer tag support

* refactor(network): use tag to implement allowlist, ban

* fix(network): unit tests

* fix(network): peer manager tests

* fix(trust_metric_test): update to new network code

* fix(network): rebase to latest PR

* fix(network): clippy warnings

* fix(network): no ban check in tags insert

* fix(network): also check Consensus tag instead mixed it with AlwaysAllow
* feat(network): implement tag api

* feat: tag consensus peers
@zeroqn zeroqn force-pushed the feat-network-tag-consensus-support branch from 2eac67d to e7175da Compare July 27, 2020 03:48
@zeroqn
Copy link
Contributor Author

zeroqn commented Jul 27, 2020

/test chaos

2 similar comments
@yejiayu
Copy link
Contributor

yejiayu commented Jul 27, 2020

/test chaos

@yejiayu
Copy link
Contributor

yejiayu commented Jul 27, 2020

/test chaos

@yejiayu
Copy link
Contributor

yejiayu commented Jul 27, 2020

/test all

@yejiayu
Copy link
Contributor

yejiayu commented Jul 28, 2020

/lgtm

@muta-robot muta-robot added the lgtm #8ef42e label Jul 28, 2020
@muta-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yejiayu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yejiayu
Copy link
Contributor

yejiayu commented Jul 28, 2020

/hold cancel

@muta-robot muta-robot merged commit 9b27df1 into nervosnetwork:master Jul 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants