Pages:
Author

Topic: [PRE-ANN] Qeditas: A Formal Library as a Bitcoin Spin-Off - page 2. (Read 15002 times)

newbie
Activity: 9
Merit: 0
It seams that main Windows build problem was because of the big number of the C++ compilers installed on my PC.) All is simple and working without big problems on clear Windows installation:
 1. Install MinGW with MSYS (http://mingw.org/,  use 64bit toolchain)
 2. Install OCPWin (https://www.typerex.org/ocpwin.html,  use compiled with mingw package)
 3. Add OCPWin bin directory to system PATH environment variable.
 4. Open MSYS and navigate to qeditas sources
 5. Fix the problem in sources,  mentioned in previous post,  for example change "/dev/urandom" to "urandom" and place non-empty file with name urandom near the qeditas.exe in the future.
 6. Use usual configure & make to build qeditas.exe (set install and data directory in configure args)

That's all.

Now I'm trying to build Trent Russel's branch with leveldb.

What about dev/urandom: I hope to find universal way to get random numbers in OCaml,  if there is no such way (it would be surprising) we can add C-based module to generate such numbers that will work on any platform.
member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
At the end of the day I've managed to build and start it under the Windows,  and it works correctly.)

The only problem is src/qeditas.ml,  line 331:
Code:
    let dur = open_in_bin "/dev/urandom" in (*** this is to compute a nonce for the node to prevent self conns; it doesn't need to be cryptographically secure ***)

I've used a real file with real path instead of the "/dev/urandom" as a simplest workaround, I need more OCaml knowledge to fix it correctly, I can't do it right now.

I'll share Windows build instructions later, after I test it on clear Windows installation and choose the simplest way to build the project.

That is great to hear! Thank you for your work.

Regarding the call to /dev/urandom, this could be replaced by something giving random numbers that do not need to be cryptographically secure. However, in the end we will definitely need to be able to obtain cryptographically secure random numbers. In linux I can get these from /dev/random. There must be some way to obtain cryptographically secure random numbers in Windows, in a way that can be called from OCaml.
newbie
Activity: 9
Merit: 0
At the end of the day I've managed to build and start it under the Windows,  and it works correctly.)

The only problem is src/qeditas.ml,  line 331:
Code:
    let dur = open_in_bin "/dev/urandom" in (*** this is to compute a nonce for the node to prevent self conns; it doesn't need to be cryptographically secure ***)

I've used a real file with real path instead of the "/dev/urandom" as a simplest workaround, I need more OCaml knowledge to fix it correctly, I can't do it right now.

I'll share Windows build instructions later, after I test it on clear Windows installation and choose the simplest way to build the project.
member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
I'm failed to make it working under the Windows,  but may be it is because of my poor OCaml envirinment knowledge,  I'll try it one more time today or tmorrow. I've tested it under the Linux (Ubuntu) and all is correct as far as I can see.) I haven't tried to use it with C code yet, will try to do it this weekend.

Thank you for trying under Windows. It isn't surprising that it does not work immediately.

If you are getting OCaml errors, feel free to post them here or send them to me in a private message. If I recognize the errors, I might be able to advise you.

One possibility is to use Cygwin: https://cygwin.com/. It is supposed to simulate a linux environment withing Windows.
newbie
Activity: 9
Merit: 0
I'm failed to make it working under the Windows,  but may be it is because of my poor OCaml envirinment knowledge,  I'll try it one more time today or tmorrow. I've tested it under the Linux (Ubuntu) and all is correct as far as I can see.) I haven't tried to use it with C code yet, will try to do it this weekend.
member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
I feel like Mexican food after having read this coin name!

lol..after this comment is the first time i am having an idea how to pronounce it!

I assume this is intended as a (humorous) reference to quesadillas. This is actually close to how I pronounce it, except there are three syllables with the stress on the first.

Here is an attempt to give the pronunciation using the IPA.

https://en.wikipedia.org/wiki/Help:IPA_for_English

quesadilla (/ˌkeɪsəˈdiːjə/)
qeditas (/ ˈ keɪ diː tɑːs /)

newbie
Activity: 45
Merit: 0
I feel like Mexican food after having read this coin name!

lol..after this comment is the first time i am having an idea how to pronounce it!
member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
Congratulations on your first release!)

I am at Windows PC right now, so I'll try to install it under Windows today.

Thank you. If it turns out to work under Windows, I will be happily surprised. If it turns out to require some minor modifications to work under Windows, please let me know. In that case, I can do a new release with the modifications.
legendary
Activity: 1120
Merit: 1000
I feel like Mexican food after having read this coin name!
newbie
Activity: 9
Merit: 0
Congratulations on your first release!)

I am at Windows PC right now, so I'll try to install it under Windows today.

Trent Russell, thank you for sharing your work with leveldb integration,  I'll try to fix library issue if it is possible and will share result if I will find something useful.



member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
I have decided to do the first alpha release. Most of the important functionality is still missing, but at least this gives a chance for people to try to compile and run the code.  It will not connect to a network. At the moment, the main things a user can do is import addresses into a wallet and print the assets they have in the initial distribution.  (Again, the initial distribution was based on Bitcoin block height 350,000. This is fine for the testnet, but I am open to changing it for the mainnet when the time comes.)

You can download the release 0.0.1rc2 either from qeditas.org:

qeditas.org/qeditas-0.0.1rc2.tar.gz

or from mega.nz:

https://mega.nz/#!MhAUUA6S!cTe33Yd5P4p7WYU5fFuWAC-kmqKhzhfFIv0h4bRRLBU

If you want to verify the integrity, here is the sha256sum:

1a88b885f0e4dd5c663440326047ca1b316e5875c5697d3930deb314dbbd2773

There is a README.md file that explains how to compile and run Qeditas, as well as how to import (watch) addresses and print the assets held at those addresses.

(There are also commands for importing private keys. Just to be safe, I recommend no one tries this with private keys that held bitcoins. Importing as a watch address is sufficient for now. When the time comes to test staking, the assets in the initial distribution can be controlled via endorsements. You will never need to import a private key that held bitcoins.)

You will need OCaml to compile Qeditas.

If you want to print the assets in the initial distribution, you will need one version of the initial ledger tree. I have created and
uploaded three versions: one with the full ledger tree (656MB), one with only the p2pkh addresses (606MB) and one with only the p2sh addresses (39MB). These files are too big to download from qeditas.org, so they are at mega. (You only need one.) Here are the links and the sha256sum to verify the integrity.

qeditas-db-initdistr-full.tgz
https://mega.nz/#!Ap5ylL4C!WLy3bTvMWSwuIKVQvmW7BOT7t38WWLeU8bVlRxt7CtE
sha256sum: 6687d1f4bd4a6c2263276e83f6a27f3d7df465f8adfaa6322f950cb9ae58faf4

qeditas-db-initdistr-p2pkhonly.tgz
https://mega.nz/#!t5YnjJBZ!1LUVDNm9p7PYI51bA2__m323zwnBK3aG0r82_sGY7Qs
sha256sum: d48201961b2d2b904b1aad5911131d3f23714ac30d25daa085e9d45850afdded

qeditas-db-initdistr-p2shonly.tgz on mega:
https://mega.nz/#!NlpTSY5I!eg2MYZeKLF0W30yngBlXprqrMnmqfz_Mx3QKOtIrjO0
sha256sum: fc3c39f7b87de31f9c4b46dfce2eeec0e1691bb7863455311ec3e8a875f06134

The README.md file explains what to do with the file once you download it. (Again, you only need one. If you want to check both p2pkh and p2sh addresses, you'll need the full one.)

Here is a PGP signed copy of the links and hashes above, for those who are extra cautious. My PGP key is available at https://pgp.mit.edu/ (search for [email protected]).

Code:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

qeditas-0.0.1rc2.tar.gz
qeditas.org/qeditas-0.0.1rc2.tar.gz
https://mega.nz/#!MhAUUA6S!cTe33Yd5P4p7WYU5fFuWAC-kmqKhzhfFIv0h4bRRLBU
1a88b885f0e4dd5c663440326047ca1b316e5875c5697d3930deb314dbbd2773

qeditas-db-initdistr-full.tgz
https://mega.nz/#!Ap5ylL4C!WLy3bTvMWSwuIKVQvmW7BOT7t38WWLeU8bVlRxt7CtE
sha256sum: 6687d1f4bd4a6c2263276e83f6a27f3d7df465f8adfaa6322f950cb9ae58faf4

qeditas-db-initdistr-p2pkhonly.tgz
https://mega.nz/#!t5YnjJBZ!1LUVDNm9p7PYI51bA2__m323zwnBK3aG0r82_sGY7Qs
sha256sum: d48201961b2d2b904b1aad5911131d3f23714ac30d25daa085e9d45850afdded

qeditas-db-initdistr-p2shonly.tgz on mega:
https://mega.nz/#!NlpTSY5I!eg2MYZeKLF0W30yngBlXprqrMnmqfz_Mx3QKOtIrjO0
sha256sum: fc3c39f7b87de31f9c4b46dfce2eeec0e1691bb7863455311ec3e8a875f06134
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXVvoaAAoJEBTKnDJBv3qS5BwP/3iR8LBer/ex9FM8xdx8H9iN
uYioy7j+6Sr+zenW7ZxKsReMtxXNsk27sKJni7hAbZWN0JJPFQpZpMzGNmH3ZqAc
NzOidm+XtdSn8HKiGfW0QVmizblOpR0CWxmTD/VXSbZFaOIUr9NCVXgRo+UyaR2u
gEZisk6IFAh66cA6reS1dhg5j8Cb/svtOUTiVd6RQMK1WinNOxbqJUj8eSO5XPKr
07FoXZm/NB5FyfSfvh7zET/SnHDujV0hwEvZ6PnlAL2TlRlRfanoBYIpuQXan3ZH
iOwMBXRQ/ALOEwwOCx+Pw0i0bzZL/qVeYNwTT6nSpO/X3rnVT7QYzWt0ToabgFEz
TnPvYwH3ImgRwnar2G+1IDIWhY4wPK2bVsnnwzBfvFkaGeNH8g11DuhkglWQJJ8i
T4CAn70LV469lMoK/BZtFZEWrLP/TgGmXuFQnExMsBrERRXjpUoSRTGbFAH1c2qH
acaoP9Tt/W9qVvOhYYK0Ui3bqFOQ5tRda8phngDOgFrE+nFjpl3u5rYRkawfWu9E
trQBt7CKK9YzqZbKan+sLV/ynLULVuHuqR/dlyWZWfGdxS24misSBfXZm8ELOyy0
2d+vyvwP/y1XeRsx6xZ23qgcrpI0giGmVHGdcoXEHKSMiAj5pPLDHuu/C0jAvJvY
HP5Gx5sqGPk1ikGhPQax
=GjWN
-----END PGP SIGNATURE-----

Of course, I can imagine there may be problems. Feel free to post here about the problems and we can try to fix them. The purpose of this release is simply to get an initial idea of what issues to expect.

Here are two issues I can preemptively address:

Qeditas has only been tested under Linux. I would be surprised if it worked under Windows.  It probably works under Mac OSX, but this has not been tested.  Others are welcome to attempt to use Qeditas under Windows, but I can not imagine myself investing effort into a Windows version.

There is no GUI. When you run the executable you will be in a console in which you can give commands. I have no plans to build a GUI, but someone else is welcome to do so.
full member
Activity: 132
Merit: 100
willmathforcrypto.com
Here's a link to a branch where I tried to use leveldb:

https://github.com/trentrussell/qeditas/tree/trdevnfth-leveldb

It actually does compile, at least for me on debian. I got leveldb-1.18 and then compiled it. To compile qeditas I first had to set some directories are set using the configure file:

Code:
./configure -leveldb= -ocamlinclude=/lib/ocaml
make

I have in my notes though that in some situation I got an error like:

Code:
Error: Error on dynamically loaded library: ./bin/dlldb.so: ./bin/dlldb.so: undefined symbol: _ZN7leveldb2DB4OpenERKNS_7OptionsERKSsPPS0_

Instead of trying to figure this out, I switched to just saving things in files. I assume this is some kind of linking error which would be easy to resolve if I knew more about it.
member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
Hello.

I can prepare a newer snapshot if you are interested in it. I don't think it is a real difference,  but can do it if you need it to save your time.) Tell me please if it should be done and I start to work.

You can if you want, but it's probably better to wait. The earliest I can imagine the Qeditas network launching is in late 2016. It's likely that if someone wants a fresher snapshot, then they will want it to be nearer to the time of the launch than now. The user sfultong (earlier in this thread) did some work to help people create snapshots. I am not sure of the status of his work, but if you do decide to take a snapshot his work might help you.

Something that would be much more helpful (and probably easier) would be to integrate the Qeditas OCaml code with some standard library for persistent storage of key-value pairs, like leveldb. Trent Russell tried to do this, but encountered some difficulties. In the end, he implemented his own file based storage "database" module. I have recently finished documenting his database code in Chapter 6 of the Technical Documentation:

http://qeditas.org/qeditastechdoc.pdf

That code is in src/db.ml and src/db.mli in the dev branch.

Integrating with leveldb (or something similar) would almost certainly have better performance.

There is a chapter in the OCaml manual that explains how to call C functions:

http://caml.inria.fr/pub/docs/manual-ocaml/intfc.html

A similar task would be to have the Qeditas OCaml code call C functions to do the hashing (sha256 and ripemd160). There must be open source C implementations of these hashing functions, and I suspect calling C versions instead of the current OCaml versions would significantly improve performance.
newbie
Activity: 9
Merit: 0
Hello.

I can prepare a newer snapshot if you are interested in it. I don't think it is a real difference,  but can do it if you need it to save your time.) Tell me please if it should be done and I start to work.
member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
After spending some time reviewing Trent Russell's code, I have merged it into the dev branch: http://qeditas.org/gitweb/?p=qeditas.git;a=log;h=refs/heads/dev

This gives all of us a common code base to branch off of, in case anyone wants to contribute.

The white paper had not been updated in over a year, so I spent some time bringing it into agreement with the current status and plan. For example, the white paper now discusses the plan to have claim windows during which the value of the unclaimed initial distribution will halve every 4 years after the first 5 years.

The latest draft of the white paper is here: http://qeditas.org/qeditas.pdf

One thing is worth explicitly discussing now. The snapshot from block 350,000 is now over a year old. While I am not opposed to using a more recent snapshot instead, I am opposed to taking such a snapshot myself. Taking and preparing such a snapshot is very tedious and time-consuming, and I have no interest in doing this again. If someone feels strongly that a more recent snapshot should be used, please prepare it for me. Otherwise, I will simply use the earlier snapshot. There are stronger arguments in favor of using the older snapshot, or perhaps combining the older snapshot with a newer one. For example, the earlier snapshot was announced in advance as the one on which the Qeditas distribution would be based. It may be considered unfair to change that now.

My next task is to update the technical documentation to reflect the changes in the code. Then I will create a version people can download, try to compile, and check their balances. To check a balance, people will need to also download the initial ledger tree, which is roughly 700MB. This data will be separate from the git repo.
member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
Really glad to hear you are still interesting in this project.) I think qeditas idea is really great and important.

I would be glad to help in development, but I havent't enough skills right now (I'm a C++ developer without deep math education), but I'm learning and I hope I can be useful in a several monthes or about. Tell me please if you know some tasks where I can participate right now,  I'll be glad to do smth. useful.)

