Skip to content
Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy.
Go Other
  1. Go 99.4%
  2. Other 0.6%
Branch: master
Clone or download

Latest commit

guoger FAB-17951 fetch correct node id for validation (#1367)
* FAB-17951 fetch correct node id for validation

Today, when a config update that modifies consenter set (add/remove
node), there's validator performing basics checks, including dangerous
configs that may result in quorum loss, e.g. removing active node from
a network with 2/3 alive nodes.

However, this validator always assumes node ID in consenter set to start
from 1. This is benign in most cases, as nodes are normally online, and
actual node ID doesn't really matter from validation pov. Although, in
certain special cases, this is problematic:
- we have [2, 3, 4] in consenter set
- [2, 3] are alive, and [4] is inactive and subject to remove
- if validator assume node starts from 1, then it would incorrectly conclude
  that [3] out of [1, 2, 3] is to be removed, while [2, 3] are the 2/3 alive
  nodes. Therefore, it would reject such request
- instead, we need to take actual node IDs into account

This commit fixes the problem and adds some UTs. IT will be added in a seperate
commit.

Signed-off-by: Jay Guo <guojiannan1101@gmail.com>

* Amend IT to assert active node shrink

An integration test is amended to assert that number of
active nodes shrinks when a node is offline.

Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
Latest commit fcf9194 Jun 11, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github FAB-17777 Create basic settings.yaml (#1145) Apr 22, 2020
bccsp Backfill test for BCCSP environment overrides... Jun 1, 2020
ci Bump Go and Alpine Version Jun 10, 2020
cmd Use protolator from fabric-config May 27, 2020
common add rlock to IsEmpty() in leveldb wrapper (#1388) Jun 10, 2020
core Regenerate proto to sync the go code Jun 10, 2020
discovery Address more concerns highlighted by linters May 25, 2020
docs Fix the constructor message in complex queries Jun 10, 2020
gossip [FAB-17935] Change unnecessary warning log line to debug in gossip (#… May 29, 2020
idemix [FAB-17607] Fix some wrong word Mar 13, 2020
images Update images/peer/Dockerfile May 22, 2020
integration FAB-17951 fetch correct node id for validation (#1367) Jun 11, 2020
internal Add generateSnapshot function on kvledger Jun 2, 2020
msp Address more concerns highlighted by linters May 25, 2020
orderer FAB-17951 fetch correct node id for validation (#1367) Jun 11, 2020
pkg Fix spelling errors identified by misspell May 23, 2020
protoutil Address ineffectual assigns in protoutil tests May 23, 2020
release_notes Change default CouchDB maxRetriesOnStartup to 10 May 20, 2020
sampleconfig [FAB-17471] Fix OrdererType key to correct line May 28, 2020
scripts Updates in master for v2.1.1 release Jun 1, 2020
tools Bump golang.org/x/tools to release-branch.go1.14 Apr 10, 2020
vagrant Bump Go Version in Vagrant Jun 11, 2020
vendor Update fabric-config dep to v0.0.4 and associated int. test (#1378) Jun 8, 2020
.dockerignore [FAB-17272] Fix Docker Build Context Dec 16, 2019
.gitattributes build: prevent eol modification in vendored code Apr 13, 2020
.gitignore Remove execute permissions on data files Feb 6, 2020
.mergify.yml [FAB-17443] Implement Bot to Support Doc Maintainers Jan 28, 2020
CHANGELOG.md [FAB-17650] fix incorrect word Mar 26, 2020
CODEOWNERS Add Core Maintainers to /docs in CODEOWNERS Jan 29, 2020
CODE_OF_CONDUCT.md FAB-9356 add CODE_OF_CONDUCT.md Apr 4, 2018
CONTRIBUTING.md [FAB-12598] Omit trailing spaces to success CI. Nov 15, 2018
LICENSE transfer from GitHub hyperledger/fabric Jul 26, 2016
MAINTAINERS.md Retire dormant Fabric maintainers May 26, 2020
Makefile Bump Go and Alpine Version Jun 10, 2020
NOTICE add NOTICE file May 26, 2020
README.md Updates in master for v2.1.0 release Apr 16, 2020
SECURITY.md [IN-68] Add default GitHub SECURITY policy Sep 25, 2019
docker-env.mk Cleanup Makefile - remove unused env vars Mar 1, 2020
go.mod Update fabric-config dep to v0.0.4 and associated int. test (#1378) Jun 8, 2020
go.sum Update fabric-config dep to v0.0.4 and associated int. test (#1378) Jun 8, 2020
gotools.mk Switch from dep to go modules Apr 15, 2020
test-pyramid.png [FAB-11706] Add Interoperability Test Info Sep 12, 2018
testingInfo.rst Remove dead and irrelevant Jenkins references Feb 15, 2020
tox.ini [FAB-11180] Adding docs-link to tox.ini Oct 29, 2018

README.md

Hyperledger Fabric join the chat

Build Status CII Best Practices Go Report Card GoDoc Documentation Status

This project is an Active Hyperledger project. For more information on the history of this project see the Fabric wiki page. Information on what Active entails can be found in the Hyperledger Project Lifecycle document. Hyperledger Fabric is a platform for distributed ledger solutions, underpinned by a modular architecture delivering high degrees of confidentiality, resiliency, flexibility and scalability. It is designed to support pluggable implementations of different components, and accommodate the complexity and intricacies that exist across the economic ecosystem.

Hyperledger Fabric delivers a uniquely elastic and extensible architecture, distinguishing it from alternative blockchain solutions. Planning for the future of enterprise blockchain requires building on top of a fully-vetted, open source architecture; Hyperledger Fabric is your starting point.

Releases

Fabric releases and release notes can be found on the GitHub releases page.

Please visit the Hyperledger Fabric Jira dashboard for our release roadmap. We plan on a quarterly release cadence, delivering on a scoped set of themes and select features. Unless specified otherwise, all releases will be upgradable from the prior minor release.

Documentation, Getting Started and Developer Guides

Please visit our online documentation for information on getting started using and developing with the fabric, SDK and chaincode:

It's recommended for first-time users to begin by going through the Getting Started section of the documentation in order to gain familiarity with the Hyperledger Fabric components and the basic transaction flow.

Contributing

We welcome contributions to the Hyperledger Fabric project in many forms. There’s always plenty to do! Check the documentation on how to contribute to this project for the full details.

Testing

Check the documentation for information on the testing structure that the project follows.

Community

Hyperledger Community

Hyperledger mailing lists and archives

Hyperledger Chat

Hyperledger Fabric Issue Tracking (JIRA)

Hyperledger Fabric Wiki

Hyperledger Wiki

Hyperledger Code of Conduct

Community Calendar

License

Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Hyperledger Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.

You can’t perform that action at this time.