-
sech1
luigi1111w yes, but wait until all fixes are ready to be merged
-
selsta
TheCharlatan: we are skipping v0.18.3.0
-
selsta
since you are merging gitian PRs
-
selsta
I guess it doesn't hurt to also merge them but we will release v0.18.3.1 instead
-
m-relay
<monerobull:matrix.org> does anyone here know lalanza808?
-
m-relay
<monerobull:matrix.org> i cant get monero.fail to install 😭
-
selsta
monerobull: he is in #monero-community-dev, username lza_menace
-
m-relay
<monerobull:matrix.org> thanks
-
selsta
.merge+ 9012
-
xmr-pr
Added
-
selsta
.merge+ 9013 9014
-
xmr-pr
Added
-
Andrei
Hello.
-
Andrei
How can I convert a transaction blob to a transaction hash like "01d4da0e01ff98da0e0180a5f3d0f00402b9485b5bfdb1e78de6ee23fda67545a08db295ad8f34e7bef257eb1a8ee6efb32b01b32dd844ff03ce76f20bc337a6aa9c65cc35958191275200505d3da06c7087df02080000000000000000"?
-
Andrei
Should I simply use the cn_fast_hash function? The result I got is 40602c6a4047d0dd9305397048e4cf20f900b6446259b05299e133981039bd3d, but I'm not certain it's correct.
-
moneromoooo
If it's a recent tx, it's not correct. Safest is to decode ut, then call get_transaction_hash on the tx.
-
Andrei
It is a coinbase transaction from block template.
-
Andrei
I want to convert a blocktemplate_blob to a blockhashing_blob in Python.
-
Andrei
Is my understanding of the algorithm correct?
-
Andrei
* Convert the coinbase transaction blob to a transaction hash using cn_fast_hash.
-
Andrei
* Construct the Merkle root using [coinbase_tx_hash, tx1, tx2...].
-
Andrei
* Add the Merkle root to the end of the block header.
-
moneromoooo
IIRC you also have a varint for the number of entries in the merkle tree.
-
moneromoooo
Other than that, I *think* it's correct.
-
moneromoooo
For recent txes, the hash is calculated by calculating the keccak of several parts of the tx, so decoding is a must.
-
moneromoooo
(helps with pruning)
-
moneromoooo
For coinbase txes, it's easier as one of the parts is always empty so you can do it manually without decoding. But you presumably have non-coinbase txes also.
-
sech1
coinbase_tx_hash is not so straight-forward to calculate, but you are correct. You need to calculate the Merkle root after that, and write the number of transactions (including coinbase_tx) as a varint in the end
-
sech1
Ever since Monero has pruning, a transaction hash is a combination of several hashes
-
sech1
get_transaction_hash is the easiest way to calculate it
-
selsta
.merges
-
xmr-pr
9011 9012 9013 9014
-
selsta
luigi1111w: we can tag v0.18.3.1
-
selsta
of course merges first
-
hyc
did I miss v0.18.3.0 ?
-
hyc
ah there it is
-
luigi1111w
k
-
luigi1111w
tagging...
-
selsta
yep
-
sech1
building...
-
m-relay
-
hyc
cool, just started a build
-
sech1
-
sech1
-
selsta
-
selsta
matches
-
selsta
-
selsta
it would be nice if a second person could review the chain gen changes
-
m-relay
<jeffro256:monero.social> Yes that explaination was great, I was poking around the tests and reading the changes for myself earlier today
-
m-relay
<jeffro256:monero.social> I plan to approve it either today or tomorrow as long as I don't see anything wrong
-
m-relay
<jeffro256:monero.social> It looks solid so far
-
selsta
perfect, thank you