no error "Orphan transaction cannot be admitted into the pool"
Current Behavior
after create split address transaction, the utxo index of change of the tx cannot be spent because of error "Orphan transaction cannot be admitted into the pool"
Possible Solution
not to change index of change utxo
Steps to Reproduce
checkout origin/integration_1225 branch
build box and integration
execute integration
the log show tx hash and previous outpoint of utxo, the index change to 4 in the follow log
Phenomenon
log:
18:22:47 jerrypeen:~/go/src/github.com/BOXFoundation/boxd/integration_tests|develop*
⇒ ./integration_tests
INFO[0004] minersAddrs: [b1ndoQmEd83y4Fza5PzbUQDYpT3mV772J5o b1b8bzyci5VYUJVKRU2HRMMQiUXnoULkKAJ b1jh8DSdB6kB7N7RanrudV1hzzMCCcoX6L7 b1UP5pbfJgZrF1ezoSHLdvkxvgF2BYLtGva b1ZWSdrg48g145VdcmBwMPVuDFdaxDLoktk b1fRtRnKF4qhQG7bSwqbgR2BMw9VfM2XpT4] source="integration_tests/main.go:55" tag=integration
INFO[0004] collAccounts = 8 source="utils/config.go:55" tag=integration_utils
INFO[0004] collUnitAccounts = 4 source="utils/config.go:61" tag=integration_utils
INFO[0004] circuAccounts = 8 source="utils/config.go:67" tag=integration_utils
INFO[0004] circuUnitAccounts = 4 source="utils/config.go:73" tag=integration_utils
INFO[0004] tokenAccounts = 6 source="utils/config.go:79" tag=integration_utils
INFO[0004] tokenUnitAccounts = 3 source="utils/config.go:85" tag=integration_utils
INFO[0004] circuRepeatTxTimes = 400 source="utils/config.go:92" tag=integration_utils
INFO[0004] tokenRepeatTxTimes = 100 source="utils/config.go:98" tag=integration_utils
INFO[0004] TxTestEnable = false source="utils/config.go:104" tag=integration_utils
INFO[0004] tokenTestEnable = false source="utils/config.go:110" tag=integration_utils
INFO[0004] tickerDurationTxs = 5 source="utils/config.go:116" tag=integration_utils
INFO[0004] prepare test workspace source="utils/util.go:131" tag=integration_utils
INFO[0004] clean ./.devconfig/ws1 database and logs source="utils/util.go:141" tag=integration_utils
INFO[0004] configure file ./.devconfig/.box-1.yaml and keyfile ./.devconfig/keyfile/key1.keystore exists source="utils/util.go:163" tag=integration_utils
INFO[0004] clean ./.devconfig/ws2 database and logs source="utils/util.go:141" tag=integration_utils
INFO[0004] configure file ./.devconfig/.box-2.yaml and keyfile ./.devconfig/keyfile/key2.keystore exists source="utils/util.go:163" tag=integration_utils
INFO[0004] clean ./.devconfig/ws3 database and logs source="utils/util.go:141" tag=integration_utils
INFO[0004] configure file ./.devconfig/.box-3.yaml and keyfile ./.devconfig/keyfile/key3.keystore exists source="utils/util.go:163" tag=integration_utils
INFO[0004] clean ./.devconfig/ws4 database and logs source="utils/util.go:141" tag=integration_utils
INFO[0004] configure file ./.devconfig/.box-4.yaml and keyfile ./.devconfig/keyfile/key4.keystore exists source="utils/util.go:163" tag=integration_utils
INFO[0004] clean ./.devconfig/ws5 database and logs source="utils/util.go:141" tag=integration_utils
INFO[0004] configure file ./.devconfig/.box-5.yaml and keyfile ./.devconfig/keyfile/key5.keystore exists source="utils/util.go:163" tag=integration_utils
INFO[0004] clean ./.devconfig/ws6 database and logs source="utils/util.go:141" tag=integration_utils
INFO[0004] configure file ./.devconfig/.box-6.yaml and keyfile ./.devconfig/keyfile/key6.keystore exists source="utils/util.go:163" tag=integration_utils
INFO[0004] startLocalNodes: [../box start --config=./.devconfig/.box-1.yaml &] source="utils/util.go:65" tag=integration_utils
INFO[0004] startLocalNodes: [../box start --config=./.devconfig/.box-2.yaml &] source="utils/util.go:65" tag=integration_utils
INFO[0004] startLocalNodes: [../box start --config=./.devconfig/.box-3.yaml &] source="utils/util.go:65" tag=integration_utils
INFO[0004] startLocalNodes: [../box start --config=./.devconfig/.box-4.yaml &] source="utils/util.go:65" tag=integration_utils
INFO[0004] startLocalNodes: [../box start --config=./.devconfig/.box-5.yaml &] source="utils/util.go:65" tag=integration_utils
INFO[0004] startLocalNodes: [../box start --config=./.devconfig/.box-6.yaml &] source="utils/util.go:65" tag=integration_utils
INFO[0007] start to gen 5 address source="integration_tests/base_fmw.go:37" tag=integration
INFO[0007] txs ticker for main start source="integration_tests/common.go:106" tag=integration
WARN[0004] No need to update eternal block because the height is lower than current eternal block height source="dpos/bft_service.go:148" tag=dpos
WARN[0005] No need to update eternal block because the height is lower than current eternal block height source="dpos/bft_service.go:148" tag=dpos
WARN[0006] No need to update eternal block because the height is lower than current eternal block height source="dpos/bft_service.go:148" tag=dpos
WARN[0007] No need to update eternal block because the height is lower than current eternal block height source="dpos/bft_service.go:148" tag=dpos
WARN[0008] No need to update eternal block because the height is lower than current eternal block height source="dpos/bft_service.go:148" tag=dpos
WARN[0009] No need to update eternal block because the height is lower than current eternal block height source="dpos/bft_service.go:148" tag=dpos
INFO[0013] start doTest[0] source="integration_tests/base_fmw.go:86" tag=integration
INFO[0013] waiting for minersAddr b1ndoQmEd83y4Fza5PzbUQDYpT3mV772J5o has 1010000 at least on 127.0.0.1:19111 for split address test source="integration_tests/test_split_addr.go:61" tag=integration
INFO[0013] miner b1ndoQmEd83y4Fza5PzbUQDYpT3mV772J5o send 1010000 box to sender b1XUQ5o5oyr8k8v3EwWogZLsFZK8dvmmzPS source="integration_tests/test_split_addr.go:76" tag=integration
INFO[0013] senderTx hash: [101 54 118 63 30 73 179 222 80 125 58 251 62 167 14 125 100 242 205 24 36 56 58 146 65 84 246 23 9 29 98 82]
body: {
"Version": 0,
"Vin": [
{
"PrevOutPoint": {
"Hash": [
121,
13,
228,
78,
205,
193,
239,
65,
130,
74,
191,
227,
239,
52,
168,
173,
131,
197,
45,
32,
90,
223,
229,
44,
76,
20,
247,
38,
31,
79,
225,
76
],
"Index": 0
},
"ScriptSig": "RzBFAiEA+aurWlyQ2nbLLAnRUZyBS/ubrMdQ0EFsMtdU01HGy8gCIBuPkCDrJpxbyGSyK58bNagY2jJtvf5vQxZzy/nDn8PiIQN//Mw/KrCqRpD1B9EFVSrk4zhAZhXK3H19mKvXE/1xCg==",
"Sequence": 0
}
],
"Vout": [
{
"value": 1010000,
"script_pub_key": "dqkUKDTrE6QJ/rUtwX3i4D/6Bc/1osKIrA=="
},
{
"value": 4998989899,
"script_pub_key": "dqkUzoYFZ4bjQVUw+Mxzn7QUqHQ1tLaIrA=="
}
],
"Data": null,
"Magic": 0,
"LockTime": 0
} source="integration_tests/test_split_addr.go:90" tag=integration
WARN[0010] No need to update eternal block because the height is lower than current eternal block height source="dpos/bft_service.go:148" tag=dpos
INFO[0014] sender b1XUQ5o5oyr8k8v3EwWogZLsFZK8dvmmzPS create split address with addrs [b1hC7vcMr1Ywe7nwH8PMXFoRjZwKBs322Af b1jYA8N2NuFguDMsrynTwDgYpP8SH7p72CQ b1ZvdVPPTEWuqyL8gVNdVnsNEUuvKm6UUfq b1fZQb3byPztFhoyYw9Hg8GFC9K8KTswyVH] and weights [1 2 3 4] source="integration_tests/test_split_addr.go:95" tag=integration
INFO[0014] splitTx hash: [91 66 0 108 117 46 103 232 156 219 165 244 192 193 67 68 92 34 43 85 201 0 163 111 29 217 25 74 238 38 86 0]
body: {
"Version": 0,
"Vin": [
{
"PrevOutPoint": {
"Hash": [
101,
54,
118,
63,
30,
73,
179,
222,
80,
125,
58,
251,
62,
167,
14,
125,
100,
242,
205,
24,
36,
56,
58,
146,
65,
84,
246,
23,
9,
29,
98,
82
],
"Index": 0
},
"ScriptSig": "RjBEAiAn76nLT6IcPX6YPesySzPio7TvPndjHU4Fj3mODRPLSwIgch6wJbNkYXMiWT292X9xLfkx/RpO49fLxrlj8HDwgnkhA9rom1dR6X+Dv0tODEO+vy9tb+mNSfFnMtF7+EGahEQE",
"Sequence": 0
}
],
"Vout": [
{
"script_pub_key": "ahQAoOyRyDTq8AjBQae7tR7HGqjvixSS0ghLOQiBx7ua0K+wWRGYfDXQCAEBFKyMcR5IA63PvaVf23yCBhopX4tTAQIUQxstHZ03zm63glIBSXp7B+xf0v8BAxSA6GziZ5Un34FymFmQRPfevn5GOgEE"
},
{
"value": 1000000,
"script_pub_key": "dqkUKDTrE6QJ/rUtwX3i4D/6Bc/1osKIrA=="
}
],
"Data": null,
"Magic": 0,
"LockTime": 0
} source="integration_tests/test_split_addr.go:110" tag=integration
INFO[0014] wait for balance of sender b1XUQ5o5oyr8k8v3EwWogZLsFZK8dvmmzPS equals to 1000000, timeout 15s source="integration_tests/test_split_addr.go:112" tag=integration
WARN[0011] No need to update eternal block because the height is lower than current eternal block height source="dpos/bft_service.go:148" tag=dpos
INFO[0015] === RUN splitAddrRepeatTest source="integration_tests/test_split_addr.go:129" tag=integration
INFO[0015] before split addrs txs, sender[b1XUQ5o5oyr8k8v3EwWogZLsFZK8dvmmzPS] balance: 1000000, receivers balance: [0 0 0 0] source="integration_tests/test_split_addr.go:142" tag=integration
INFO[0015] send split tx hash: [93 117 85 10 136 107 144 53 29 42 83 17 201 224 76 20 201 129 37 16 112 76 200 24 128 81 186 206 66 112 15 109]
body: {
"Version": 0,
"Vin": [
{
"PrevOutPoint": {
"Hash": [
91,
66,
0,
108,
117,
46,
103,
232,
156,
219,
165,
244,
192,
193,
67,
68,
92,
34,
43,
85,
201,
0,
163,
111,
29,
217,
25,
74,
238,
38,
86,
0
],
"Index": 4
},
"ScriptSig": "RzBFAiEA9UVjNN1FpPd2JNe+b84ZOMsEH9F3vks58UBUao2R1xACIBc1PsFrOQ+wy7rIsfmEVMfym+4wYUivJbzMD4HRufnLIQPa6JtXUel/g79LTgxDvr8vbW/pjUnxZzLRe/hBmoREBA==",
"Sequence": 0
}
],
"Vout": [
{
"value": 999921,
"script_pub_key": "dqkUAKDskcg06vAIwUGnu7Uexxqo74uIrA=="
},
{
"script_pub_key": "dqkUKDTrE6QJ/rUtwX3i4D/6Bc/1osKIrA=="
}
],
"Data": null,
"Magic": 0,
"LockTime": 0
} source="integration_tests/test_split_addr.go:169" tag=integration
PANI[0015] rpc error: code = Unknown desc = Orphan transaction cannot be admitted into the pool source="integration_tests/test_split_addr.go:171" tag=integration
ERRO[0015] &{0xc0000be820 map[source:integration_tests/test_split_addr.go:171 tag:integration] 2018-12-25 18:23:04.131169 +0800 CST m=+15.612862346 panic rpc error: code = Unknown desc = Orphan transaction cannot be admitted into the pool <nil> } source="integration_tests/test_split_addr.go:43" tag=integration
Expected Behavior
no error "Orphan transaction cannot be admitted into the pool"
Current Behavior
after create split address transaction, the utxo index of change of the tx cannot be spent because of error "Orphan transaction cannot be admitted into the pool"
Possible Solution
not to change index of change utxo
Steps to Reproduce
Phenomenon
log:
Context (Environment)
Detailed Description
Possible Implementation