-
selsta
jeffro256[m]: can this be done in a separate PR later?
monero-project/monero #8794#issuecomment-1484211279
-
jeffro256[m]
Yes it can be, I'll put it in my unit test PR and make the unit test PR depend on #8794
-
jeffro256[m]
It's important that #8794 is merged soon tho, certainly included in the next release
-
selsta
ok that's why i'm asking
-
selsta
i assume the unit test + the other change you are proposing aren't relevant for the release?
-
jeffro256[m]
Nope they're just to hopefully prevent similar future bugs
-
selsta
not sure if you saw it but the tests CI failed on the unit test PR
-
jeffro256[m]
Yes it fails for the master branch but passes with #8974 + my suggested change
-
jeffro256[m]
Sorry that's probably confusing
-
selsta
oh ok
-
jeffro256[m]
Lemme restructure it real quickl
-
selsta
no, it's fine if you wait for it to get merged and then force push to re-run tests
-
selsta
probably the easiest way
-
jeffro256[m]
I'll push that suggested change tho with my PR
-
Alex|LocalMonero
Does describe_transfer (
getmonero.org/resources/developer-g…s/wallet-rpc.html#describe_transfer) verify that a partially-signed multisig tx's signatures are valid?
-
UkoeHB
no
-
xmrlover[m]
What do you mean no
-
UkoeHB
I mean the opposite of yes
-
DanIsnotthemanBr
Maybe
-
xmrlover[m]
<UkoeHB> "I mean the opposite of yes" <- I know I'm just goofing around for a bit lol
-
sech1
.merges
-
xmr-pr
8794 8801
-
sech1
when tag and point release?
-
selsta
luigi1111w: ^^
-
luigi1111w
done
-
sech1
Thanks! I'm updating my nodes now, will also make reproducible build in the evening.
-
sech1
Running v0.18.2.1 on my nodes now,
p2pool.io/explorer also update. I noticed one small issue (not really an issue, just the way it works now): since transactions with large tx_extra are not added to mempool now, monerod has to download them when it receives a new block with these transactions, which slows down block propagation a bit.
-
sech1
Also, p2pool log now looks like this:
paste.debian.net/hidden/ea0f04ca
-
sech1
So all transactions it downloads before adding a block, also get sent via ZMQ
-
sech1
Which is technically correct, but do we want it? If a transaction doesn't pass mempool filters, it probably shouldn't be sent via ZMQ
-
sech1
Also my nodes struggle with getting connections: Height: 2851199/2851199 (100.0%) on mainnet, not mining, net hash 2.50 GH/s, v16, 35(out)+9(in) connections, uptime 0d 0h 31m 34s
-
sech1
it used to be stable 96 out/32 in
-
sech1
25 out/10 in now
-
sech1
they're dropping like flies :D
-
sech1
and now 68 out/12 in, hmmm
-
sech1
now 51 out/11 in
-
sech1
very weird
-
sech1
34 out/12 in
-
sech1
something's not right
-
plowsof11
will update and compare
-
sech1
both nodes show this behavior
-
moneromooo
Maybe it's counting the temp connections back to determine reachability ? That was borked and got fixed recently.
-
moneromooo
IIRC those weren't counted but who knows if they do now.
-
sech1
Do you mean my node is making these connections and counting them in "status" output?
-
moneromooo
I mean it might.
-
moneromooo
Just a guess. Something related changed recently, and could explain what you see.
-
sech1
Ok, I'll try to set out_peers to 1000 and wait until it gets enough real connections, and then drop back to 96
-
sech1
It didn't help
-
plowsof11
i see similar behaviour
-
selsta
there were barely any changes between v0.18.2.0 and v0.18.2.1
-
selsta
shouldn't be too difficult to figure out what causes this
-
sech1
moneromooo could this be the reason:
paste.debian.net/hidden/2145fe90 ???
-
sech1
NFT transactions fail verification and my node then disconnects
-
sech1
-
sech1
I guess we should wait with release :D
-
moneromooo
Well, if the logs says a connection is dropped due to tx verification failure, then yes, it's the reason for dropped connections :P
-
sech1
so not only it doesn't like big tx_extra in mempool now, it also doesn't like whoever sent it, i.e. v0.18.2.0 nodes :D
-
sech1
I guess it will be less of an issue as more and more people update
-
plowsof11
a hardfork lol
-
ofrnxmr[m]
With some lube.. plowsof, im assuming your node likes seths?
-
ofrnxmr[m]
And only drops bs connections?
-
sech1
huh, my node finally reached stable 96 out/17 in
-
sech1
lol, just as I said it, it dropped to 39 out
-
ofrnxmr[m]
Sech***, sorry. Seth is the traitor.
-
sech1
it all depends on when the NFT guy sends a new batch of transactions :D
-
plowsof11
yes it becomes stable, then drops right back down
-
moneromooo
Time to update node... ^_^
-
xmrfn[m]
So whichever nodes happen to propagate the NFT tx to you, they become non grata
-
ofrnxmr[m]
Direct them to #monero-support:monero.social . Ill be waiting
-
sech1
hmm, it can potentially end up in network split: v0.18.2.1 nodes settle with only connections between each other, and v0.18.2.0 nodes will only connect to each other
-
sech1
it's better to fix this connection drop before release
-
selsta
agree that seems a bit too risky to deploy lol
-
Rucknium[m]
I said "why don't you try on stagenet/testnet?" but "No"
-
sech1
I'll keep running v0.18.2.1 on my nodes
-
sech1
we did try
-
sech1
the problem is no one is spamming testnet with NFTs
-
xmrfn[m]
Some thought needs to be given to the "fix" of how/why we drop. Surely dropping connection to nodes that send bad tx is a good policy.
-
sech1
That's true
-
sech1
we can't just keep connection to a node that sends an invalid tx
-
Rucknium[m]
xmrfn: With all due respect, that is foolish under the current conditions
-
moneromooo
Old nodes will eventually get the blocks. As long as miners are prodded to update, we should be good ^_^
-
sech1
so this tx_extra check shouldn't be a "verification failure", it should just silently drop it
-
xmrfn[m]
We could make an exception for NFTs. Keep the connection
-
ofrnxmr[m]
Should still allow broadcasting to those nodes
-
ofrnxmr[m]
(Ideally)
-
moneromooo
And someone's making NFTs without IPFS ?
-
Rucknium[m]
The tx_extra limitation will also make 0-conf less safe by the way. For 0-conf safety you need consistent mempool policies across the network.
-
xmrfn[m]
0-conf is by definition accepting of a certain level of risk
-
ofrnxmr[m]
0 conf with bloated txpool is dangerous too
-
ofrnxmr[m]
The bigger problem with 0conf is if it doesnt propogate to mining nodes
-
sech1
-
sech1
tx_memory_pool::add_tx already "ignores" transactions without declaring them "failed", in other parts of the code
-
xmrfn[m]
So you're also commenting out tvc.m_tx_extra_too_big = true; ? Just checking
-
sech1
yes
-
xmrfn[m]
will do the same (interrupts build)
-
moneromooo
If you do that, you'll almost certainly relay those txes.
-
sech1
m_tx_extra_too_big is not used anywhere in the code
-
moneromooo
See handle_notify_new_transactions, you probably want to check m_tx_extra_too_big there, not comment it out in txpool.
-
moneromooo
And not add it if set.
-
sech1
wait, so if m_verifivation_failed is not set, it will be relayed even if not added to mempool?
-
sech1
ok
-
moneromooo
But do test. I only read the code quickly :)
-
plowsof11
time to spam testnet i guess
-
sech1
that fix didn't help, it says "Tx verification failed, dropping connection" and drops connection ultimately because add_tx returns false
-
sech1
I'll add check for m_tx_extra_too_big into core::handle_incoming_txs to avoid connection drops
-
luigi1111w
agree with this fix logic. Drop big extra txs but don't ban nodes
-
sech1
Running with this patch now:
paste.debian.net/hidden/dcb83291 - so far so good
-
sech1
plowsof11 ^
-
sech1
yeah, it's not dropping connections anymore
-
sech1
this is the node that
p2pool.io/explorer uses, so you can check in realtime if any large tx_extra leak into mempool
-
xmrfn[m]
Maybe after v0.18.2.2 (v0.18.2.1 + this patch) becomes consensus, then go back to dropping nodes that propagate large tx? I guess this is a model for deploying similar tx acceptability checks in the future...?
-
sech1
yes, dropping connection large tx_extra nodes is the best way when they are in minority, both by their hashrate and overall count
-
sech1
but as of now, risk of network split is too high when new nodes are minority
-
plowsof11
will try sech1 thanks , ive got a jillion outputs for testnet if needed 💢
-
sech1
My second node is running fine too now
-
sech1
I'll keep testing this patch
-
xmrfn[m]
I'm building the same, will deploy when it completes
-
xmrfn[m]
MMmmmmmm I love the smell of testing in production
-
sech1
selsta IIRC it's impossible to change the tag once some commit has been tagget, right? So we'll have to tag v0.18.2.2?
-
selsta
yes tagging .2 is better
-
selsta
it's possible to force push tags but isn'r recommended
-
sech1
I'll test my patch some more and will make a PR to both master and release-v0.18
-
sech1
I have a 3rd node at home, will test there too :D
-
ofrnxmr[m]
My testnet morbs arent showing on xmrchain 💢
-
ofrnxmr[m]
I lie. She's there
-
ofrnxmr[m]
-
plowsof11
sech1 running patch on 1 node, connections building, no drops , will move to a 2nd
-
ofrnxmr[m]
They're still showing in xmrchsins tx though - they shouldn't be (?)
-
ofrnxmr[m]
Xmrchains explorer*
-
ofrnxmr[m]
Txpool*
-
sech1
xmrchain probably didn't update
-
plowsof11
we need to confirm that sending an ordinal connected to a node with release+patch doesnt work ^^
-
plowsof11
will confirm later today, ive got diffs/wallets/morbs everywhere
-
AbdullahKhan[m]
Hi, can somebody break down the db-sync-mode parameters: safe, fast, fastest; sync, async; and which the default is?
-
selsta
fastest is only useful if you store the blockchain in RAM, safe helps if you system often crashes or your external HDD might unplug during sync, fast is the default
-
selsta
not sure about sync / async
-
AbdullahKhan[m]
Can fastest be used with SSD?
-
selsta
there's no point with it
-
woodser[m]
are any more changes expected to the v0.18.2.1 tag?
-
woodser[m]
or am I reading correctly that a retag to v0.18.2.2 is forthcoming?
-
selsta
we will merge another patch and tag v0.18..2.2
-
woodser[m]
ok
-
selsta
opened a prepare v0.18.2.2 patch
monero-project/monero #8805
-
sech1
I've created PR 8806 and 8807 with the tx_extra fix
-
selsta
is there any scenario now where previously a node would drop connection that now keeps connection?
-
selsta
just want to make sure we don't increase any attack vector
-
selsta
with before i mean v0.18.2.0
-
sech1
-
sech1
this line explicitly checks the condition before changing previous behavior
-
sech1
so it will only change for transactions that trigger m_tx_extra_too_big
-
sech1
sure, a node can send an otherwise invalid transaction that just happens to be filtered by tx_extra filter first
-
sech1
then it will stay connected
-
sech1
but the tx_extra filter will keep it out of mempool anyway, so it will be harmless
-
sech1
and it will never be mined if it's invalid somewhere else
-
selsta
would that allow for keep spamming the same tx and the node wastes time verifying it again and again? or similar attacks?
-
sech1
theoretically, yes
-
sech1
you can spam a transaction with big tx_extra
-
sech1
without the fix, you will get disconnected
-
sech1
but you can still connect again and spam
-
sech1
not much difference
-
moneromooo
If you get kicked enough, you get banned.
-
moneromooo
Enough times I mean.
-
sech1
I didn't see my node banning other peers
-
moneromooo
Maybe you did not wait enough, maybe those are silent, maybe there is a bug, maybe this particular reason does not use the scoring system.
-
selsta
It seems "Tx verification failed, dropping connection" drops connections with add_fail = false: drop_connection(context, false, false);
-
selsta
so you won't get banned just from failed tx verifications
-
sech1
exactly
-
selsta
not sure if that was an oversight or intentional
-
sech1
which means my patch doesn't change this particular attack vector
-
sech1
if it's even an attack vector
-
Alex|LocalMonero
How does one verify someone else's partially-signed multisig tx signature without broadcasting it to the network with submit_multisig? The /sendrawtransaction endpoint of monerod doesn't accept multisig tx hexes, returns a sanity check failed.
-
Alex|LocalMonero
If it did, one could complete the signatures and submit it to monerod's /sendrawtransaction with do_not_relay:true to get it checked without broadcasting it to the network.
-
sech1
selsta I checked, and tx_extra check is done before all CPU intensive checks, so spamming it will not give any noticeable effect
-
sech1
I think tevador put it before CPU intensive checks on purpose
-
selsta
jeffro256[m] UkoeHB are you also ok with the patch now?
-
jeffro256[m]
Don't know yet, still looking at it
-
jeffro256[m]
Personally, I can tolerate longer block propagation times for non-conforming blocks, all I really care about is the overly aggressive connection dropping
-
jeffro256[m]
Longer block propogation time is a soft price that miners would have to pay to mine non conforming blocks
-
sech1
this PR fixes connection dropping
-
sech1
I'm running it on my nodes now
-
sech1
including the node for
p2pool.io/explorer
-
jeffro256[m]
Yes, it looks like it should work. This could be a good opportunity to add to the verification struct a category of "this is a valid tx to be included in a block but don't publish or broadcast this tx" more generlly
-
jeffro256[m]
Would help the "spaghetti"-ness that Ukoe mentioned
-
jeffro256[m]
I'll functional test it realsoon
-
UkoeHB
sech1: the patch introduces a critical bug, I'd fix asap
-
sech1
"So you can implicitly have a whole slew of things wrong with your tx in addition to the tx extra being too big, but the tvc won't record them."
-
sech1
this?
-
sech1
This is how it works, it's not a bug
-
sech1
even before my PR
-
UkoeHB
yes, you are short-circuiting the error checks
-
sech1
"YOU"?
-
sech1
It's not my code
-
sech1
It is what it is
-
sech1
stop bullshitting me
-
UkoeHB
this is your bug: if (!tvc[i].m_tx_extra_too_big) ok = false;
-
UkoeHB
ok needs to be false if any error checks after the tx extra too big check are false
-
sech1
so you're suggesting to run all other checks too, even if tx_extra check failed?
-
jeffro256[m]
Transaction with (e.g.) semantics error and tx_extra too big will have the verification context set tx_extra_to_big to true but nothing else
-
sech1
making it vulnerable to spamming CPU-heavy checks?
-
sech1
Do you know the concept of "early outing" in programming?
-
sech1
You're telling me to rewrite the logic, I'm telling you no
-
jeffro256[m]
That appears to be inherently needed to distinguish between otherwise fine txs with bad tx_extra and all around bad txs, no?
-
sech1
-
sech1
I know exactly how this code will work
-
sech1
and I don't consider it a bug
-
jeffro256[m]
There's a third option: tx_extra check fails, add_new_tx returns with tx_extra_too_big set, but there is another issue with the transaction, but ok is still set to true
-
UkoeHB
ok looked deeper, it doesn't appear to be a bug but it does change the semantics of `handle_incoming_tx()` because it can now return true even when a tx wasn't added, which is potentially a bug
-
jeffro256[m]
Because there are concensus checks after the tx_extra check
-
sech1
-
sech1
These checks are not even consensus
-
sech1
it's txpool checks
-
sech1
I'm not going to change my PR's logic
-
sech1
Do your own PR, or show me an _actual_ critical bug in it
-
sech1
I know you don't like "spaghetti" code, neither do I, but this is not refactoring!
-
sech1
it's a bugfix, goddamit
-
sech1
actual critical bug = at least show where
monero-project/monero #8806#discussion_r1149597742 is wrong
-
sech1
Fuck, I'm the only one trying to fix broken things here while others are obsessed with refactoring
-
sech1
Logging out for 24 hours, until you guys figure it out
-
jeffro256[m]
Does
monero-project/monero #8808 check out theoretically? Would also address fee too low issue that @UkoeHB mentioned
-
jeffro256[m]
Have yet to test it
-
jeffro256[m]
Also this technique can be easily applied to other future mempool protections
-
UkoeHB
jeffro256[m]: afaict that would work
-
UkoeHB
there are several other locations where it seems to drop connection if handle_incoming_tx() fails though
-
jeffro256[m]
Yes, I was just looking at those, like fluffy blocks
-
jeffro256[m]
Or regular new block notifies
-
jeffro256[m]
At a high level view, transactions in blocks to be verified do not need to always pass through the mempool to get to blockchain, right? Sometimes the Blockchain can request blocks directly from other peers, yeah?
-
jeffro256[m]
I just don't want to create a scenario in which the Blockchain waits on the mempool forever
-
UkoeHB
theoretically they can ignore the mempool, idk about the implementation
-
jeffro256[m]
Looking at the protocol handler code makes me want to cry. Just found logic nested 10x
-
hyc
fwiw sech1 is correct. don't conflate bug fixing with refactoring.
-
jeffro256[m]
Agreed
-
jeffro256[m]
@hyc would you mind looking at #8808 ? Would also fix peer dropping due to fees that are too low
-
hyc
ok, will check it out later