[00:03:47] @Matt (Dev) what are "cloned transactions with malleated scriptsigs"? [00:04:27] that means the script signatures have been tampered with [00:04:34] @aguycalled [00:04:58] https://bitcointalk.org/index.php?topic=1231301.0 [00:04:59] You can read here [00:05:08] Thanks [01:26:32] @aguycalled I am confused about what invalidateblocks should be doing in terms of mempool, does it return all transactions in that block back to mempool of the node or simply not use them? I expect that they shouldn't return to mempool, but a bitcoin test states otherwise in comments. When i ran a test which invalidates a block, I checked the chaintips before and after the invalidation python before invalidation: [{'height': 56, [01:26:32] 'hash': '860e69ff5b22cc3b94169e9382ff88eeb673bb667106e7b5119917b2195d074c', 'branchlen': 0, 'status': 'active'}] after invalidation: [{'height': 56, 'hash': '860e69ff5b22cc3b94169e9382ff88eeb673bb667106e7b5119917b2195d074c', 'branchlen': 2, 'status': 'invalid'}, {'height': 54, 'hash': '4012739ec2db00febe2f2035da4565b1a85b5198d88c3b828e88454394ac089e', 'branchlen': 0, 'status': 'active'}] block 55 was invalidated. Could you help me understand what [01:26:33] is happening here? To me this looks like a kind of fork. Does an invalid block stay on chain and is simply marked as invalid or is it removed? [01:26:46] simply not use them [01:26:51] id say [01:27:01] I would expect them to go to mempool myself [01:27:24] when i invalidate a block with a proposal, for example, i have to resubmit the proposal [01:27:30] its not included auto in the next block [01:27:38] could you tell me why you think that they would go back to mempool? [01:28:01] but i could be wrong, never looked in detail into this [01:28:29] which height are u invalidating there @dy5es41 ? [01:28:41] 56 or 55? [01:28:53] height 55 is invalidated [01:28:54] I have my mempool of unconfirmed tx I get a block, some of those tx are in it, sweet. That block is invalidated for some reason (reorg or otherwise), those mined tx are now back to unconfirmed [01:29:27] i dont think they go back to your mempool [01:29:33] they are just broadcasted by other node in other block [01:29:39] invalidateblock is a local action [01:29:44] does not affect other nodes [01:30:10] I think we are talking about our local mempool [01:30:24] but I guess if we think in terms of global than it makes sense to assume we don't repopulate [01:30:32] my local mempool did not change after invalidating a block [01:30:33] i dont think they go back to the mempool [01:30:41] havent seen anything in the code about that [01:30:46] but i can be missing something [01:30:48] You're probably right then [01:30:49] which is backwards to what the bitcoin core test expects [01:30:58] I have no idea wht happens [01:31:08] bitcoin test included in navocin core? [01:31:38] yes, file is mempool_resurrect_test.py [01:31:45] The new guys are working on getting all the tests working [01:33:42] https://cdn.discordapp.com/attachments/416000318149754881/524761208713117717/unknown.png [01:33:48] not it does not come back [01:37:44] https://github.com/bitcoin/bitcoin/blob/20c54eef6e41216a99b16bab2b5a7c0fb701f46e/src/validation.cpp#L2833 [01:37:49] this is something bitcoin 0.14 does [01:37:55] but its not on our codebase [01:38:04] this test is in bitcoin core but is identical to the navcoin core test https://github.com/bitcoin/bitcoin/blob/master/test/functional/mempool_resurrect.py#L52 the comment on L54 expects (in my interpretation) that the block txs return of the invalidated block goes to mempool [01:38:06] Ah! [01:38:10] that makes sense [01:38:15] we are based off 0.13 [01:38:27] awesome, thanks [01:38:50] https://github.com/NAVCoin/navcoin-core/blob/master/src/main.cpp#L4391 [01:38:55] this is our function for comparison [01:39:22] wait [01:39:28] DisconnecTip() has this [01:39:46] ``` f (!fBare) { // Resurrect mempool transactions from the disconnected block. std::vector vHashUpdate; BOOST_FOREACH(const CTransaction &tx, block.vtx) { // ignore validation errors in resurrected transactions list removed; CValidationState stateDummy; if (!(tx.IsCoinBase() || tx.IsCoinStake()) || !AcceptToMemoryPool(mempool, [01:39:47] stateDummy, tx, false, NULL, true)) { mempool.removeRecursive(tx, removed); } else if (mempool.exists(tx.GetHash())) { vHashUpdate.push_back(tx.GetHash()); } } // AcceptToMemoryPool/addUnchecked all assume that new mempool entries have // no in-mempool children, which is generally not true when adding // previously-confirmed transactions back to the mempool. [01:39:47] // UpdateTransactionsFromBlock finds descendants of any transactions in this // block that were added back and cleans up the mempool state. mempool.UpdateTransactionsFromBlock(vHashUpdate); } ```` [01:40:09] its just refactored in 0.14 [01:40:39] i see [01:41:07] for my original question, what is branchlen? [01:42:09] because it looks to me when the block is invalidated it starts a new branch and continues from last valid block [01:42:45] is a branch == softfork [01:43:51] length of the chain from the forked point [01:48:07] listtransactions.py: Initializing test directory /tmp/testxb_muhwf/0 Unexpected exception caught during testing: error('unpack requires a buffer of 4 bytes',) Stopping nodes Not cleaning up dir /tmp/testxb_muhwf/0 Failed stderr: File "/home/hdnsimpson/Documents/navcoin-core/navcoin-core/qa/rpc-tests/test_framework/test_framework.py", line 148, in main self.run_test() File [01:48:07] "/home/hdnsimpson/Documents/navcoin-core/navcoin-core/qa/rpc-tests/listtransactions.py", line 143, in run_test self.run_rbf_opt_in_test() File "/home/hdnsimpson/Documents/navcoin-core/navcoin-core/qa/rpc-tests/listtransactions.py", line 192, in run_rbf_opt_in_test tx3_modified = txFromHex(tx3) File "/home/hdnsimpson/Documents/navcoin-core/navcoin-core/qa/rpc-tests/listtransactions.py", line 16, in txFromHex tx.deserialize(f) [01:48:08] File "/home/hdnsimpson/Documents/navcoin-core/navcoin-core/qa/rpc-tests/test_framework/mininode.py", line 488, in deserialize self.vin = deser_vector(f, CTxIn) File "/home/hdnsimpson/Documents/navcoin-core/navcoin-core/qa/rpc-tests/test_framework/mininode.py", line 138, in deser_vector t.deserialize(f) File "/home/hdnsimpson/Documents/navcoin-core/navcoin-core/qa/rpc-tests/test_framework/mininode.py", line 371, in deserialize [01:48:08] self.nSequence = struct.unpack(" Any idea how to fix this error? [01:48:41] Occured during rpc test listtransactions.py [01:48:45] @aguycalled [01:49:03] probably related to deserialize or txfromhex not considering the ntime parameter [01:49:06] or strdzeel [01:49:13] which are new and different in our tx structure [01:49:17] but just guessing [01:50:32] bingo [01:50:42] rpc-tests/test_framework/mininode.py [01:50:47] CTransaction misses all those [01:51:12] if u need inspiration you can look at how bitcore-lib serializes and deserializes transactions [01:51:30] https://github.com/Encrypt-S/bitcore-lib/blob/master/lib/transaction/transaction.js [01:51:41] https://github.com/Encrypt-S/bitcore-lib/blob/master/lib/transaction/transaction.js#L307 [01:51:56] block headers will require something similar [01:52:04] theres a byte array denominated vchSig [01:52:10] which bitcoin does not have [02:37:40] https://github.com/NAVCoin/navcoin-core/pull/376 https://github.com/NAVCoin/navcoin-core/pull/382 These looks good to merge [11:33:02] hi guys, i just staked an orphan block in the 4.5.1 is that normal?