Request: Please tell me why this is an awful idea

Hi SAFE devs, I have come across a concept recently, and if you can tell me why it won’t work and I agree with you, then I don’t need to chase the concept.

Do you know TiDB? I’ll assume no. It is a scalable drop in replacement for mysql. There are three components:

  • TiKV - distributed key value store. rust.
  • PD - controls placement of storage containers, for lack of better terms. rust.
  • TiDB - Mysql API emulator more or less. Interacts with TiKV. golang.

As you know everything can be done with just a kv store. Truly, everything. So why not use TiKV in a SAFE-like way? I mean something along the lines of:

  • hash all data coming in and store the hashes on-chain.
  • on-chain hashes correspond to off-chain data stored in TiKV.

Note: I realize that this does not implement the full SAFE featureset-- it doesn’t attempt to, in fact.

This is the process SAFE is going down. We have a KV data store but are very focussed on security and consensus there to pull it all together. So imagine TiKV type system where each node is measured for performance, capability and correctness. These points mean we assume all nodes have broken or more likely attack code in them. This is why normal kademlia or raft type algorithms are part of the story, but do not complete that picture. The core is consensus and agreement between nodes that cannot be inserted or located in the address space.

We do tend to keep an eye on many projects that do some of what we do and I am sure that is likewise. There is a lot now and that is a great thing. This one is very active though and it will be really cool to see whee it goes as is the case with many redis type solutions.

2 Likes

How is the measurement being done currently?

Gossip-like system where nodes tattle on one another?

Are the nodes clustering to one another?

How different is Rust from Go? I might be ready to help in a meaningful fashion now (though I do hate those colons, all those colons…)

There are many methods that are all combined. The RFC’s are best to get an overview (disjoint groups, node ageing, data chains will all give some idea). Best though is to use the on line docs for routing and safe_vault. Rust is non garbage collected, so you take care of memory allocations etc. yourself, but the compiler is very helpful there.

1 Like

Question 1

Just to be short and sweet about it can you let me know if I am right?

  • GC languages are better for dev velocity
  • non-GC languages are better for… “precision” (which can enable efficency?)

I’ll do some basic rust tutorials and write a test app of some kind, and after that I’ll start looking through the SAFE code.


Question 2

Can you describe what the current issue with the vault code is? Not here to beat ya up about it, I know well how tricky getting something like that right can be.

Thanks.

Q1 - Yes, also non gc lang are good for platforms where other languages can link easily to.

Q2 - Vault code is changing very little from the current Alpha, when data chains goes in it will make a difference but for the moment vault code is pretty stable. Routing has had a mammoth change recently though.

1 Like

Is there a testnet of user-run vaults these days?

Not right now, unless you do your own (which you can). This is the target at the moment, We are closing that one down to ensure the network can ensure nodes are (1) capable and (2) behaving. Step 1 is partially handled by resource_proof (snapshots) and this will eventually be supplemented by continual measurement of groups that a node is always behaving (step (2)). As step 1 is done there will be vaults from home that we will improve. Then data chains will mean vaults can restart and the network will not lose data each upgrade. Then the upgrade mechanism will be able to become much smoother.

2 Likes

Wow I can’t wait to talk with you.

On another note, data chains, they are different from blockchains in a subtle and important way that I don’t yet grasp. Can you help me out there?

2 Likes

https://github.com/dirvine/data_chain Will help, there are two rfc’s to cover this as well which will help.