This is good to hear. I do have some ideas how someone with C++ (or C) knowledge could improve Qeditas, and I will write more about this later.
newbie
Activity: 9
Merit: 0
Really glad to hear you are still interesting in this project.) I think qeditas idea is really great and important.

I would be glad to help in development, but I havent't enough skills right now (I'm a C++ developer without deep math education), but I'm learning and I hope I can be useful in a several monthes or about. Tell me please if you know some tasks where I can participate right now,  I'll be glad to do smth. useful.)
full member
Activity: 132
Merit: 100
willmathforcrypto.com
Due to being busy with other things, I have not directly done any work on Qeditas since December. Nevertheless, I have been exchanging private messages with someone who has been experimenting with his own fork of the code. I must admit I haven't looked closely at his progress, but hope to spend some time reviewing it soon. Perhaps he will want to say more.

OK. I can give a short summary of what I've been doing.

In January I tried using a fork of Clams to do the networking and database storage for Qeditas. This worked well enough that I had two or three nodes running a testnet for about a week. There were problems though and I don't think it makes sense to inherit a lot of code and dependencies that aren't needed. So now I'm trying to directly code the networking and database code in ocaml with the rest of Qeditas.

One technical point might be worth mentioning: I got rid of "frames" entirely. Now ledger trees (ctrees) are always stored and communicated as "elements"  -- essentially 9 levels with hashes summarizing the lowest levels (except leaves).

It's like fixing the "frame" to be one that abstracts every nine levels.

If all goes well, at some point I should be able to get some kind of testnet running. If so, I'll say more about how others can run a testnet node too. But I don't know if "at some point" will be next month or next year. Even at that point, I wouldn't recommend starting a mainnet until the testnet has run without a problem for a few months and people have had a chance to review the code.
member
Activity: 118
Merit: 11
Qeditas: A Formal Library as a Bitcoin Spin-Off
Hi. Have you stopped to work on this project?

Thank you for your interest.

Due to being busy with other things, I have not directly done any work on Qeditas since December. Nevertheless, I have been exchanging private messages with someone who has been experimenting with his own fork of the code. I must admit I haven't looked closely at his progress, but hope to spend some time reviewing it soon. Perhaps he will want to say more.

Generally speaking, anyone who wants to help bring Qeditas to reality is welcome. It turned out to be much more work than originally estimated. The idea of combining formalized mathematics with a cryptocurrency still appeals to me. I am certainly still interested in seeing the project completed, even if it takes years instead of months.
newbie
Activity: 9
Merit: 0
Hi. Have you stopped to work on this project?
Pages:
Jump to: