{"action":"created","issue":{"url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/2182","repository_url":"https://api.github.com/repos/bigchaindb/bigchaindb","labels_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/2182/labels{/name}","comments_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/2182/comments","events_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/2182/events","html_url":"https://github.com/bigchaindb/bigchaindb/issues/2182","id":311884467,"number":2182,"title":"When numerous inputs to a TRANSFER txn, BDB crashes (v2.0.0a1)","user":{"login":"harlantwood","id":38769,"avatar_url":"https://avatars0.githubusercontent.com/u/38769?v=4","gravatar_id":"","url":"https://api.github.com/users/harlantwood","html_url":"https://github.com/harlantwood","followers_url":"https://api.github.com/users/harlantwood/followers","following_url":"https://api.github.com/users/harlantwood/following{/other_user}","gists_url":"https://api.github.com/users/harlantwood/gists{/gist_id}","starred_url":"https://api.github.com/users/harlantwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harlantwood/subscriptions","organizations_url":"https://api.github.com/users/harlantwood/orgs","repos_url":"https://api.github.com/users/harlantwood/repos","events_url":"https://api.github.com/users/harlantwood/events{/privacy}","received_events_url":"https://api.github.com/users/harlantwood/received_events","type":"User","site_admin":false},"labels":[{"id":323044732,"url":"https://api.github.com/repos/bigchaindb/bigchaindb/labels/BUG","name":"BUG","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-06T08:11:21Z","updated_at":"2018-04-12T09:44:03Z","closed_at":null,"author_association":"NONE","body":"### What computer are you on (hardware)?\r\n\r\nMBP 2.5 GHz Intel Core i7\r\n\r\n### What operating system are you using, including version. e.g. Ubuntu 14.04? Fedora 23?\r\n\r\nOSX 10.12.6 (Sierra)\r\n\r\n### What version of BigchainDB software were you using?\r\n\r\nI am seeing this error on Bigchain 2.0alpha1 ([v2.0.0a1](https://github.com/bigchaindb/bigchaindb/tree/v2.0.0a1)), and the current master branch (4 commits later: 8c1ee8329ecbff28f52b4540b5ad5f26c50b421e).\r\n\r\nMy docker versions:\r\n\r\n```\r\n$ docker -v\r\nDocker version 18.03.0-ce, build 0520e24\r\n$ docker-compose -v\r\ndocker-compose version 1.20.1, build 5d8c71b\r\n```\r\n\r\n### What, exactly, did you do to get to the point where you got stuck? Describe all the steps so we can get there too. \r\n\r\nI'm starting the BDB server from the source dir with:\r\n\r\n```\r\ndocker container rm --force --volumes $(docker container ls --quiet --all)  \r\ndocker-compose build bigchaindb\r\ndocker-compose run -d bdb\r\n```\r\n\r\nUsing the JS BDB driver `v4.0.0`, I am: \r\n- creating an asset pool with 10^18 tokens\r\n- transferring tokens to (demo) users\r\n- transferring tokens between users\r\n- every time I transfer, I collect all UTXOs for that user into the inputs of the transaction\r\n- **this works fine when the user has one or maybe a few UTXOs, but consistently fails when we are gathering 5+ UTXOs into a single transaction's inputs**\r\n\r\n### Show what actually happened.\r\n\r\nHere are the 5 UTXs in one case -- in the format `[ [ tx1, output_index ], [ tx2, output_index ] ... ]`:\r\n\r\n```json\r\n\r\n    [\r\n        [\r\n            {\r\n                \"inputs\": [\r\n                    {\r\n                        \"owners_before\": [\r\n                            \"Bk2BioQgWTp77M7YD5fqy5R5AFYmqMCDpoTxqiJfcJzZ\"\r\n                        ],\r\n                        \"fulfills\": {\r\n                            \"transaction_id\": \"4e26752bbf1064ef62cc80d6ce298986a3406bfb8e3671ba5fec519940e5470d\",\r\n                            \"output_index\": 0\r\n                        },\r\n                        \"fulfillment\": \"pGSAIJ-aLwqjNjfRk8S2WzMqXZs7icj1NADyjAU_ccTQh-MmgUBnEnqgh4fzwEPfU3iJdD8qSvGAftKyVXgqaZkeFi_e9dj1y-43hN4uEMGbrtyI_hAFviwVFtoe-eaxpfXGTAEO\"\r\n                    }\r\n                ],\r\n                \"outputs\": [\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;jMWj1B1UtcqNzwLBis7hVV22kaXqzhwribK-uFCfQ8I?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"1000000\"\r\n                    },\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"Bk2BioQgWTp77M7YD5fqy5R5AFYmqMCDpoTxqiJfcJzZ\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"Bk2BioQgWTp77M7YD5fqy5R5AFYmqMCDpoTxqiJfcJzZ\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;ns6Kpex7Z9MpALWkaDI6aVBx5ty6Qc8LY7Q1iDW9YXg?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"999999999999000000\"\r\n                    }\r\n                ],\r\n                \"operation\": \"TRANSFER\",\r\n                \"metadata\": {\r\n                    \"token\": \"ZPWA3\"\r\n                },\r\n                \"asset\": {\r\n                    \"id\": \"4e26752bbf1064ef62cc80d6ce298986a3406bfb8e3671ba5fec519940e5470d\"\r\n                },\r\n                \"version\": \"2.0\",\r\n                \"id\": \"9c3665af349891861701a095d815c9c58e65beea77d5b4f824629fab8cafb16a\"\r\n            },\r\n            0\r\n        ],\r\n        [\r\n            {\r\n                \"inputs\": [\r\n                    {\r\n                        \"owners_before\": [\r\n                            \"619SJWs16VE49JjJnQvXoY8JccoHKxdkdUgmjUyKMyYQ\"\r\n                        ],\r\n                        \"fulfills\": {\r\n                            \"transaction_id\": \"7fd55d16bf4d7653f69fd3a0936f337a0ce318206fae2ec5aa69c73ef37d4e71\",\r\n                            \"output_index\": 0\r\n                        },\r\n                        \"fulfillment\": \"pGSAIEpT-TiZ8emsNwwKuCKVq_rK0ElTIbQUJwaxlPNNDXf9gUBNfuZg68I8TBe6vxiysgLmaZJe-6veFZRHJYoVTb6ChdiScCS3w9rbiej72JEEDdwGaIEq6MbNoflL7ouxFbUM\"\r\n                    }\r\n                ],\r\n                \"outputs\": [\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;jMWj1B1UtcqNzwLBis7hVV22kaXqzhwribK-uFCfQ8I?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"50\"\r\n                    },\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"619SJWs16VE49JjJnQvXoY8JccoHKxdkdUgmjUyKMyYQ\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"619SJWs16VE49JjJnQvXoY8JccoHKxdkdUgmjUyKMyYQ\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;HS5KO5j16sbCBqbOP9rTOfClmiBO5_DLmnx37tWasek?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"25\"\r\n                    }\r\n                ],\r\n                \"operation\": \"TRANSFER\",\r\n                \"metadata\": {\r\n                    \"token\": \"ZPWA3\"\r\n                },\r\n                \"asset\": {\r\n                    \"id\": \"4e26752bbf1064ef62cc80d6ce298986a3406bfb8e3671ba5fec519940e5470d\"\r\n                },\r\n                \"version\": \"2.0\",\r\n                \"id\": \"879d23682b8658517b5a3a1126dd9226ffd77dcc78e239a43d210ce6b5cc2200\"\r\n            },\r\n            0\r\n        ],\r\n        [\r\n            {\r\n                \"inputs\": [\r\n                    {\r\n                        \"owners_before\": [\r\n                            \"DadQTQsEqzje9q9r8WrW8PhmrcAg6q9AschN3JXS9Mui\"\r\n                        ],\r\n                        \"fulfills\": {\r\n                            \"transaction_id\": \"9248e1b856d0d9f2314ee1be28e1452f368021782dec6cbf113c61f3f6aec463\",\r\n                            \"output_index\": 1\r\n                        },\r\n                        \"fulfillment\": \"pGSAILrpkokn9vmaW8zIllS51EWHODaIDXqAs3DTD4wA2YORgUD4woG5pIEMGFiWSMB3_NTQ_J6Ejtr2-Sd0PM2ImcCSDPBHSNqPiWdyzk_CXPfv8nMGvAV5W7EX4HQ4d50zJXEM\"\r\n                    }\r\n                ],\r\n                \"outputs\": [\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;jMWj1B1UtcqNzwLBis7hVV22kaXqzhwribK-uFCfQ8I?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"10\"\r\n                    },\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"DadQTQsEqzje9q9r8WrW8PhmrcAg6q9AschN3JXS9Mui\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"DadQTQsEqzje9q9r8WrW8PhmrcAg6q9AschN3JXS9Mui\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;4NZbp4IQDZ-qw77dXDbhqtd14qqfn8EGf8tkHdh6inc?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"77\"\r\n                    }\r\n                ],\r\n                \"operation\": \"TRANSFER\",\r\n                \"metadata\": {\r\n                    \"token\": \"ZPWA3\"\r\n                },\r\n                \"asset\": {\r\n                    \"id\": \"4e26752bbf1064ef62cc80d6ce298986a3406bfb8e3671ba5fec519940e5470d\"\r\n                },\r\n                \"version\": \"2.0\",\r\n                \"id\": \"ec1899f2ccb8fee34e712c713de7bf10047e4ed51764e4112aa3d1a3e11c885f\"\r\n            },\r\n            0\r\n        ],\r\n        [\r\n            {\r\n                \"inputs\": [\r\n                    {\r\n                        \"owners_before\": [\r\n                            \"FN2rF7founsXmbhowj4JHP7jFAfPukWskTUatXURpGGt\"\r\n                        ],\r\n                        \"fulfills\": {\r\n                            \"transaction_id\": \"e82db8662a160e4f615f2805ca43598576996b11ebe234d9e70e038dab5da615\",\r\n                            \"output_index\": 1\r\n                        },\r\n                        \"fulfillment\": \"pGSAINVm55eaRf2XuHO_vW4F6TlMbl4sF1KE-9CyKoKHuQltgUDCLznarfMWk87voA0xdOeD923fmjwF1ZOARnsw2whNrRjKb_ep_EcXQenPHgjsCokdV8gD6hCpMhE4XRqvasMI\"\r\n                    }\r\n                ],\r\n                \"outputs\": [\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;jMWj1B1UtcqNzwLBis7hVV22kaXqzhwribK-uFCfQ8I?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"10\"\r\n                    },\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"FN2rF7founsXmbhowj4JHP7jFAfPukWskTUatXURpGGt\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"FN2rF7founsXmbhowj4JHP7jFAfPukWskTUatXURpGGt\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;_Opd6GQC62pVXxYeFr9CgC9E49iy9IxOwZciX0B_Omo?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"36\"\r\n                    }\r\n                ],\r\n                \"operation\": \"TRANSFER\",\r\n                \"metadata\": {\r\n                    \"token\": \"ZPWA3\"\r\n                },\r\n                \"asset\": {\r\n                    \"id\": \"4e26752bbf1064ef62cc80d6ce298986a3406bfb8e3671ba5fec519940e5470d\"\r\n                },\r\n                \"version\": \"2.0\",\r\n                \"id\": \"cdeff8a6e329c5bd6e48d5855861b866961ea5cc21b632b8b04493de28758b9a\"\r\n            },\r\n            0\r\n        ],\r\n        [\r\n            {\r\n                \"inputs\": [\r\n                    {\r\n                        \"owners_before\": [\r\n                            \"41eYz8YN6dFeEGmg2HJoGeHXXerD8jaHh1mA6M52Anez\"\r\n                        ],\r\n                        \"fulfills\": {\r\n                            \"transaction_id\": \"fe2d1d7683d63825abf4aea5f598550892e93a9098fd7b0365572496196cb62d\",\r\n                            \"output_index\": 0\r\n                        },\r\n                        \"fulfillment\": \"pGSAICy9hTYVJihkG6pLLr4dNSm8b_SkpAPOWLDaYFRUwHlngUC-2DWkDdtlDK_ieoWC_bjmuyKRKvytoXyiWSdZDLpdsp0lkNXBbGSdoGkCJnrXeJo1Zl30aqd47GkBkCG0w3oC\"\r\n                    }\r\n                ],\r\n                \"outputs\": [\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;jMWj1B1UtcqNzwLBis7hVV22kaXqzhwribK-uFCfQ8I?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"27\"\r\n                    },\r\n                    {\r\n                        \"public_keys\": [\r\n                            \"41eYz8YN6dFeEGmg2HJoGeHXXerD8jaHh1mA6M52Anez\"\r\n                        ],\r\n                        \"condition\": {\r\n                            \"details\": {\r\n                                \"type\": \"ed25519-sha-256\",\r\n                                \"public_key\": \"41eYz8YN6dFeEGmg2HJoGeHXXerD8jaHh1mA6M52Anez\"\r\n                            },\r\n                            \"uri\": \"ni:///sha-256;FYr6AiBntYFQPP1LXY39PmitvzeXJSdizmKYKkpT_7E?fpt=ed25519-sha-256&cost=131072\"\r\n                        },\r\n                        \"amount\": \"37\"\r\n                    }\r\n                ],\r\n                \"operation\": \"TRANSFER\",\r\n                \"metadata\": {\r\n                    \"token\": \"ZPWA3\"\r\n                },\r\n                \"asset\": {\r\n                    \"id\": \"4e26752bbf1064ef62cc80d6ce298986a3406bfb8e3671ba5fec519940e5470d\"\r\n                },\r\n                \"version\": \"2.0\",\r\n                \"id\": \"05092e4fe85627019da69e50c3dd7eee1544d4341b0da9847cc800e0c329681c\"\r\n            },\r\n            0\r\n        ]\r\n    ]\r\n```\r\n\r\nWe do a little transforming and then call `makeTransferTransaction(...)`:\r\n\r\n```js\r\n    const inputs = unspent_transactions.map(([tx, output_index]) => {\r\n      return { tx, output_index }\r\n    })\r\n    // ...\r\n    const txTransfer = driver.Transaction.makeTransferTransaction(inputs, outputs, metadata)\r\n```\r\n\r\nwhich returns the unsigned transaction:\r\n\r\n```json\r\n{\r\n    \"id\": null,\r\n    \"operation\": \"TRANSFER\",\r\n    \"outputs\": [\r\n        {\r\n            \"condition\": {\r\n                \"details\": {\r\n                    \"type\": \"ed25519-sha-256\",\r\n                    \"public_key\": \"D5u6FxVjCxgDyFMGTQ5M8BAvYWpnBW7thz31Y4BtKXtX\"\r\n                },\r\n                \"uri\": \"ni:///sha-256;fNL4G2pILtD4YmFKUP5XJGT_Dg0cRfOnaWh0QSotM3E?fpt=ed25519-sha-256&cost=131072\"\r\n            },\r\n            \"amount\": \"36\",\r\n            \"public_keys\": [\r\n                \"D5u6FxVjCxgDyFMGTQ5M8BAvYWpnBW7thz31Y4BtKXtX\"\r\n            ]\r\n        },\r\n        {\r\n            \"condition\": {\r\n                \"details\": {\r\n                    \"type\": \"ed25519-sha-256\",\r\n                    \"public_key\": \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                },\r\n                \"uri\": \"ni:///sha-256;jMWj1B1UtcqNzwLBis7hVV22kaXqzhwribK-uFCfQ8I?fpt=ed25519-sha-256&cost=131072\"\r\n            },\r\n            \"amount\": \"1000061\",\r\n            \"public_keys\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        }\r\n    ],\r\n    \"inputs\": [\r\n        {\r\n            \"fulfillment\": null,\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"9c3665af349891861701a095d815c9c58e65beea77d5b4f824629fab8cafb16a\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        },\r\n        {\r\n            \"fulfillment\": null,\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"879d23682b8658517b5a3a1126dd9226ffd77dcc78e239a43d210ce6b5cc2200\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        },\r\n        {\r\n            \"fulfillment\": null,\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"ec1899f2ccb8fee34e712c713de7bf10047e4ed51764e4112aa3d1a3e11c885f\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        },\r\n        {\r\n            \"fulfillment\": null,\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"cdeff8a6e329c5bd6e48d5855861b866961ea5cc21b632b8b04493de28758b9a\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        },\r\n        {\r\n            \"fulfillment\": null,\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"05092e4fe85627019da69e50c3dd7eee1544d4341b0da9847cc800e0c329681c\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        }\r\n    ],\r\n    \"metadata\": {\r\n        \"token\": \"ZPWA3\"\r\n    },\r\n    \"asset\": {\r\n        \"id\": \"4e26752bbf1064ef62cc80d6ce298986a3406bfb8e3671ba5fec519940e5470d\"\r\n    },\r\n    \"version\": \"2.0\"\r\n}\r\n```\r\n\r\nThen we sign with the private key, in this case `H6YxYVQZUW67dQxdZJGY7VzdW5fUFfHtkzK7iQqJiHD7` (random key from demo user).\r\n\r\n```js\r\n    const private_keys = Array(inputs.length).fill(private_key)\r\n    let txSigned = driver.Transaction.signTransaction(txTransfer, ...private_keys)\r\n```\r\n\r\n...and get back a signed transaction:\r\n\r\n```json\r\n{\r\n    \"id\": \"725e3ad7fcdf603e3720f94d09939b8eb0f45789423231ce3907d1f064946309\",\r\n    \"operation\": \"TRANSFER\",\r\n    \"outputs\": [\r\n        {\r\n            \"condition\": {\r\n                \"details\": {\r\n                    \"type\": \"ed25519-sha-256\",\r\n                    \"public_key\": \"D5u6FxVjCxgDyFMGTQ5M8BAvYWpnBW7thz31Y4BtKXtX\"\r\n                },\r\n                \"uri\": \"ni:///sha-256;fNL4G2pILtD4YmFKUP5XJGT_Dg0cRfOnaWh0QSotM3E?fpt=ed25519-sha-256&cost=131072\"\r\n            },\r\n            \"amount\": \"36\",\r\n            \"public_keys\": [\r\n                \"D5u6FxVjCxgDyFMGTQ5M8BAvYWpnBW7thz31Y4BtKXtX\"\r\n            ]\r\n        },\r\n        {\r\n            \"condition\": {\r\n                \"details\": {\r\n                    \"type\": \"ed25519-sha-256\",\r\n                    \"public_key\": \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n                },\r\n                \"uri\": \"ni:///sha-256;jMWj1B1UtcqNzwLBis7hVV22kaXqzhwribK-uFCfQ8I?fpt=ed25519-sha-256&cost=131072\"\r\n            },\r\n            \"amount\": \"1000061\",\r\n            \"public_keys\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        }\r\n    ],\r\n    \"inputs\": [\r\n        {\r\n            \"fulfillment\": \"pGSAINbm6mW3crm5Ae7486D0pkO7UmjcLV-BoyvtN0BWaBENgUCpn2R1wiBa9IC0oXqEU3M7-jP-RwakZAp3dZchcVLkvGiggbzkFIWDXrHtYXr_4mjAwpKOgMWJV7MEBVHHMrsG\",\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"9c3665af349891861701a095d815c9c58e65beea77d5b4f824629fab8cafb16a\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        },\r\n        {\r\n            \"fulfillment\": \"pGSAINbm6mW3crm5Ae7486D0pkO7UmjcLV-BoyvtN0BWaBENgUA2zxIrnynGNVur2bS4ZNJt1QZJKAp0PaA2p1POSSNjM_O-1hhbIG7bw9ZrOkHUx2E5XXMZmxO1bZ29kXQaIuYP\",\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"879d23682b8658517b5a3a1126dd9226ffd77dcc78e239a43d210ce6b5cc2200\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        },\r\n        {\r\n            \"fulfillment\": \"pGSAINbm6mW3crm5Ae7486D0pkO7UmjcLV-BoyvtN0BWaBENgUA-VJYVxeC8R4yIJ_YZSDu8X8LuoSS1x9k2k64fdrx4v0Rki8ZerfRrohYR2ERXNUCLfVDbkLXAf3YrMpDXeSIG\",\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"ec1899f2ccb8fee34e712c713de7bf10047e4ed51764e4112aa3d1a3e11c885f\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        },\r\n        {\r\n            \"fulfillment\": \"pGSAINbm6mW3crm5Ae7486D0pkO7UmjcLV-BoyvtN0BWaBENgUAA1IMyNkOFmvkuAFBA2mJxMaEHcY3HpE88PpUM35MiA7K3cBkjaFL_wSiwOCRKPJksnRWIPYNOl9GJV3Y6lPEB\",\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"cdeff8a6e329c5bd6e48d5855861b866961ea5cc21b632b8b04493de28758b9a\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        },\r\n        {\r\n            \"fulfillment\": \"pGSAINbm6mW3crm5Ae7486D0pkO7UmjcLV-BoyvtN0BWaBENgUDNV1rvklvXUvzxf5ReJfeibSle9LOnGQGi2Qm0vzYbUB0Z-hBniPFaVcdZFZ4d3-KPgiTP-Cc0SAr3lEMQmP0L\",\r\n            \"fulfills\": {\r\n                \"output_index\": 0,\r\n                \"transaction_id\": \"05092e4fe85627019da69e50c3dd7eee1544d4341b0da9847cc800e0c329681c\"\r\n            },\r\n            \"owners_before\": [\r\n                \"FTtUGxa79FeveRoK3MHP7Hy5JxrAPqLmF6xxtgVewcH2\"\r\n            ]\r\n        }\r\n    ],\r\n    \"metadata\": {\r\n        \"token\": \"ZPWA3\"\r\n    },\r\n    \"asset\": {\r\n        \"id\": \"4e26752bbf1064ef62cc80d6ce298986a3406bfb8e3671ba5fec519940e5470d\"\r\n    },\r\n    \"version\": \"2.0\"\r\n}\r\n```\r\n\r\nwe ship this off to BDB server with:\r\n\r\n```js\r\n    return conn.postTransactionCommit(txSigned)\r\n    .then(retrievedTx => {\r\n      console.log({retrievedTx})\r\n    })\r\n```\r\n\r\n...but no response from the server.  After some seconds, the docker compose logs say:\r\n\r\n```\r\nbigchaindb_1   | [2018-04-06 05:56:53] [CRITICAL] (gunicorn.error) WORKER TIMEOUT (pid:19) (webapi     - pid: 13)\r\nbigchaindb_1   | [2018-04-06 05:56:53] [INFO] (gunicorn.error) Worker exiting (pid: 19) (webapi     - pid: 19)\r\nmongodb_1      | 2018-04-06T05:56:53.641+0000 I -        [conn5] end connection 172.19.0.4:38840 (4 connections now open)\r\nmongodb_1      | 2018-04-06T05:56:53.641+0000 I -        [conn6] end connection 172.19.0.4:38842 (4 connections now open)\r\nbigchaindb_1   | [2018-04-06 05:56:53] [INFO] (gunicorn.error) Booting worker with pid: 744 (webapi     - pid: 744)\r\n```\r\n\r\nSome more seconds later, our NodeJS layer says:\r\n\r\n```\r\n{ FetchError: request to http://127.0.0.1:9984/api/v1/transactions?mode=commit failed, reason: socket hang up\r\n    at ClientRequest.<anonymous> (/[...snip...]/node_modules/fetch-ponyfill/node_modules/node-fetch/lib/index.js:1393:11)\r\n    at emitOne (events.js:115:13)\r\n    at ClientRequest.emit (events.js:210:7)\r\n    at Socket.socketOnEnd (_http_client.js:421:9)\r\n    at emitNone (events.js:110:20)\r\n    at Socket.emit (events.js:207:7)\r\n    at endReadableNT (_stream_readable.js:1056:12)\r\n    at _combinedTickCallback (internal/process/next_tick.js:138:11)\r\n    at process._tickDomainCallback (internal/process/next_tick.js:218:9)\r\n  message: 'request to http://127.0.0.1:9984/api/v1/transactions?mode=commit failed, reason: socket hang up',\r\n  type: 'system',\r\n  errno: 'ECONNRESET',\r\n  code: 'ECONNRESET' }\r\n```\r\n\r\nAt this point, BDB is unresponsive; I restart the docker containers from scratch to get it back.\r\n\r\nI have tested this repeatedly with consistent results.  I can do hundreds of transfers as fast as I can create them with the same code, as long as just one or a few UTXOs are used as inputs.  But at 5+ UTXOs, I get this behavior every time.\r\n\r\n### Provide details to convince us that it matters to you.\r\n\r\nWe are evaluating BDB for my financial services client; solving this is critical to us moving forward with BDB."},"comment":{"url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/comments/380743119","html_url":"https://github.com/bigchaindb/bigchaindb/issues/2182#issuecomment-380743119","issue_url":"https://api.github.com/repos/bigchaindb/bigchaindb/issues/2182","id":380743119,"user":{"login":"harlantwood","id":38769,"avatar_url":"https://avatars0.githubusercontent.com/u/38769?v=4","gravatar_id":"","url":"https://api.github.com/users/harlantwood","html_url":"https://github.com/harlantwood","followers_url":"https://api.github.com/users/harlantwood/followers","following_url":"https://api.github.com/users/harlantwood/following{/other_user}","gists_url":"https://api.github.com/users/harlantwood/gists{/gist_id}","starred_url":"https://api.github.com/users/harlantwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harlantwood/subscriptions","organizations_url":"https://api.github.com/users/harlantwood/orgs","repos_url":"https://api.github.com/users/harlantwood/repos","events_url":"https://api.github.com/users/harlantwood/events{/privacy}","received_events_url":"https://api.github.com/users/harlantwood/received_events","type":"User","site_admin":false},"created_at":"2018-04-12T09:44:03Z","updated_at":"2018-04-12T09:44:03Z","author_association":"NONE","body":"Thanks @kansi.  Will you be upgrading to a newer tendermint?  \r\n\r\nWould be good for this script or something simpler that reproduces the same bug to make it into the test suite for BDB. For that matter, not just 5 inputs, but... some large number.  And if TM can handle only limited inputs (hopefully not), we should enforce that on the BDB server side.  "}}
{"actor":{"display_login":"harlantwood"}}