mymonero-app-js: V11 comtability: Ringct type 3 is not allowed from v11
Demon produces error:
2019-02-28 10:32:53.305 [RPC0] TRACE blockchain src/cryptonote_core/blockchain.cpp:2351 Blockchain::check_tx_outputs
2019-02-28 10:32:53.305 [RPC0] ERROR verify src/cryptonote_core/blockchain.cpp:2437 Ringct type 3 is not allowed from v11
2019-02-28 10:32:53.307 [RPC0] INFO txpool src/cryptonote_core/tx_pool.cpp:213 Transaction with id= <3906846c2faddeb21a2d9499673c62c579b78547652ec91fcf28f45c1714f1a1> has at least one invalid output
2019-02-28 10:32:53.307 [RPC0] DEBUG perf src/common/perf_timer.cpp:140 PERF 2 add_tx
2019-02-28 10:32:53.307 [RPC0] ERROR verify src/cryptonote_core/cryptonote_core.cpp:960 Transaction verification failed: <3906846c2faddeb21a2d9499673c62c579b78547652ec91fcf28f45c1714f1a1>
2019-02-28 10:32:53.307 [RPC0] WARN daemon.rpc src/rpc/core_rpc_server.cpp:721 [on_send_raw_tx]: tx verification failed: invalid output
2019-02-28 10:32:53.307 [RPC0] DEBUG perf src/common/perf_timer.cpp:140 PERF 18 on_send_raw_tx
2019-02-28 10:32:53.307 [RPC0] DEBUG net.http src/rpc/core_rpc_server.h:96 /sendrawtransaction processed with 0/18/0ms
when trying to send txs on v11 stagenet.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 50 (4 by maintainers)
Commits related to this issue
- is_coinbase bug fixed — committed to moneroexamples/openmonero by moneroexamples 5 years ago
@moneroexamples core-js and core-cpp have been updated with fork_version support
Yeah, the format is exactly the same for rct types 1-3, so old clients can continue to just work (until the actual fork, of course.) There didn’t seem to be much risk in reusing the same field for the new format as well: any reasonable client would just fail to parse it, but the worst case scenario for even an unreasonable one is an invalid tx that will be rejected.
I’m definitely proposing that we continue sending the mask encrypted, as we are already doing. It was already suggested that this be changed to decrypted, but that is not exactly an overnight change for the MyMonero backend. (It’s also not backward compatible, for what little that’s worth.)
It seems obvious now that the commitment shouldn’t be needed either, but I hadn’t realized it at the time. As for the encrypted amount, I’m pretty sure the MyMonero client will happily accept either format without it, so we can amend this update accordingly if you prefer. I hadn’t mentioned that before now simply because I didn’t want to muddy the waters. The purpose of this update wasn’t to be perfect (just in case that’s not obvious), but just to get the new-style outputs working in some way that everyone can implement, test and release in the couple of days left before the fork. I think it meets that goal, in spite of its rough edges. Do you disagree?
What I’m asking here is whether we can all live with the change as described here until the dust settles from this weekend’s fork. At this point, @moneroexamples and I have each spent considerable time testing the updated client against our respective servers. Going back to square one is not only unappealing, to put it mildly, but given that the iOS version of the client still has to be reviewed and approved by Apple, basically means that there would be zero chance of having a working client on that platform in time.
Longer-term, there’s no question that this entire field could use revisiting – just for starters, there doesn’t seem to be any good reason to be sending a blob instead of normal fields – but what I’m suggesting (ok, insisting) is that we save that for a time when it can be discussed and done right to everyone’s satisfaction without the time pressure of an imminent fork.
@moneroexamples https://github.com/monero-project/meta/pull/287#issuecomment-470172708
What do you think?
@ndorf @luigi1111
Thanks for the feedback. The new changes too
mymonero-core-cpp
seem to be working now with original point 4 (80 characters long rtc field). So now I think the main thing to do is just more testing.(tl;dr: one more change at https://github.com/ndorf/mymonero-core-cpp/commit/7f681b75192043b73bd23c5055011d49fbdd4240 fixes everything, I think)
@moneroexamples the elegant simplicity of your change on the OpenMonero side did not escape me. With the decrypted mask already being available in the right place at the right time, it’s the best kind of 1-liner: a (-1)-liner. Unfortunately the situation with the MyMonero backend is quite the opposite. It’s not infeasible, but it’s a lot riskier than the solution I’m proposing here, especially given only a couple of days left to test everything. (To just scratch the surface, there is no decoding of transaction data, RingCT or otherwise, in the HTTP/API server itself.)
If it were the clearly correct solution, that might be a poor excuse, but given that it should be trivial for the client to compute the deterministic mask itself, there is no need to send that from the server for every output, I think that is preferable in and of itself.
It’s definitely incorrect, otherwise it would be working 😃 what you might have missed is that although it is “different from what it was before,” it must be different to be correct: see here
Luckily @paulshapiro was able to quickly notice that I made a mistake in my first change, and incorrectly applied an extraneous
hash_to_scalar()
to the derived key. After fixing that, it looks like everything is working. I still have a lot more testing to do, but I’ve successfully sent a few RCT Type 4 outputs already.@moneroexamples yes in order to “decrypt” successfully, the front end would need the same routine added. I’m not sure which I prefer at this point (and I also need some sleep). 😃 I think it’s probably “more correct” to have the front end regenerate the deterministic mask, though it’s likely not much different in practice. Cost to regenerate is pretty trivial though.
@moneroexamples https://github.com/ndorf/monero_tests/blob/master/testnet-v9-coinbase.seed
Yes. Coinbase transactions don’t normally have rtc fields. Unless the failing outputs have some wacky stuff going on, this is irrelevant.
I prepared example of tx that fails. Maybe it will be useful.
The tx in hex is here: https://paste.fedoraproject.org/paste/OikdL7u2fwdEicTvTglbIg
The view this tx in decoded form, please copy and paste the hex into the tx pusher of the onion explorer, e.g.: http://139.162.60.17:8082/rawtx and press Check. Trying to Push the tx, will result in invalid input error.
For comparison, this is example of tx that was accepted: http://139.162.60.17:8082/tx/b4e9b185fc03949b9982f4474831febb8a1827cfae1caa26356c9e75fb6801e5
Its different error after all. Orginal error was about invalid outputs. Some, as in most, fail do invalid input: