Technical ideas required/very-nice-to-have for SabVM #64
Replies: 1 comment 7 replies
-
Good points all throughout. Have you already seen my preliminary work (PoC) in V3 Core?
This is how I designed it in V3 Core.
Again, how it's designed in V3 Core. But there's a difficulty here:
This is fundamentally an issue about data structures in Rust, and I don't see how we can be of help with this without concrete references to external libraries like Petgraph.
Since edges are normally streams, I recommend against introducing bidirectionality just for some non-essential data structuring purpose. If we do this, we would ascribe another meaning to edges, and we don't want that. |
Beta Was this translation helpful? Give feedback.
-
Here is a list of ideas (in no particular order) which I've thought of while brainstorming how SabVM would function/could be made to function more efficiently:
For each node/address, the static balance would have to be accompanied by the date at which the balance has last been calculated, so that the next time it needs to be re-calculated, that date could be used as a starting point (i.e. starting from that point, see how much the incoming Streams have streamed in - and how much the outgoing Streams have streamed out);
To parse the Stream network/sub-graph in a more efficient way (with the smallest-possible no. of nodes being re-evaluated multiple times), we could keep track - in an independent, protocol-level collection - of the up-to-date state of all of the "source" nodes/Senders (that only have outgoing edges/Streams) - and to start each rebalancing from this subset of nodes;
To simplify the rebalancing for a node, it'd be very handy to have access to an up-to-date collection containing all of the Streams incoming for the node (where it is the Recipient). Implementing this would mean either
@razgraf, @PaulRBerg
Beta Was this translation helpful? Give feedback.
All reactions