-
selsta
.merges
-
xmr-pr
8319 8355 8516 8517 8525 8527 8529 8543 8564 8569 8570 8571 8578 8580 8590 8593 8594
-
jeffro256[m]
Hey y'all I wanted to start a discussion about community nodes and start asking for community node operators:
monero-project/monero #8624
-
ghostway[m]
For anyone that was interested, the demo yesterday
youtu.be/aAvSpfll9z4
-
jadeydi[m]
-
moneromooo
rct is short for ringct, which is short for ring confidential transactions.
-
moneromooo
That's the current signing sytem monero uses.
-
moneromooo
As an optional string, I'm not sure what the semantics would be in your structure though.
-
vtnerd
ridauhebauye[m]: yes, I am updating monerod
-
vtnerd
your suggested change wouldn't help much becaue an attacker can have 1+ connections; an outbound connection is not controllable externally
-
vtnerd
sorry meant 2+ connections to an IP
-
vtnerd
intentionally skipping that link creates a trivial to identify situation
-
cvmn
is there any way to implement a consensus algorithm that's <= O(log n), where n is number of transactions?
-
hyc
the question doesn't make sense. do you have an example of an algo that is > O(log n) for your definition of n?
-
UkoeHB
cvmn: the PoW consensus algorithm is independent of tx count, maybe you could clarify
-
cvmn
hyc: yeah. e.g. bitcoin for example. as transactions are added (including mining announcements with hash proofs; enough zeros, that is), they add a blog stuffed with transactions.
-
cvmn
the cosensus is implemented by the blockchain, which grows O(n) where n is transactions number.
-
hyc
the blockchain grows O(n) yes but that's not because of the consensus algo
-
hyc
as UkoeHB said, PoW consensus is independent of tx count
-
cvmn
consensus is the longest chain, where length here is computational power. right?
-
hyc
no
-
moneromooo
You want to define your terms. It's so vague nobody can say yes or no.
-
moneromooo
"consensus" is the very vague term here.
-
moneromooo
Your second line implies chain size.
-
cvmn
ok. to me, consensus is the mechanism to have an agreement about whether a certain number of transactions happened.
-
cvmn
s/number//
-
moneromooo
Yes, but what part of it do you want to be O(log(n)) :)
-
hyc
consensus in blockchains has nothing to do with number of txns
-
moneromooo
And in number of what ops.
-
cvmn
hyc: yes, not their number, but whether transactions happened.
-
moneromooo
Typically, it's "number of operations to verify a chain". but your second line implies it's not what you want.
-
hyc
\blocks are mined on a set time interval, they could be empty or full or anywhere in between. the number of txns is irrelevant.
-
moneromooo
Well, maybe it is. In which case, it's not possible, because you need to verify every single tx.
-
cvmn
true. then, the longest chain is followed as the global agreement of where the world is.
-
moneromooo
There are shortcuts if yo're willing to forego security, such as allowing chcekpoints where PoS "protects" a ptoof all txes up to that point were verified by "someone", and you trust that.
-
cvmn
in bitcoin, individual transactions are added to blocks. blocks with more transactions are larger. so, it's effectively O(n).
-
hyc
irrelevant
-
moneromooo
Monero is pretty similar to Bitcoin in all such things.
-
hyc
consensus is not based on the longest chain
-
moneromooo
Above, I meant PoW, not PoS, lol
-
cvmn
hyc: what is it based on, then?
-
hyc
and 'length of a chain" depends only on the number of blocks, not the number of txns contained in the blocks
-
hyc
consensus is based on the chain with the most work, in PoW chains
-
moneromooo
"longest" is common speak for "with most cum work".
-
cvmn
well, a block ls longer if it has more transactions. so, a chain effectively becomes longer as some blocks will be taller than others.
-
hyc
cvmn: no
-
moneromooo
OK, so you're on about size now. There are chains that allow "merging" some txes (Mimblewimble).
-
cvmn
there are different types of lengths here. one length is the computational power and another is the length in bytes on disk. i'm referring to the bytes on disk.
-
moneromooo
Not sure how much you gain, but there's still a linear component AFAIK.
-
hyc
cvmn: still wrong
-
cvmn
any idea which terms am i abusing?
-
moneromooo
You can also have a balance based chain. In that case you can collapse a number of things *after* you verify txes. That's close to O(1).
-
moneromooo
(it's O(a) wiht a being number of accounts)
-
moneromooo
Balance based chains are not privacy friendly at all though.
-
hyc
cvmn: I already gave you the correct definitions above.
-
moneromooo
You may want to lookup Cryptonite, the mini blockchain.
-
cvmn
<hyc> \blocks are mined on a set time interval, they could be empty or full or anywhere in between. the number of txns is irrelevant. <--- this?
-
moneromooo
It was balanced based. AFAIK Ethereum also is. But has a massive unusable chain so...
-
hyc
that's part of it, yes
-
cvmn
hyc: are you saying that, even the disk-space wise is independent of number of transactions?
-
hyc
the disk space has nothing to do with consensus
-
cvmn
doesn't bitcoin's consensus require connectivity all the way back to the genesis block?
-
hyc
connectivity of blocks, yes
-
moneromooo
Are you really on about disk space (after verufucation) or chain size (data needed to verify the chain in the first place) ?
-
cvmn
at least, during initial synchronisation, a full node will require to download all transactions.
-
hyc
but again - it doesn't matter how many txns are inside a block
-
hyc
txn validation and blockchain consensus are competely independent matters
-
hyc
txns are validated by the first node that receives them. can be rejected immediately if invalid. "consensus" is irrelevant. it is O(1) operation.
-
cvmn
is it possible to validate a block's hash, without knowing transactions inside it?
-
hyc
yes
-
cvmn
even without knowing hashes of transactions inside it?
-
hyc
a miner sees the hashing header only, not all of the actual transactions
-
cvmn
so, we require having all hashes of transactions in a block, in order to verify that block. right?
-
jadeydi[m]
<moneromooo> "As an optional string, I'm not..." <- I found it from here
github.com/mymonero/mymonero-core-c…r/src/monero_transfer_utils.hpp#L64
-
moneromooo
Ask in #mymonero maybe. I think most people there are here too though.
-
jadeydi[m]
what will happen if I have a rct, and how can I get it?
-
endogenic
i wrote that codr
-
jadeydi[m]
<jadeydi[m]> "I found it from here https://..." <- the rct is 'coinbase' or a mask
-
ArtemVorotnikov[
-
jeffro256[m]
Ideally, if you were to spend more time on this? Where would you like to take it ?
-
ArtemVorotnikov[
make a Rust full node implementation which would... (full message at <
libera.ems.host/_matrix/media/v3/do…decdefacd6278cc72127f5feb40f9b7e276>)
-
ghostway[m]
-
ghostway[m]
> <@vorot93:matrix.org> make a Rust full node implementation which would... (full message at <
libera.ems.host/_matrix/media/v3/do…e33da756d11398b76190c1840d4ab5c6fe7>)
-
NorrinRadd
is there a way to make the bridge post the full message, instead of a link to libera.ems.host?
-
ArtemVorotnikov[
ghostwaynoted
-
ArtemVorotnikov[
there's no public repo yet, and I put it on ice for now as I'm still prototyping the juicy bits (snapshots, libp2p) using working full node (Akula) first
-
ArtemVorotnikov[
once those are done, I'll copy them over and present an alternative to C++ monerod with killer-feature set
-
ghostway[m]
Yep just saw your tweet saying it's not public yet. I see, so no early-contributions heh. Good luck! Quite excited
-
Rucknium[m]
Artem Vorotnikov: Sounds very interesting. Do you have a use case in mind? Or just indefinitely experimental?
-
ArtemVorotnikov[
Rucknium
-
ArtemVorotnikov[
- Much faster to sync up, which is relevant for mobile use case
-
ArtemVorotnikov[
- MDBX, which should give even better performance having been stress-tested and improved on multi-terabyte databases of Akula and Erigon
-
ArtemVorotnikov[
- 10x more modular, cleaner and accessible to developers because of staged sync and Rust - consequently much easier to add features like custom RPC calls
-
moneromooo
What is staged sync ?
-
ArtemVorotnikov[
also forgot:
-
ArtemVorotnikov[
- plaintext chainspec format, which allows for adding support for any network, provided it doesn't require any unsupported protocol features, example for an Ethereum testnet:
github.com/akula-bft/akula/blob/master/src/res/chainspec/sepolia.ron
-
rbrunner
Yeah, what is staged sync. Much faster how?
-
ArtemVorotnikov[
-
ArtemVorotnikov[
rbrunnercombined with other innovations, Akula can sync an archive Ethereum node (2+ TB worth) in under 48h on good machine
-
ArtemVorotnikov[
Compare this to Go Ethereum which can (non-state-sync) sync in..... months?
-
moneromooo
You're claiming doing this is much faster because of... cache friendliness ? Other ?
-
moneromooo
Anyway, if you can speed sync up noticeably while checking the same things, it sounds like a great win.
-
ArtemVorotnikov[
Staged sync is more about easiness and simplification of node development, but it's also faster because CPU-heavy logic can much easier be parallelized
-
ArtemVorotnikov[
Not sure about Monero, but at least in Ethereum we have extraction of tx sender from secp256k1 sig - since it's a separate stage we actually parallelize all of it for a massive win worth several hours of sync at least
-
moneromooo
Monero sync is not massively parallel. I can see how *that* could speed things up.
-
moneromooo
Some parts of verification is parallel, but more could be.
-
moneromooo
Monero sync's heavy on disk I/O. Optimizing this might get you good wins too.
-
ArtemVorotnikov[
Akula's data model is heavily optimized towards random reads, sequential writes, keeping within recommended storage engine parameters, so I/O is _not_ a bottleneck for us
-
ArtemVorotnikov[
but since you use (almost) the same storage engine, I believe it's not a big problem for you either (cc @hyc)
-
hyc
we've done a similar experiment in OpenLDAP, years ago. when bulk loading a database, just load entries first, and then iterate over attribute indices one at a time
-
hyc
while each individual pass is relatively fast, the sum of all separate passes still takes more time than ading entries and indexing at once
-
hyc
loading all the entries by themselves first certainly is sequential and fast. but index creation is always random access
-
ArtemVorotnikov[
unless you use external extract-transform-load like we do
-
ArtemVorotnikov[
then it becomes sequential
-
hyc
then you require an external memory or data store large enough to hold an entire index
-
moneromooo
If you've got the RAM, you might be able to create it with seq access by writing in already sorted order from RAM.
-
moneromooo
Well, yes.
-
hyc
sure, anything can be made to go faster if you have enough RAM
-
ArtemVorotnikov[
we don't do ETL on tmpfs exactly because indexes are large
-
ArtemVorotnikov[
and they would compete for RAM with MDBX' mmapping anyway
-
ArtemVorotnikov[
naturally, syncing a 2TB database on exactly 2TB free space is a bad idea
-
ArtemVorotnikov[
but it's always a bad idea for anything, at least on SSDs
-
ArtemVorotnikov[
we don't peak at much-much more than the final DB size though
-
hyc
anyway, have fun re-learning with MDBX everything we already tested and discarded in OpenLDAP 20 years ago
-
ArtemVorotnikov[
lol
-
rbrunner
The fun started already ...
-
rbrunner
It's much easier to have fun if you are young. Old people like hyc and I are pretty hard to excite anymore :)
-
hyc
lol
-
Rucknium[m]
Is it correct to say that this Rust node would have to implement the communication protocol of the C++ `monerod` (in addition to any separate improved protocols) too so that it can communicate with the rest of the network?
-
ArtemVorotnikov[
Rucknium
-
ArtemVorotnikov[
maybe - there are several ways to go about it
-
ArtemVorotnikov[
I am most certainly _not_ planning on starting with rewriting Levin, if anything it's the hardest _and_ least important to get the node to function.
-
hyc
Rucknium[m]: I don't see how else you would expect to interact with the existing network
-
rbrunner
I would say so, yes. Otherwise you wouldn't have a single network
-
ArtemVorotnikov[
Akula started as a companion node to Erigon, leeching off its MDBX on-disk database
-
rbrunner
Yeah, if you want a proof of concept that demonstrates faster sync and superior modularization you just implement enough to fetch blocks from somewhere
-
ArtemVorotnikov[
then since I'm planning libp2p anyway, I could make an overlay network, connected to Levin-based network through such companion nodes
-
ArtemVorotnikov[
Levin is a stretch goal in any case, not a hard requirement _even_ for prod
-
hyc
how does erigon compare to turbo-geth?
-
ArtemVorotnikov[
ehm, Erigon was renamed from turbo-geth
-
hyc
ah
-
hyc
no wonder it sounds familiar ;)
-
ArtemVorotnikov[
naturally, it's even more shiny since it's quite a few commits away :)
-
hyc
-
hyc
another problem with approaches like these are typical Windows users. the process you describe requires uninterrupted operation from 0 to tip.
-
ArtemVorotnikov[
correct, but each index stage only requires a few hours, not days, so 🤷♂️️
-
hyc
MDBX's freepage reuse policy, reuse most-recently-used pages first, will also destroy SSDs faster
-
ArtemVorotnikov[
that's not quite enough workload to significantly shorten modern SSD's lifespan
-
hyc
it depends entirely on how good the wear leveling in the controller is
-
ghostway[m]
Well it all depends on scale..
-
hyc
not something worth betting on, really
-
ArtemVorotnikov[
well then ancient/obscure hardware users are free to use LMDB :)
-
ArtemVorotnikov[
but so far Erigon and Akula have had zero reports about dead SSDs - and Ethereum's workload is magnitudes heavier compared to Monero
-
rbrunner
I am almost looking forward to the Monero dev team outed as hobby programmers and even dimwits and get a much faster and more modular Monero daemon in Rust as a recompense
-
rbrunner
We will get over it, believe me :)
-
hyc
lol
-
merope
-
merope
If you download all data first and then check its validity, you will find out that you received invalid garbage only after you've already downloaded it all and done all the checks
-
hyc
it may be garbage data, but it loaded fast!
-
rbrunner
lol
-
ghostway[m]
Artem Vorotnikov: all I can say, when you release something about this (or need a little contributer help), I'd like to get notified :)
-
ArtemVorotnikov[
Ethereum is also a BFT network, mind you, so it's _not_ correct that Akula assumes data to be 100% valid
-
ArtemVorotnikov[
That said, blockchain is at least partially spam-protected by PoW seal and if you have invalid blocks floating around with good difficulty, then new nodes syncing up is the _least_ of your problems
-
merope
Also, I don't think treating levin as a "stretch goal" is a useful idea - if you can't talk to the other nodes, you're just excluding yourself from the network
-
ArtemVorotnikov[
ghostwayabsolutely
-
merope
A malicious node could craft a chain fork with valid (POW-wise) blocks, and you'd only find out after you've already one through all the data
-
ArtemVorotnikov[
endor00overlay network bridged using companion nodes leeching of LMDB is a good first way to get going
-
ArtemVorotnikov[
> <@endor00:matrix.org> A malicious node could craft a chain fork with valid (POW-wise) blocks, and you'd only find out after you've already one through all the data
-
ArtemVorotnikov[
in practice it would mean that adversary has huge computational power enough to rival the network
-
ArtemVorotnikov[
again, in this case getting _new_ nodes to sync is going to be the least of your pains
-
ArtemVorotnikov[
and even so it can be mitigated
-
merope
Doesn't have to: they could just mine a few blocks to start a fork in the chain, and your nodes that can't talk to the "regular" nodes would be none the wiser
-
ArtemVorotnikov[
well then you have eclipse attack and it's the problem either way, staged sync or not
-
ghostway[m]
merope: Sounds like it would just be impractical, it's pow
-
merope
Right, but since you're creating a nearly-isolated network (at least initially), it would be quite easy to pull off
-
merope
Not to mention the fact that the "bridge" nodes would essentially become trusted nodes
-
UkoeHB
Couldn’t you just sync chunks at a time instead of the entire thing?
-
ghostway[m]
* ~~Sounds like it would just be impractical, it's pow ~~
-
merope
Unless a user ran both implementations - in which case yours would be redundant
-
ArtemVorotnikov[
UkoeHBincremental staged sync, yes - we do have this mode in Akula
-
merope
ghostway[m]: Double-spend attacks can be quite elaborate
-
ArtemVorotnikov[
> <@endor00:matrix.org>
-
ArtemVorotnikov[
> Double-spend attacks can be quite elaborate
-
ArtemVorotnikov[
Double-spend on unsynced node is interesting
-
merope
If you want to replace levin with something better, the sane way to do it is to support both at first, and then push levin out after a hardfork (once the new p2p lib is deemed stable enough)
-
ArtemVorotnikov[
I'd expect established services to have synced-up infra, with backups even - at that point staged sync becomes regular (all stages for 1 block) sync
-
ArtemVorotnikov[
> <@endor00:matrix.org> If you want to replace levin with something better, the sane way to do it is to support both at first, and then push levin out after a hardfork (once the new p2p lib is deemed stable enough)
-
ArtemVorotnikov[
I'm not advocating for changes in monerod, I'm making a plan to make a new node and push it into usable state as fast as possible
-
merope
Right - but if you forgo security in exchange for convenience, you're kinda missing the whole point :D
-
merope
ArtemVorotnikov[: Many users sync their nodes on-and-off
-
ArtemVorotnikov[
if we were to talk about network-wide changes, it would make sense to integrate second libp2p-based node into monerod and phase out levin at some point
-
ArtemVorotnikov[
> <@endor00:matrix.org> Right - but if you forgo security in exchange for convenience, you're kinda missing the whole point :D
-
ArtemVorotnikov[
making things perfect immediately is kind of the enemy of organized software development :)
-
hyc
-
merope
There's a difference between "not perfect" and "design that introduces vulnerabilities" though ;)
-
merope
If you want to deliver something that doesn't expose your users to trivial attacks, you need to be able to talk to the rest of the network directly, via levin
-
ArtemVorotnikov[
> <@endor00:matrix.org> There's a difference between "not perfect" and "design that introduces vulnerabilities" though ;)
-
ArtemVorotnikov[
there is a difference between vulnerabilities or practical real world vulnerabilities
-
merope
I suggest you dig in Monero's history and look at the DoS attacks from a few years ago, then
-
hyc
anyone else around here have experience with libp2p?
-
hyc
-
ArtemVorotnikov[
> <@endor00:matrix.org> I suggest you dig in Monero's history and look at the DoS attacks from a few years ago, then
-
ArtemVorotnikov[
I'll worry about this when I have the staged sync pipeline done :)
-
hyc
a modular comms library sounds nice, but I'd prefer OpenLDAP liblber to Google protobuf
-
merope
Given that they were directly targeting the sync mechanism, you might want to do that before you're done - or at least, I personally don't like doing things twice
-
hyc
obviously I'm biased, but it's already tuned for zero-copy reads and other stuff
-
ArtemVorotnikov[
> <@endor00:matrix.org> Given that they were directly targeting the sync mechanism, you might want to do that before you're done - or at least, I personally don't like doing things twice
-
ArtemVorotnikov[
there are always points of trust for joining the network, like bootnodes in monerod's source code
-
merope
And since we're trying to build a trustless network, adding more of them (when we already know how to do things without them) would be counterproductive
-
ArtemVorotnikov[
> <@endor00:matrix.org> And since we're trying to build a trustless network, adding more of them (when we already know how to do things without them) would be counterproductive
-
ArtemVorotnikov[
do you plan to port-scan random IPs or?
-
hyc
that seems viable for bitcoin's network. not sure we have enough nodes
-
merope
ArtemVorotnikov[: I was talking about adding trust in the data processing during sync, not peer-finding
-
ArtemVorotnikov[
> <@endor00:matrix.org>
-
ArtemVorotnikov[
> I was talking about adding trust in the data processing during sync, not peer-finding
-
ArtemVorotnikov[
if the worst comes to pass, and attacks become practical, it's possible to add checkpoints and run staged sync block-by-block - since the worst part is history that won't impede the sync significantly
-
ArtemVorotnikov[
as I said, staged sync is mostly about ease of development, we got most of our performance gains elsewhere
-
UkoeHB
the monero node stuff probably needs significant work to support seraphis, so even a proof-of-concept for better node design could be impactful
-
cvmn
hyc: since proving that there is a consensus that a transaction happened, one requires a chain of blocks from genesis, such that there is a block that contains that transaction's hash. since each transaction has a unique hash, therefore the space complexity of the blockchain is O(number_of_transactions)
-
jeffro256[m]
.merges
-
xmr-pr
8319 8355 8516 8517 8525 8527 8529 8543 8564 8569 8570 8571 8578 8580 8590 8593 8594
-
luigi1111w
whoa
-
hyc
cvmn: space complexity isn't a thing
-
hyc
a block depends on the hash of its preceding block, and the hashes of the txns it contains.
-
hyc
that's what gets fed to a miner.
-
hyc
*hash of hashes of the txns. a miner never sees the actual txns