iroha GitHub
| PR #996 | Network timeout fix |
| iroha2 | Signed-off-by: i1i1 <vanyarybin1@live.ru> ### Description of the Change Add compilation feature for opting test timeout for tests. ### Benefits No timeouts for tests. ### Possible Drawbacks ### Usage Examples or Tests *[optional]* ### Alternate Designs *[optional]* |
Created At 2021-04-27 08:20:02 +0000 UTC
| PR #995 | Refactor/remove rxcpp |
| - SE field in Irohad class - Remove rxcpp from TransactionProcessorImpl - Use any_range in BlockLoader interface |
Created At 2021-04-26 19:27:32 +0000 UTC
| PR #994 | #826 Fix grpc msg size | ||||||||||||||||||||||||
| # The problem iroha freezes inside GRPC when waiting response to a big (more than 4MB) message. # Steps to reproduce Send long transactions batch (more than 250) ``` from iroha import * def public_key_from_private(private_key: str): return IrohaCrypto.derive_public_key(private_key).decode('utf-8') def send_signed_batch_transaction(txs, net): net.send_txs(txs) for tx in txs: print(f'Transaction hash = {calculate_hash_of_transaction(tx)}') for status_name, status_code, error_code in net.tx_status_stream(tx, timeout=20): print(f'\tstatus_name:{status_name}, status_code:{status_code}, error_code:{error_code}') def calculate_hash_of_transaction(transaction_with_payload): h = IrohaCrypto.hash(transaction_with_payload) return binascii.hexlify(h).decode("utf-8") if __name__ == '__main__': IROHA_HOST_ADDR = os.getenv('IROHA_HOST_ADDR', 'localhost') IROHA_PORT = os.getenv('IROHA_PORT', '50051') ADMIN_ACCOUNT_ID = os.getenv('ADMIN_ACCOUNT_ID', 'admin@test') ADMIN_PRIVATE_KEY = os.getenv('ADMIN_PRIVATE_KEY', 'f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70') iroha = Iroha(ADMIN_ACCOUNT_ID) net = IrohaGrpc(f'{IROHA_HOST_ADDR}:{IROHA_PORT}',max_message_length=400*1024*1024) new_user_private_key = '1234567890123456789012345678901234567890123456789012345678901234' new_user_public_key = public_key_from_private(new_user_private_key) accounts_to_create = 250 txs = [] for i in range(accounts_to_create): txs.append( iroha.transaction([ iroha.command('CreateAccount', account_name=f'1p_account_{i}', domain_id='test', public_key=new_user_public_key) ])) iroha.batch(txs, atomic=False) for tx in txs: IrohaCrypto.sign_transaction(tx, ADMIN_PRIVATE_KEY) send_signed_batch_transaction(txs, net) ``` After this iroha freezes and python script results with ``` status = StatusCode.DEADLINE_EXCEEDED details = "Deadline Exceeded" debug_error_string = "{"created":"@1619454477.951686000","description":"Error received from peer ipv6:[::1]:50051","file":"src/core/lib/surface/call.cc","file_line":1068,"grpc_message":"Deadline Exceeded","grpc_status":4}" ``` # Result after fix > Received message larger than max (4207140 vs. 4194304) ``` > python3 batch_test.py Traceback (most recent call last): File "/batch_test.py", line 47, in Created At 2021-04-26 16:37:04 +0000 UTC </div>
Created At 2021-04-26 14:55:10 +0000 UTC
Created At 2021-04-26 12:32:59 +0000 UTC
Created At 2021-04-24 15:42:08 +0000 UTC
Created At 2021-04-23 08:06:09 +0000 UTC
Created At 2021-04-22 09:52:32 +0000 UTC
Created At 2021-04-22 09:19:17 +0000 UTC |