I’m looking for an elementary block chain or distributed ledger library. That is, not the crypto money stuff, but something I can use to maintain a distributed consensus about a sequence of records. I’m looking for something that runs in Prolog, but something that can really help implementing such a beast is welcome too.
Distributed hash tables may be of help here. Don’t know of a specific library, but there has been a lot of work on them lately.
A distributed hash table is of course also nice to have, but for my current work I need a distributed sequence of transactions. These are two different beasts.
I’ve been working on a distributed key/value store based on the a start by Jeff Rosenwald in his TIPC library. That is what is currently
library(paxos), but it is rather immature. The algorithm to get to the consensus is not so hard, but a lot more work needs to be done to deal with nodes that have been down/unreachable for some time as well as nodes that join the network.
B.t.w. message-based programming in Prolog is quite fun
Bob Kowalski has done some work on this, see
Nice notebook. This seems about modelling transactions and some talking to external block chains though. I want a block chain implementation. I want to use it for work I’m doing trying to get to a clustered version of SWISH in a nice lightweight and easy to setup fashion. I also think that a clean Prolog implementation has both tutorial and practical value in dealing with interacting Prolog programs.
I’ve been working a little bit on blockchain and I know of no Prolog implementation of any of them.
If you want something private, it may be feasible in a reasonable time. If you want something public, where anyone can write, then it’s much more complicated and maybe an interface to a dedicate package such as hyperledger is a good idea.
Markus Triska has done something on bitcoin addresses
Isn’t that what Erlang is?
Speaking of which, perhaps there’s an Erlang or Elixir implementation that could be “easily” converted to Prolog.
I want a private blockchain (or more general distributed sequence of transactions) were peers trust each other. That has a lot of value. I don’t think there is much point in pushing a Prolog based public ledger. There is a point in interfaces to public ledgers. Seems Bob Kowalski has done that. AFAIK, Markus’ work is about the cryptographic work behind crypto currencies. That too is not what I’m after.
I found https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54, which is a promising start and easy enough to convert to Prolog. I just think it is a little too simple and lacks dealing with node failures and conflict resolution.
Not unlikely. Do you know one?
(and that’s all I know)
What about the IOT and MQTT brokers like Mosquitto. Does that work for your purpose?
Are you just trying to provide Fault Tolerance in the presence of benign failure, or do you need protection from Byzantine failure and/or malevelent interference or observation?
Using external tools is surely something that can work. I would like to see some basic but functioning distribution mechanisms in Prolog itself though, both for tutorial reasons and to have something lightweigtht and easy to deploy. For now I’m looking for fault tolerance between benign but possibly failing agents, preferably on top of the UDP broadcasting (which means optionally TIPC, as that is easier).
I have a Prolog accounting project and am interested in a similar distributed ledger solution.
I have come accross something called « the scuttlebutt protocol » https://scuttlebutt.nz/