Blockchain

Hi Hi all,

[Disclaimer: I am not sure this is the best category for this topic, feel free to let me know if so]

Are there people involved with blockchain development? Not limited to cryptocurrency and financial transactions, but who are developing, or interested in, code and/or tools for applications leveraging blockchain technology, i.e. any application that can benefit from an immutable record of transactions/operations/commands.
Ethereum has its own language, Solidity, and there are packages/assets/libraries popping up for a variety of languages, including Python, C++, Java,…
I am interested in developing applications for space mission operations leveraging blockchain, and I foresee there might be many other applications in a wide array of industries for blockchain, but I may not have the time or knowledge to develop the basic .

Cheers,
Loic

11 Likes

I’ve been thinking of this lately as well. Julia is well suited for blockchain development. Potentially as a wrapper for something like the Ethereum EVM or Tezos’ Michelson https://www.michelson-lang.com/.

4 Likes

I’m moving this to Offtopic – not necessarily as a value judgement, but because we don’t have any other category for topics that are not questions/proposals/announcements.

(that said, “blockchain” discussions often get … weird. So please try to keep this one not-weird. :slight_smile:)

8 Likes

Ah, good to hear. I am myself looking closely at Ethereum, a wrapper around the EVM would be quite valuable. It seems there already exists EVM implementations in Python, C++, and others:
https://github.com/pirapira/awesome-ethereum-virtual-machine

I am not versed enough in what producing a Julia wrapper around these involve to assess how much work it is and thus if anyone might be interested in taking this on.

@ihnorton We shall try!

2 Likes

An official battle-test cryptography library would surely help.

Nettle.jl has some features, but I do not know if they would be enough.

2 Likes

Julia is a very good platform for Blockchain implementation and Blockchain tool development.

I have investigated this enough to suggest one of two paths. If you are interested in coding the best-in-class blockchain specification, read up on Algorand (there is a new paper that should become available before the end of the year that is write up of their simulation results – the top line takeaway is the simulation results matched the theoretical expectations rather well).

If you are interested in special purpose tooling or adopting a thick set of possibles, Etherium is it.

Where i see Julia adding immediate value is as a higher level language used to generate the evm, michelson and all the other craziness that’s out there. Similar to the idea of emitting web assembly. No need to re-invent the wheel in terms of new cryptographic packages. All that’s needed is a way to write smart contracts in Julia and have the deployment and compilation handled by the native tech. In terms of other relevant cryptos that will likely succeed. EOS (which promises the moon) seems like a strong contender to solve a lot of the Ethereum problems. MIOTA and Tezos are the other worthwhile projects in my humble opinion.

2 Likes

On a slightly-related topic, Ethereum has an intermediate language between EVM and Solidity that is called “Julia”. I’ve suggested that they change the name; see https://github.com/ethereum/solidity/issues/2131

More on-topic: I know people who are interested in funding Ethereum development in Julia. Contact me for more info: chris dot peel @ ieee dot org

5 Likes

@JeffreySarnoff I found Algorand paper – or at least one of them – and it looks like it is in a rather early experimental stage, is that correct? Ethereum on the other hand seems to have some deployed resources to leverage for a Julia front end of some sort. My knowledge here is very limited for now, so feel free to rebut.

@hgeorgako I think I get your point and I agree. Ideally, the capability of writing smart contracts that can interface with any – or a set of, and maybe just one initially – blockchain implementation would be ideal. I had a quick look at EOS and they are promising a lot abd their github suggests it’s ready to play with – although very “alpha”
https://github.com/EOSIO/eos#gettingstarted

@chrisvwx ah – good catch – I’ve read up on it. Re: contact me. I am doing that now.

It is true that Algorand and Ethereum are at different ends of the is-realized and in-use spectrum. If the task were to provide a fully Julia coded, realized blockchain (so whichever the choice, there would be much effort associated), then there are (imo) compelling reasons to want Algorand – it is the only current formalism that is deeply [likely to be] sound, and the way it does what it does is well suited to Julia’s manner of expression. OTOH, the principle persons are actively involved in getting it out there and I have no information to suggest they intend to use Julia.

