- 24 Jan, 2017 2 commits
-
-
manish authored
https://jira.hyperledger.org/browse/FAB-1668 Phantom reads problem: ----------------------------- If a transaction executes a key range query (say key_1 - key_n) leveldb serves all the keys in the given range in sorted order of keys. Between simulation and validation of a transaction, some other transaction may insert one or more keys in this range. Now, this change cannot be detected by merely checking the versions of the keys present in the read-set of the transaction. (though, this check can detect updates and deletes). A serializable isolation level does not permit phantom reads. Situations where the phantom reads may not be acceptable: ----------------------------- - A chaincode may take a decision based on aggregates of the results of the range query such as min/max/avg/sum etc. This would be affected if a new entry gets added to the range query results. - A chaincode may want to change all the marbles owned by a specific user to blue in a tran `t1`. The chaincode may do so by performing a range query to get all the marbles for the user and change their color to blue. Now, if a new white marble get added to the user's assets by an another transaction `t2`, `t1` should be marked as invalid. Solution in this change-set: ----------------------------- For solving this, we can capture the details of the range query (the query and it's results) during the simulation time and re-execute the query during validation time and compare the results. If the results (keys and versions) are still the same, we can safely commit the transaction. This changes set introduces - Structures for capturing the range query details in rwset - Detection of phantom items (insertion/deletion) that affect the results of the range query during validation - Mark the transactions that are affected by the phantom items as invalid to ensure serializability in the presence of range queries Change-Id: I909841a0234c37795ad7a4ffcca8a9ebd9c9f994 Signed-off-by:
manish <manish.sethi@gmail.com>
-
Jonathan Levi authored
-
- 23 Jan, 2017 14 commits
-
-
Jason Yellick authored
The multichain package in orderer was refactored and merged which caused a code conflict in multichain/chainsupport.go. This fixes that. Change-Id: Ia29368c80448fe1d22f1fe9dacd70ca6f96812c3 Signed-off-by:
Jason Yellick <jyellick@us.ibm.com>
-
Binh Nguyen authored
-
Srinivasan Muralidharan authored
-
jeffgarratt authored
Orderer requires 4 entries in block metadata for orderer. Added temporary values which are required. Change-Id: I7556a825394a8771a9b7c09ce3efccbd7bda2f4b Signed-off-by:
jeffgarratt <garratt.jeff@gmail.com>
-
Yacov Manevich authored
-
Jonathan Levi authored
-
Christopher Ferris authored
-
Kostas Christidis authored
https://jira.hyperledger.org/browse/FAB-1623 Allow a restarted ordering shim to pick up ordering exactly from where it left it off. This changeset: 1. Adds a `KafkaMetadata` proto message definition to hold the orderer-related metadata that will be written with every block on the local ledger. 2. Modifies the Kafka-based orderer so that (a) it reads that info upon booting up and (b) it then seeks to the appropriate offset. A convoluted and somewhat tautological unit ("unit") test has been added to test this functionality, but we are really starting to hit the limit of what we can do with the provided mock structures. This path will be revisited with BDD tests within the next few weeks. I've also renamed the offset-related variables in all of the tests to make things easier to keep track of. Review starting point: - fabric/protos/orderer/kafka.proto - fabric/orderer/kafka/orderer.go [1] https://jira.hyperledger.org/browse/FAB-1773 [2] https://jira.hyperledger.org/browse/FAB-1623 Change-Id: I1314a2361844dd4adbd78bf57bb08aaee358dc6f Signed-off-by:
Kostas Christidis <kostas@christidis.io>
-
Christopher Ferris authored
-
Christopher Ferris authored
-
Jason Yellick authored
-
Gabor Hosszu authored
-
grapebaba authored
https://jira.hyperledger.org/browse/FAB-1618 Ledger interfaces changed, all ledger interfaces have commit block method, this commit cleanup the interfaces. Change-Id: I5df56a1ec5cb71e2474e3b5daeea6642842bc762 Signed-off-by:
grapebaba <281165273@qq.com>
-
Jason Yellick authored
-
- 22 Jan, 2017 4 commits
-
-
Srinivasan Muralidharan authored
https://jira.hyperledger.org/browse/FAB-1800 peer should stop loading the channel but continue to load the next chain. Also added a panic to the system chaincode if there's no ledger registered with the chain. Change-Id: Ia581c70c636c3be21fbb05e9cd01fafe36c91b09 Signed-off-by:
Srinivasan Muralidharan <muralisr@us.ibm.com>
-
Gari Singh authored
The GRPCServer had methods for appending and removing client root certificates but did not have a method to set/update the list in its entirety. * Add SetClientRootCAs function to GRPCServer * Add new tests and update existing tests Change-Id: I8159ae9a0cea663a882b5bcaecc184b4934ab8eb Signed-off-by:
Gari Singh <gari.r.singh@gmail.com>
-
jeffgarratt authored
Join channel invocation is created and sent to endorser. Now join works!! Local MSP config is now read from core.yaml variable peer.mspConfigPath protos/utils/blockutils.go now use correct Configuratio Item type of MSP. Chaned peer.mspConfigPath to "/etc/hyperledger/fabric/msp/sampleconfig". Changed msp function to NOT use JSON encoding/decoding. Changed msp to check for type of configuration item vs name. Added preferredMaxBytes to Batchsize orderer config. Regenerated orderer configuration.proto. Copied the cacerts to the admincerts for local MSP setup per @ASO recommendation for now. Signing is now performed at entity level and uses sha256 digest with ASN1 encoding for signature. Generated proto files for peer protos. Changed cert in SerializedIdentity from ASN1 encoding to PEM. Set the chainId to empty string for join request. Regenerated orderer configuration proto. Generated MSP config protos. Now add MSP Config items to channel create transaction. Now add Anchor peers config items to channel create transaction. Fixed msp tests to use the blockutils msp config path lookup mechanism, and now uses the proper Type setting in the MSPConfig proto structure. Change-Id: I507c490df41ff003306f5210905418cec9108b8c Signed-off-by:
jeffgarratt <garratt.jeff@gmail.com>
-
conghonglei authored
ATT. goimports re-format gossip/service/channle, to make it pass linter check. Change-Id: I1c26f05fdfd5e689941b0fe798c6d07e8fa8b68a Signed-off-by:
conghonglei <conghonglei@wanda.cn>
-
- 21 Jan, 2017 4 commits
-
-
Kostas Christidis authored
https://jira.hyperledger.org/browse/FAB-1775 Store the results of the most recent `CreateNextBlock()` and `WriteBlock()` calls in the mock `ConsenterSupport` structure so as to make these values easier to retrieve (and some tests easier to write*). * I will be using this in a test on [FAB-1623]. Change-Id: If678308e25f73112809867768c4b89052fd3f283 Signed-off-by:
Kostas Christidis <kostas@christidis.io>
-
Kostas Christidis authored
https://jira.hyperledger.org/browse/FAB-1774 A consensus implementation may need to read the ledger and extract metadata from it during operation (most likely when booting up). As an example, the Kafka-based orderer, should read the offset of the last envelope it placed into a block and wrote to the local ledger, and should use that offset to resume consumption of chain's partition. This changeset follows up on the work of FAB-1773 [1]. Specifically, it modifies: 1. The common components `Consenter` interface so that the newly-introduced metadata field is passed on to the consensus implementations via the `HandleChain` method. 2. The `WriteBlock` method of the `ConsenterSupport` interface so that this metadata can be persisted to blocks. It also adds relevant unit tests. This is a precursor to FAB-1623 [2], which will add restart support to the Kafka-based orderer. Review starting point: fabric/orderer/multichain/chainsupport.go [1] https://jira.hyperledger.org/browse/FAB-1773 [2] https://jira.hyperledger.org/browse/FAB-1623 Change-Id: I3d1c932eb30537f6a1aa8056b9d38550b17dee6d Signed-off-by:
Kostas Christidis <kostas@christidis.io>
-
Luis Sanchez authored
modified: gossip/service/channel.go modified: gossip/service/channel_test.go modified: gossip/service/gossip_service.go Change-Id: Ie645641d99a40de662bc24f02609dff41b589f5c Signed-off-by:
Luis Sanchez <sanchezl@us.ibm.com>
-
Yacov Manevich authored
-
- 20 Jan, 2017 16 commits
-
-
Christopher Ferris authored
Add msp and gossip to linter checks Fixed gossip goimport and go vet errors add Dickerfile to .gitignore Change-Id: I7b88f7ae59be3c4b41edce10d69892949cc59cc3 Signed-off-by:
Christopher Ferris <chrisfer@us.ibm.com>
-
Christopher Ferris authored
-
Binh Nguyen authored
-
Yacov Manevich authored
-
YACOVM authored
This commit: 1) Adds anchor peers upon channel creation 2) Extracts them at the peer side in the gossip layer and uses them. 3) Changes an internal API of a method in gossip from GetTimestamp to SequenceNumber, because using sequence numbers is better than using timestamps, that are machine-specific in contrast to sequence numbers which are global. Signed-off-by:
Yacov Manevich <yacovm@il.ibm.com> Change-Id: Id080585a56a5083d9cd4911ce790e5be389cfa52
-
Binh Nguyen authored
-
Binh Nguyen authored
-
Binh Nguyen authored
-
Binh Nguyen authored
-
Luis Sanchez authored
- moved image from bddtests/environments/ to images/ - cleaned up Makefile - configured compose environments to use image Change-Id: I08caff43c947d8f3b15f69775f578556e847312b Signed-off-by:
Luis Sanchez <sanchezl@us.ibm.com>
-
Christopher Ferris authored
-
Christopher Ferris authored
-
Christopher Ferris authored
-
Kostas Christidis authored
https://jira.hyperledger.org/browse/FAB-1773 A consensus implementation may need to read the ledger and extract metadata from it during operation (most likely when booting up). As an example, the Kafka-based orderer, should read the offset of the last envelope it placed into a block *and* wrote to the local ledger, and use that value to resume consumption of chain's partition. This changeset: 1. Introduces a metadata field for the described use above 2. Sizes and populates the `Metadata` field of a newly-constructed block appropriately. These changes will be put into use in a follow-up changeset [FAB-1774]. Change-Id: Ib3d7d8f77c1a888ebec5790a144457913b201202 Signed-off-by:
Kostas Christidis <kostas@christidis.io>
-
Kostas Christidis authored
https://jira.hyperledger.org/browse/FAB-1772 Bumped into this accidentally while working on FAB-1623. Change-Id: Id1afcd3de59b936f5d73df9f041a5c04bf47b864 Signed-off-by:
Kostas Christidis <kostas@christidis.io>
-
Kostas Christidis authored
https://jira.hyperledger.org/browse/FAB-1781 Changesets [1] and [2] got merged and as a result a test in the `multichain` package fails. This changeset fixes the failing test. [1] https://gerrit.hyperledger.org/r/3867 [2] https://gerrit.hyperledger.org/r/4581 Change-Id: I2dfc6403f79914943107a77b587791800ac053eb Signed-off-by:
Kostas Christidis <kostas@christidis.io>
-