Is there something like merkle patricia tree in the ethereum? or world-state in hyperledger?
If not, are there any plan to implement?
Is this silly question? if so, please tell me why.
Thanks in advance!!
Is there something like merkle patricia tree in the ethereum? or world-state in hyperledger?
If not, are there any plan to implement?
Is this silly question? if so, please tell me why.
Thanks in advance!!
There’s not really notion of inputs and outputs in nem, as it’s not btc based. There’s an account state.
Nis itself stores only blocks and those blocks are re-analyzed when started and state is obtained.
Catapult right now also have state saving, that significantly speeds up start time.
(It could be done in nis as well, but I’m not sure if we’ll be doing that)
State saving is a great idea! I love how NEM devs are regularly thinking about these things.
Thanks a lot! I also really like to know what devs are thinking about how to implement it in Catapult if it’s possible.
implement what exactly?
What I understood from your reply is that
Nis does not store transactions in block, but rather “state” (i.e. account balance, importance score, etc) for each account. And each time the account is updated every state information is included in a block.
But this will cause a block-size issue since it’s redundant. Catapult employ better way to represent an account state, so the start time (blockchain synchronization) will be more efficient.
so what is that “better way” ? how it is implemented ? what are the choices for data structure available and why Catapult has chosen that data structure ? what is the future direction ? and so on.
That’s not what I meant.
In catapult we also save that (obtained) state, not to re-load all the blocks during every start as it’s waste of the time.
Now I understand perfectly. So I suppose simple Key-Value database is good enough for that purpose. How large that state database will be ? Is it small enough comparing to its blockchain?
If when talking about Key-Value, you’re thinking about account-balance relation, it’s bit more complicated as you need to store some metadata as well.
Storage size obviously depends on number of accounts, In catapult you need at least 141 bytes per account (and that is really a minimum).
So to store 10M accounts you need ca 1.3GB of space
That might sound like a lot, but…
To actually create 10M accounts you need:
grate answer! thanx.