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

Feature Added: Repo consolidation #262

Merged
merged 24 commits into from
Jul 10, 2017
Merged

Feature Added: Repo consolidation #262

merged 24 commits into from
Jul 10, 2017

Conversation

aigoncharov
Copy link

No description provided.

andrey.goncharov added 21 commits July 8, 2017 16:24
Merged in ledger
Merged in state, stp
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
Test fixes
@aigoncharov aigoncharov changed the title Feature/repo merge Feature Added: Repo consolidation Jul 9, 2017
@aigoncharov aigoncharov merged commit 96e976d into master Jul 10, 2017
lovesh pushed a commit that referenced this pull request Jul 10, 2017
* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py
lovesh added a commit that referenced this pull request Jul 10, 2017
* removing unused config variables and imports

* remove commented code

* fix bug with checkpoint and gc after view change

* Feature Added: Repo consolidation (#262)

* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py

* update test
lovesh added a commit that referenced this pull request Jul 11, 2017
* removing unused config variables and imports

* remove commented code

* fix bug with checkpoint and gc after view change

* Feature Added: Repo consolidation (#262)

* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py

* update test

* Node requests PROPAGATEs

If a node receives a PRE-PREPARE but does not enough finalised requests, it requests PROPAGATEs

* use fixture params in test and update test with more checks

* use correct type

* add and update tests
aigoncharov pushed a commit that referenced this pull request Jul 18, 2017
* add test for SerializedValueField

* process stashed ledger status only once

* calling correct method in force_ordered

* add documentation for method

* added common constants for input validation, tests for verkeys

* optimized error output for incorrect b58 chars

* updated tests for fields input validation

* renamed decodedLengthConstraints to byte_lengths

* revert uncommitted ledger on setting primary of master replica

* checking for exception in case of ledger not present

* fixed PR comments

* reformat code and comment in a test

* made API to get b58 strings with specified byte length

* fixed pep8 warnings

* fix primary selection

* Add pool_upgrade force field; allow to send forced requests without waiting for sufficient number of nodes; (#228)

* fix test

* Commented out raet logging

* Add test for verkey check (#230)

* add new test that checks requests from different ledgers interleave, skip an probably incorrect test and refactoring

* fix test

* add log to test helper

* Set commit quorum N-f

Ref: testNodeRejectingInvalidTxns

Fix: testNodeRejectingInvalidTxns

Remove excess 'sendRandomRequests'

Ref: add quorums, propagate

Ref: use quorums in replica class

Ref: quorums election

Ref: remove old quorum code

* Ref: remove useless condition

* Ref: quorums for client

* Ref: propagator

Ref: minor

Fix ReqState class

* Fix: do not count node's propagate for quorum

* Fix testNonPrimarySendsAPrePrepare

* Fix propagator

* workaround for byte sender names
* fix removing name of node from senders

* Fix testNodeDoesNotParticipateUntilCaughtUp

* Skip test_primary_election_case6

* small clean-ups in ledger manager

* use Base58Field for CONS_PROOF and MapField ionstead of IterableField for txns

* create StringifiedNonNegativeNumberField and use it in CatchupRep

* fix a bug with processing commit and catchup req

* Change view_change, prepare quorums

* view_change N-f
* prepare N-f-1 ('-1' - except the primary)

* update fixture to work even if catchup was tried again

* Merge branches 'master' and 'simple-election' of https://github.com/evernym/plenum into simple-election

* Merge branches 'master' and 'simple-election' of https://github.com/evernym/plenum into simple-election

* small cleaning in fields.py

* adding get_by_rank in test util and update a new test

* fix test

* dump

* change schema of ViewChangeDone message and send acceptabted view change

* reformat code and comment in a test

* fix test

* fix intermediately failing tests

Catchup can be marked completed if got all txns from stashed ordered requests

* fix test

* add a test for catchup requests not needed and add ability to process specific delayed messages

* remove unused imports and add a update test

* re-factor slow_node tests: make them independent

* remove debug print

* update error message for validation

* add missing blank line

* update logic in CatchupOperationField

* remove redundant blank line

* changes for validation

* create a build from a branch

* create a build from a branch: disable tests temporarily

* enable tests back

* set name for exception for debug purpose

* During view change, cathcup only certain number of times if catchup did not result in any new txns

* bump dependency version

* remove commented code, propagate regardless of participation, use correct wallet for node and some refactoring

* add CatchupOperationField and use it in CatchupRep

* use ClientMessageValidator instead of CatchupOperationField - it is possible because transactions in txn field are reformated back to request format

* uncomment digest field of client request

* remove fields from 'operation' when rcopying them to root level of document

* remove CatchupOperationField, it is not needed anymore

* test

* add support of not strict schema

* add field 'optional' to FieldValidator since all its successors have it

* fix testNodeRejectingInvalidTxns

* fix tests in test_client_node_op.py

* fix tests in test_catchuprep_message.py

* Validation for transaction sequence number and sha256 hash (#233)

* add input validation for transaction sequence number field

* adding sha256 validation

* splitting test

* adding TRUSTEE as an allowed role

* adding perf tests

* Added LimitedLengthStringField (#234)

* Added LimitedLengthStringField

* Code review fixes

* Code review fixes

* Code review fixes

* update doc

* refactoring

* Add MessageFactory

* Add node_message_factory

* Fix the validation error messages, make "_raise_invalid*" static

* Ref: MessageFactory

* Add TestMsg to the message factory

* Use node_message_factory for client, refactoring

* fix timeout in tests

* Make rest messages MessageBase

* Fix testClientNotRetryRequestWhenReqnackReceived

* Remove TaggedTuples

* Ref: input validation

* move node messages into a separate file
* remove TaggedTuple

* Add update_schemas_by_field_type method

* Validation for transaction sequence number and sha256 hash (#233)

* add input validation for transaction sequence number field

* adding sha256 validation

* splitting test

* adding TRUSTEE as an allowed role

* Added LimitedLengthStringField (#234)

* Added LimitedLengthStringField

* Code review fixes

* Code review fixes

* Code review fixes

* adding perf tests

* update doc

* rename file

* Fix reqToTxn, roll back catchup_rep validation

* Update setup.py

* Fix test notes from indy-111

* Fix test_has_expected_validators

* Remove runner.py

* fix jenkinsfile

* fix test name and remove commented skip (#240)

* Version update

* fix tests

* ZStack takes config (#237)

* pass config to ZStacks and move utility to stp

* remove unused imports

* Test fix

* Roll back f.TXN_ROOT validation for PrePrepares

* Improve validation error massages

* Fix tests

* Fix tests and merge issues

* Update readme for new home in Hyperledger.

* Ledger using generators (#246)

* pass config to ZStacks and move utility to stp

* remove unused imports

* midcommit

* ledger iteration is done using generators

* bump dependency version

* add test for state re-creation from ledger

* Added predicates constant

* log level change, deleting useless test and updating tests (#247)

* log level change, deleting useless test and updating tests

* bum dependency version

* Rearrange tests

* Reverted unusued changes

* handle corrupt pool ledger files (INDY-150)

* Fix test testInstanceChangeMsgTypeChecking

* Make stateRootHash and txnRootHash fields MerkleRootField type

* update test with descriptive name

* Make stateRootHash and txnRootHash fields nullable

* Fix update_schemas_by_field_type, node message factory

* Cli did support (#239)

* added some tests for genesis pool files, showing some brittlness

* Switched CLI to use DID instead of Cryptonyms

Required a few changes to some signers to handle some of the use case in the CLI

* Added output for new Signer to include verfication keys in addtion to identifiers

* fixed test to match current CLI output

* made signer_did handle case where verkey is not passed a little better

* changed veriable to non-keyword

* changed veriable to not be a keyword

* add test for full_verkey

* Version fieldvalidator (#243)

* Add validator for vrsion field

* CHnages based on code review

* Add check spaces in the midle of version

* Add more testcases; fix conditions;

* Simplify the version component check

* Moved handleGetTnxReq function in plenum

* Corrected params in getReplyFromLedger function

* Fix test_message_factory tests

* Add runner.py back

* GET_TXN request handling

* Fix memory leaks in Replica (#248)

* refactor creation of inBoxRouter

* remove view_ends_at

* add test for cleaning of ordered

* add removal of outdated ordereds

* add cleaning for primaryNames

* rename test_ordered_cleaning to test_buffers_cleaning

* remove stashed checkpoints when they were processed

* remove self.stashedRecvdCheckpoints[key] if it is empty

* move calling of self.compact_ordered() to gc()

* do gc() manually

* Fixed comments

* Changed GET_TXN response

* manage permissions for keyring files and directories INDY-323 (#232)

* helper class to manage keyrings and tests for it

* fixed tests

* allow save wallet by absolute path, updated tests

* default values for files and dirs permissions in keyring

* added logging about saved wallet

* switch cli to use new API to save wallets, added test

* removed saveGivenWallet API as obsolete

* added loadWallet api and tests

* swicthed wallet loading logic to new API, removed old one

* added TODO comment

* replace TypeError with more appropriate ValueError

* improved style: variable name for imported class

* pathlib onstead of os for WalletStorageHelper

* updated exception message check

* delayed walletSaver initialization

* Added test that resu; of get_txn transaction same as expected

* Ability to turn off spyables for benchmarking and memory tracking utils (#254)

* print size of objects

* add method to inspect collection size of objects and add option to disable spies for benchmarking

* add more options to memory usage methods

* do checkpointing frequently

* Update imports from stp (#256)

* fix imports

* up stp to 0.2.42

* reduce delay in test_view_change_in_between_3pc_all_nodes_random_delays_long_delay because it runs for too long

* Support GET_TXN transaction (#249)

* test

* Added predicates constant

* Reverted unusued changes

* Moved handleGetTnxReq function in plenum

* Corrected params in getReplyFromLedger function

* GET_TXN request handling

* Fixed comments

* Changed GET_TXN response

* Added test that resu; of get_txn transaction same as expected

* Add capability to request messages (#251)

* log level change, deleting useless test and updating tests

* bum dependency version

* Add capability to request messages

A node can request certain kinds of messages from other nodes. Currently PRE-PREPARE, LEDGER_STATUS and CONSISTENCY_PROOF are supported types. The old way of LEDGER_STATUS and CONSISTENCY_PROOF is removed.
A replica can request PRE-PREPAREs from other nodes if it is missing them but has sufficient PREPAREs

* remove commented code and commits are queued even when prepares missing

* add test for checking malicious behavior while requesting pre-prepare

* refactor

* adding more tests

* rename objects

* add new test for view change and use fixture in a logging test

* fix broken merge

* update imports

* add comment to revisit

* Bump dependencies

* Refactor: Use correct error code for instance change after timeout, use correct method name for get transaction handler, separate method to send acknowledgement and minor improvement in test utility (#258)

* log level change, deleting useless test and updating tests

* bum dependency version

* Add capability to request messages

A node can request certain kinds of messages from other nodes. Currently PRE-PREPARE, LEDGER_STATUS and CONSISTENCY_PROOF are supported types. The old way of LEDGER_STATUS and CONSISTENCY_PROOF is removed.
A replica can request PRE-PREPAREs from other nodes if it is missing them but has sufficient PREPAREs

* remove commented code and commits are queued even when prepares missing

* add test for checking malicious behavior while requesting pre-prepare

* refactor

* adding more tests

* rename objects

* add new test for view change and use fixture in a logging test

* fix broken merge

* update imports

* add comment to revisit

* Refactor: Use correct error code for instance change after timeout, use correct method name for get transaction handler, separate method to send acknowledgement and minor improvement in test utility

* update test to check if pool is functional

* let GET_TXN handler return reply

* removing unused config variables and imports (#263)

* removing unused config variables and imports

* remove commented code

* Feature Added: Repo consolidation (#262)

* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py

* Fix consensus tests; add catchup consensus to Quorums (#260)

* Fix consensus tests; add catchup consensus to Quorums

- fixed consensus tests
- added new tests
- added catchup consensus values to Quorums
- added checkpoint consensus values to Quorums

* add catchup consensus to Quorums

* add ledger_status quorum

* Checkpoint bug (#264)

* removing unused config variables and imports

* remove commented code

* fix bug with checkpoint and gc after view change

* Feature Added: Repo consolidation (#262)

* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py

* update test

* Corrected GET_TXN Responce type

* Corrected get_Txn response

* Test network did (#261)

* added some tests for genesis pool files, showing some brittlness

* Changed test_network_setup to use DIDs

test_network_setup used cryptonym but we are switching over to DID style Ids. Cli no longer easily support cryptonym so we need the test genisus txn to also use DID.

* Signature is not required for GET_TXN transaction. Corrected GET_TXN tets

* Fix serialization of messages when ujson < 1.35 is used (#266)

* add test for serialization of messages

* override __dir__ method for MessageBase to exclude service fields

* add test for dir over message

* Corrected checking

* Node requests Propagates if needed (#269)

* removing unused config variables and imports

* remove commented code

* fix bug with checkpoint and gc after view change

* Feature Added: Repo consolidation (#262)

* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py

* update test

* Node requests PROPAGATEs

If a node receives a PRE-PREPARE but does not enough finalised requests, it requests PROPAGATEs

* use fixture params in test and update test with more checks

* use correct type

* add and update tests

* Deleted reference to sovrin_common

* Corrected GET_TXN Response type (#265)

* test

* Added predicates constant

* Reverted unusued changes

* Moved handleGetTnxReq function in plenum

* Corrected params in getReplyFromLedger function

* GET_TXN request handling

* Fixed comments

* Changed GET_TXN response

* Added test that resu; of get_txn transaction same as expected

* Corrected GET_TXN Responce type

* Corrected get_Txn response

* Signature is not required for GET_TXN transaction. Corrected GET_TXN tets

* Corrected checking

* Deleted reference to sovrin_common

* HashStore is used to recover when the ledger starts, fixed the calcu… (#271)

* Hash store is used to recover when the ledger starts, fixed the calculation for consistency

Recovering from transaction log is slow as each transaction is applied again to the tree.

* change log level

* put imports at top and add a property to HashStore

* fix ujson version to have the same serialization of composite messages (#272)

* fix ujson version to have the same serialization of composite messages

* fix serialization test

* Set consensus for catchup and ladger_status to f + 1

* use epoch for time in PRE-PREPARE and PREPARE

* Authenticator will not authenticate cryptonyms not on ledger - INDY 213 (#267)

* CRYPTONYMS WILL NOW CHECK ON LEDGER

When a cryptonym was given that was not on the
ledger, the authenticator would not verfiy and
use the credentials supplied by the client.

* RYPTONYMS WILL NOW CHECK ON LEDGER - INDY 213

When a cryptonym not on the ledger is attempted
to be authenticated, it should check the ledger
and not depend on the credentials provided by
the client.  When this occurs, the
authenticator should  throw an exception
(because the verkey is None)

* Removed unittest, switched for proper pytest.raises

* Feature/indy 399 (#274)

* Feature Added: Package renaming support

* Feature Added: Package renaming support

* Feature Added: Package renaming support

* Feature Added: Package renaming support

* Merge preparations

* Update Jenkinsfile

* Update Jenkinsfile

* first working draft of timestamps

* refactor, clear previous view checkpoint and ignore checkpoint digest… (#273)

* refactor, clear previous view checkpoint and ignore checkpoint digest check for non-master

* rename method, fix spelling and indentation

* Catchup if 3pc messages are missed, INDY-335

* start the catchup procedure if a node going to stash second CHECKPOINT

* minor refactor

* add TODOs

* Do not start catchup if already started

* Do not start catchup for primary or non-master

Start the catchup procedure only for master non-primary replicas

* Fix stashed_checkpoints_with_quorum

* Updated ci helpers (#276)

* storing time in ledger

* add error log to global whitelist and handle exception while processing PRE-PREPARE

* rename and add missed parameter

* update test

* Corrected GET_TXN response

* more tests

* not ignoring txn time

* Message for notifying lagged nodes about previously selected primary (#277)

* add test for CurrentState message

* create CurrentState message

* send CurrentState to lagged nodes

* make message tests check order of fields correctly

* refactor creation of router for node messages

* handler received CurrentState message

* update name of method for sending current state

* update CurrentState message

* add CurrentState message to whitelist

* add test for propagation of current state

* change type of field in CurrentState

* add methods of node related to CurrentState message to spylog

* add debug log message for processing of current state

* add verbose messag for assertion

* unwrap ViewChangeDone message from LedgerStatus and send it to elector

* remove commented sendElectionMsgsToLaggingNode method

* add MessageField field validator

* make _validate_message instane method

* discard LedgerStatus if cannot parse internal messages

* set todo about changing validation of internal messages

* Add explicit log message on successful Notifier Plugin Import (#281)

* adding item to quorums

* Stable
@ashcherbakov ashcherbakov deleted the feature/repo-merge branch December 21, 2017 08:46
Toktar pushed a commit to Toktar/indy-plenum that referenced this pull request Mar 1, 2021
* add test for SerializedValueField

* process stashed ledger status only once

* calling correct method in force_ordered

* add documentation for method

* added common constants for input validation, tests for verkeys

* optimized error output for incorrect b58 chars

* updated tests for fields input validation

* renamed decodedLengthConstraints to byte_lengths

* revert uncommitted ledger on setting primary of master replica

* checking for exception in case of ledger not present

* fixed PR comments

* reformat code and comment in a test

* made API to get b58 strings with specified byte length

* fixed pep8 warnings

* fix primary selection

* Add pool_upgrade force field; allow to send forced requests without waiting for sufficient number of nodes; (hyperledger#228)

* fix test

* Commented out raet logging

* Add test for verkey check (hyperledger#230)

* add new test that checks requests from different ledgers interleave, skip an probably incorrect test and refactoring

* fix test

* add log to test helper

* Set commit quorum N-f

Ref: testNodeRejectingInvalidTxns

Fix: testNodeRejectingInvalidTxns

Remove excess 'sendRandomRequests'

Ref: add quorums, propagate

Ref: use quorums in replica class

Ref: quorums election

Ref: remove old quorum code

* Ref: remove useless condition

* Ref: quorums for client

* Ref: propagator

Ref: minor

Fix ReqState class

* Fix: do not count node's propagate for quorum

* Fix testNonPrimarySendsAPrePrepare

* Fix propagator

* workaround for byte sender names
* fix removing name of node from senders

* Fix testNodeDoesNotParticipateUntilCaughtUp

* Skip test_primary_election_case6

* small clean-ups in ledger manager

* use Base58Field for CONS_PROOF and MapField ionstead of IterableField for txns

* create StringifiedNonNegativeNumberField and use it in CatchupRep

* fix a bug with processing commit and catchup req

* Change view_change, prepare quorums

* view_change N-f
* prepare N-f-1 ('-1' - except the primary)

* update fixture to work even if catchup was tried again

* Merge branches 'master' and 'simple-election' of https://github.com/evernym/plenum into simple-election

* Merge branches 'master' and 'simple-election' of https://github.com/evernym/plenum into simple-election

* small cleaning in fields.py

* adding get_by_rank in test util and update a new test

* fix test

* dump

* change schema of ViewChangeDone message and send acceptabted view change

* reformat code and comment in a test

* fix test

* fix intermediately failing tests

Catchup can be marked completed if got all txns from stashed ordered requests

* fix test

* add a test for catchup requests not needed and add ability to process specific delayed messages

* remove unused imports and add a update test

* re-factor slow_node tests: make them independent

* remove debug print

* update error message for validation

* add missing blank line

* update logic in CatchupOperationField

* remove redundant blank line

* changes for validation

* create a build from a branch

* create a build from a branch: disable tests temporarily

* enable tests back

* set name for exception for debug purpose

* During view change, cathcup only certain number of times if catchup did not result in any new txns

* bump dependency version

* remove commented code, propagate regardless of participation, use correct wallet for node and some refactoring

* add CatchupOperationField and use it in CatchupRep

* use ClientMessageValidator instead of CatchupOperationField - it is possible because transactions in txn field are reformated back to request format

* uncomment digest field of client request

* remove fields from 'operation' when rcopying them to root level of document

* remove CatchupOperationField, it is not needed anymore

* test

* add support of not strict schema

* add field 'optional' to FieldValidator since all its successors have it

* fix testNodeRejectingInvalidTxns

* fix tests in test_client_node_op.py

* fix tests in test_catchuprep_message.py

* Validation for transaction sequence number and sha256 hash (hyperledger#233)

* add input validation for transaction sequence number field

* adding sha256 validation

* splitting test

* adding TRUSTEE as an allowed role

* adding perf tests

* Added LimitedLengthStringField (hyperledger#234)

* Added LimitedLengthStringField

* Code review fixes

* Code review fixes

* Code review fixes

* update doc

* refactoring

* Add MessageFactory

* Add node_message_factory

* Fix the validation error messages, make "_raise_invalid*" static

* Ref: MessageFactory

* Add TestMsg to the message factory

* Use node_message_factory for client, refactoring

* fix timeout in tests

* Make rest messages MessageBase

* Fix testClientNotRetryRequestWhenReqnackReceived

* Remove TaggedTuples

* Ref: input validation

* move node messages into a separate file
* remove TaggedTuple

* Add update_schemas_by_field_type method

* Validation for transaction sequence number and sha256 hash (hyperledger#233)

* add input validation for transaction sequence number field

* adding sha256 validation

* splitting test

* adding TRUSTEE as an allowed role

* Added LimitedLengthStringField (hyperledger#234)

* Added LimitedLengthStringField

* Code review fixes

* Code review fixes

* Code review fixes

* adding perf tests

* update doc

* rename file

* Fix reqToTxn, roll back catchup_rep validation

* Update setup.py

* Fix test notes from indy-111

* Fix test_has_expected_validators

* Remove runner.py

* fix jenkinsfile

* fix test name and remove commented skip (hyperledger#240)

* Version update

* fix tests

* ZStack takes config (hyperledger#237)

* pass config to ZStacks and move utility to stp

* remove unused imports

* Test fix

* Roll back f.TXN_ROOT validation for PrePrepares

* Improve validation error massages

* Fix tests

* Fix tests and merge issues

* Update readme for new home in Hyperledger.

* Ledger using generators (hyperledger#246)

* pass config to ZStacks and move utility to stp

* remove unused imports

* midcommit

* ledger iteration is done using generators

* bump dependency version

* add test for state re-creation from ledger

* Added predicates constant

* log level change, deleting useless test and updating tests (hyperledger#247)

* log level change, deleting useless test and updating tests

* bum dependency version

* Rearrange tests

* Reverted unusued changes

* handle corrupt pool ledger files (INDY-150)

* Fix test testInstanceChangeMsgTypeChecking

* Make stateRootHash and txnRootHash fields MerkleRootField type

* update test with descriptive name

* Make stateRootHash and txnRootHash fields nullable

* Fix update_schemas_by_field_type, node message factory

* Cli did support (hyperledger#239)

* added some tests for genesis pool files, showing some brittlness

* Switched CLI to use DID instead of Cryptonyms

Required a few changes to some signers to handle some of the use case in the CLI

* Added output for new Signer to include verfication keys in addtion to identifiers

* fixed test to match current CLI output

* made signer_did handle case where verkey is not passed a little better

* changed veriable to non-keyword

* changed veriable to not be a keyword

* add test for full_verkey

* Version fieldvalidator (hyperledger#243)

* Add validator for vrsion field

* CHnages based on code review

* Add check spaces in the midle of version

* Add more testcases; fix conditions;

* Simplify the version component check

* Moved handleGetTnxReq function in plenum

* Corrected params in getReplyFromLedger function

* Fix test_message_factory tests

* Add runner.py back

* GET_TXN request handling

* Fix memory leaks in Replica (hyperledger#248)

* refactor creation of inBoxRouter

* remove view_ends_at

* add test for cleaning of ordered

* add removal of outdated ordereds

* add cleaning for primaryNames

* rename test_ordered_cleaning to test_buffers_cleaning

* remove stashed checkpoints when they were processed

* remove self.stashedRecvdCheckpoints[key] if it is empty

* move calling of self.compact_ordered() to gc()

* do gc() manually

* Fixed comments

* Changed GET_TXN response

* manage permissions for keyring files and directories INDY-323 (hyperledger#232)

* helper class to manage keyrings and tests for it

* fixed tests

* allow save wallet by absolute path, updated tests

* default values for files and dirs permissions in keyring

* added logging about saved wallet

* switch cli to use new API to save wallets, added test

* removed saveGivenWallet API as obsolete

* added loadWallet api and tests

* swicthed wallet loading logic to new API, removed old one

* added TODO comment

* replace TypeError with more appropriate ValueError

* improved style: variable name for imported class

* pathlib onstead of os for WalletStorageHelper

* updated exception message check

* delayed walletSaver initialization

* Added test that resu; of get_txn transaction same as expected

* Ability to turn off spyables for benchmarking and memory tracking utils (hyperledger#254)

* print size of objects

* add method to inspect collection size of objects and add option to disable spies for benchmarking

* add more options to memory usage methods

* do checkpointing frequently

* Update imports from stp (hyperledger#256)

* fix imports

* up stp to 0.2.42

* reduce delay in test_view_change_in_between_3pc_all_nodes_random_delays_long_delay because it runs for too long

* Support GET_TXN transaction (hyperledger#249)

* test

* Added predicates constant

* Reverted unusued changes

* Moved handleGetTnxReq function in plenum

* Corrected params in getReplyFromLedger function

* GET_TXN request handling

* Fixed comments

* Changed GET_TXN response

* Added test that resu; of get_txn transaction same as expected

* Add capability to request messages (hyperledger#251)

* log level change, deleting useless test and updating tests

* bum dependency version

* Add capability to request messages

A node can request certain kinds of messages from other nodes. Currently PRE-PREPARE, LEDGER_STATUS and CONSISTENCY_PROOF are supported types. The old way of LEDGER_STATUS and CONSISTENCY_PROOF is removed.
A replica can request PRE-PREPAREs from other nodes if it is missing them but has sufficient PREPAREs

* remove commented code and commits are queued even when prepares missing

* add test for checking malicious behavior while requesting pre-prepare

* refactor

* adding more tests

* rename objects

* add new test for view change and use fixture in a logging test

* fix broken merge

* update imports

* add comment to revisit

* Bump dependencies

* Refactor: Use correct error code for instance change after timeout, use correct method name for get transaction handler, separate method to send acknowledgement and minor improvement in test utility (hyperledger#258)

* log level change, deleting useless test and updating tests

* bum dependency version

* Add capability to request messages

A node can request certain kinds of messages from other nodes. Currently PRE-PREPARE, LEDGER_STATUS and CONSISTENCY_PROOF are supported types. The old way of LEDGER_STATUS and CONSISTENCY_PROOF is removed.
A replica can request PRE-PREPAREs from other nodes if it is missing them but has sufficient PREPAREs

* remove commented code and commits are queued even when prepares missing

* add test for checking malicious behavior while requesting pre-prepare

* refactor

* adding more tests

* rename objects

* add new test for view change and use fixture in a logging test

* fix broken merge

* update imports

* add comment to revisit

* Refactor: Use correct error code for instance change after timeout, use correct method name for get transaction handler, separate method to send acknowledgement and minor improvement in test utility

* update test to check if pool is functional

* let GET_TXN handler return reply

* removing unused config variables and imports (hyperledger#263)

* removing unused config variables and imports

* remove commented code

* Feature Added: Repo consolidation (hyperledger#262)

* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py

* Fix consensus tests; add catchup consensus to Quorums (hyperledger#260)

* Fix consensus tests; add catchup consensus to Quorums

- fixed consensus tests
- added new tests
- added catchup consensus values to Quorums
- added checkpoint consensus values to Quorums

* add catchup consensus to Quorums

* add ledger_status quorum

* Checkpoint bug (hyperledger#264)

* removing unused config variables and imports

* remove commented code

* fix bug with checkpoint and gc after view change

* Feature Added: Repo consolidation (hyperledger#262)

* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py

* update test

* Corrected GET_TXN Responce type

* Corrected get_Txn response

* Test network did (hyperledger#261)

* added some tests for genesis pool files, showing some brittlness

* Changed test_network_setup to use DIDs

test_network_setup used cryptonym but we are switching over to DID style Ids. Cli no longer easily support cryptonym so we need the test genisus txn to also use DID.

* Signature is not required for GET_TXN transaction. Corrected GET_TXN tets

* Fix serialization of messages when ujson < 1.35 is used (hyperledger#266)

* add test for serialization of messages

* override __dir__ method for MessageBase to exclude service fields

* add test for dir over message

* Corrected checking

* Node requests Propagates if needed (hyperledger#269)

* removing unused config variables and imports

* remove commented code

* fix bug with checkpoint and gc after view change

* Feature Added: Repo consolidation (hyperledger#262)

* [WIP] Repo merge

Merged in ledger

* [WIP] Repo merge

Merged in state, stp

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* [WIP] Repo merge

Test fixes

* Update Jenkinsfile

* Update setup.py

* update test

* Node requests PROPAGATEs

If a node receives a PRE-PREPARE but does not enough finalised requests, it requests PROPAGATEs

* use fixture params in test and update test with more checks

* use correct type

* add and update tests

* Deleted reference to sovrin_common

* Corrected GET_TXN Response type (hyperledger#265)

* test

* Added predicates constant

* Reverted unusued changes

* Moved handleGetTnxReq function in plenum

* Corrected params in getReplyFromLedger function

* GET_TXN request handling

* Fixed comments

* Changed GET_TXN response

* Added test that resu; of get_txn transaction same as expected

* Corrected GET_TXN Responce type

* Corrected get_Txn response

* Signature is not required for GET_TXN transaction. Corrected GET_TXN tets

* Corrected checking

* Deleted reference to sovrin_common

* HashStore is used to recover when the ledger starts, fixed the calcu… (hyperledger#271)

* Hash store is used to recover when the ledger starts, fixed the calculation for consistency

Recovering from transaction log is slow as each transaction is applied again to the tree.

* change log level

* put imports at top and add a property to HashStore

* fix ujson version to have the same serialization of composite messages (hyperledger#272)

* fix ujson version to have the same serialization of composite messages

* fix serialization test

* Set consensus for catchup and ladger_status to f + 1

* use epoch for time in PRE-PREPARE and PREPARE

* Authenticator will not authenticate cryptonyms not on ledger - INDY 213 (hyperledger#267)

* CRYPTONYMS WILL NOW CHECK ON LEDGER

When a cryptonym was given that was not on the
ledger, the authenticator would not verfiy and
use the credentials supplied by the client.

* RYPTONYMS WILL NOW CHECK ON LEDGER - INDY 213

When a cryptonym not on the ledger is attempted
to be authenticated, it should check the ledger
and not depend on the credentials provided by
the client.  When this occurs, the
authenticator should  throw an exception
(because the verkey is None)

* Removed unittest, switched for proper pytest.raises

* Feature/indy 399 (hyperledger#274)

* Feature Added: Package renaming support

* Feature Added: Package renaming support

* Feature Added: Package renaming support

* Feature Added: Package renaming support

* Merge preparations

* Update Jenkinsfile

* Update Jenkinsfile

* first working draft of timestamps

* refactor, clear previous view checkpoint and ignore checkpoint digest… (hyperledger#273)

* refactor, clear previous view checkpoint and ignore checkpoint digest check for non-master

* rename method, fix spelling and indentation

* Catchup if 3pc messages are missed, INDY-335

* start the catchup procedure if a node going to stash second CHECKPOINT

* minor refactor

* add TODOs

* Do not start catchup if already started

* Do not start catchup for primary or non-master

Start the catchup procedure only for master non-primary replicas

* Fix stashed_checkpoints_with_quorum

* Updated ci helpers (hyperledger#276)

* storing time in ledger

* add error log to global whitelist and handle exception while processing PRE-PREPARE

* rename and add missed parameter

* update test

* Corrected GET_TXN response

* more tests

* not ignoring txn time

* Message for notifying lagged nodes about previously selected primary (hyperledger#277)

* add test for CurrentState message

* create CurrentState message

* send CurrentState to lagged nodes

* make message tests check order of fields correctly

* refactor creation of router for node messages

* handler received CurrentState message

* update name of method for sending current state

* update CurrentState message

* add CurrentState message to whitelist

* add test for propagation of current state

* change type of field in CurrentState

* add methods of node related to CurrentState message to spylog

* add debug log message for processing of current state

* add verbose messag for assertion

* unwrap ViewChangeDone message from LedgerStatus and send it to elector

* remove commented sendElectionMsgsToLaggingNode method

* add MessageField field validator

* make _validate_message instane method

* discard LedgerStatus if cannot parse internal messages

* set todo about changing validation of internal messages

* Add explicit log message on successful Notifier Plugin Import (hyperledger#281)

* adding item to quorums

* Stable

Signed-off-by: Andrei Goncharov <[email protected]>
Sign-off-executed-by: toktar <[email protected]>
Approved-at: h-master
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.

2 participants