So, I guess my thought is that there are aspects of Algorand that can be useful within the Ethereum world without being Algorand. I am exploring Ethereum’s smart contracts and would really enjoy using <one of you’alls> Julia toolery therefor.

2 Likes

I agree that if we were/are looking at a full Julia implementation of a blockchain, it makes senses to go with the state of the art, as it will be the same order of magnitude of work to implement a “good” one or a “less good one” – if that is indeed your point.
And I’d be happy if that were the case, I for one cannot say that I have enough motivation to endeavor to do that yet as I am still in the process of assessing the scope of blockchain technology for my (company’s) goals.

In that process, I am going to look at Ethereum’s smart contracts as well, that concept I think have applications in my domain (space mission design and operations) and many other industries. As noted before, a Julia capability of writing smart contracts that can interface with any – or a set of, and maybe just one initially – blockchain implementation would be a good start. A wrapper around Ethereum EVM for instance. [My lack of knowledge in these areas notwithstanding…]

2 Likes

Let us know how you approach this, and any lessons learned along the way.

1 Like

I am currently developing a blockchain analysis package which is not finished and currently only lives on my private hard drive. My intention is to analyse transactions etc. and not to make it into a fully fledged bitcoin client and VM — mostly because of priorities and time limitations if someone really wanted to join me on this and put work into it I will be happy to put it on github.

I am currently doing this for fun and self education in my spare time so the time plan is: it’s done when it’s done, maybe never. There are remains of a similar project on github: https://github.com/danielsuo/Coin.jl and https://github.com/danielsuo/Crypto.jl which where written for Julia 0.3 and never got finished.

2 Likes

A very basic implementation of a blockchain in Julia.

using SHA

"""
An individual block structure
"""
struct Block
    index::Int
    timestamp::DateTime
    data::String
    previous_hash::String
    hash::String
    """
    The constructor which will also create hash for the block.
    It will use 256 bit encryption for the blockchain's security needs.
    """
    function Block(index, timestamp, data, previous_hash)
        hash = sha2_256(string(index, timestamp, data, previous_hash))
        new(index, timestamp, data, previous_hash, bytes2hex(hash))
    end
end

"""
Add another block to the chain.
You can't have a blockchain with just one block after all.
"""
function next_block(tail_block::Block)
    new_index = tail_block.index + 1
    return Block(new_index, Dates.now(), string("This is block ",new_index), tail_block.hash)
end

# Create the special first block or the head of the blockchain.
Blockchain = [Block(0, Dates.now(), "Genesis Block", "0")]

println("Genesis Block : 1")
println("Hash :", Blockchain[1].hash)

# Size of the blockchain
Blockchain_limit = 13

# To make addition of blocks to the blockchain non-arbitary (unlike here),
# a proof of work task is required.
for tail = 1:Blockchain_limit
    # Link the new block to the chain
    append!(Blockchain, [next_block(Blockchain[tail])])
    # The details of the block
    println("Block : $(tail+1)")
    println("Hash :", Blockchain[tail+1].hash)
end

Reference - Let’s Build the Tiniest Blockchain | by Gerald Nash | Crypto Currently | Medium

9 Likes

Bumping this… very interested to collaborate with others on either a EVM wrapper or state-of-the-art Julia from the ground up blockchain.

Interested as well.

Here’s another good opportunity to showcase Julia in this space: https://github.com/cosmos/cosmos-sdk

Note: For now the Cosmos-SDK only exists in Golang, which means that developers can only develop SDK modules in Golang. In the future, we expect that the SDK will be implemented in other programming languages. Funding opportunities supported by the Tendermint team may be available eventually.

2 Likes

:sunny: (please keep me informed) :sun_with_face:

Seems as though it would be possible to hook up the Julia LLVM backend to Ethereum flavored WebAssembly (eWASM)? It is being considered as a replacement to EVM1 (according to the FAQ): https://github.com/ewasm/design

1 Like

Related discussion in a new thread: