Blockchain + Smart Contract in ATS - looking for collaborators

133 views
Skip to first unread message

Lance Galletti

unread,
Apr 27, 2018, 12:17:01 PM4/27/18
to ats-lang-users
Hey ATS users!

I recently had the chance to build a blockchain and smart contract language in ATS - all with a nice CLI thanks to https://github.com/ashalkhakov/colorado.

I wrote a small blog post about it here:


and am looking for collaborators to take this to the next level. If you would like to help me out with enhancing the language or CLI, or if you have a grand vision / feedback you would like to share, please reach out!

Thank you!

Lance

Steinway Wu

unread,
Apr 28, 2018, 3:56:48 PM4/28/18
to ats-lang-users
Great work, Lance! You helped me understand what smart contract means :)

Zhiqiang Ren

unread,
Apr 29, 2018, 1:42:08 AM4/29/18
to ats-lang-users
Nice work. The metaphor of slot machine is very useful for my understanding.

From my experience, creating a new language in ATS for writing smart contract while harvesting the type system of ATS for the correctness of the smart contract is not that straight forward. Writing smart contracts in ATS (or a derivative of ATS) directly would be a relatively easy way. I think generating from ATS to solidity would be a concrete step, which I am interested in.

Lance Galletti

unread,
Apr 29, 2018, 11:06:15 AM4/29/18
to ats-lang-users
I completely agree! I think my initial goal was to explain (mostly by counterexample) the importance of languages like ATS in the context of smart contracts. 

I see this toy blockchain as a simulator in that we can demonstrate various ideas in a visual and maybe more effective way than live on the Ethereum network. It could also be a place for us to experiment with solutions to various scalability issues of the blockchain.

There is no doubt that there is a need for an ATS to Solidity transpiler - and I would love to contribute! This just may be a separate project. What do you think?

Artyom Shalkhakov

unread,
May 3, 2018, 11:30:13 PM5/3/18
to ats-lang-users
Hi Lance,

This is a very good write-up! Looks like now I understand the idea behind blockchain and smart contracts.

I'm wondering what do you plan to do next?

Thank you!

Lance

Lance Galletti

unread,
May 4, 2018, 4:40:00 PM5/4/18
to ats-lang-users

Hi Artyom,

Thanks for reading! So glad you asked because I actually just finished implementing a (very minimal) query language for creating and querying a database that is backed up on the blockchain. You can read about this here: https://beta.observablehq.com/@galletti94/functional-blockchain-part-2 but it is still a very rough draft.

From here, I see this project going two ways and I would love to know what people think will be more useful.

1. Add distribution to the blockchain so that we have a somewhat complete toy application that people can use in order to test various blockchain related ideas. For example, different consensus algorithms, ways to store the blockchain etc. I am very interested for example in the problem of the size of the blockchain and how that will severely limit its use and I would love to test some of my ideas on this simulator.

2. Turn this into a template. That way if you would like to build a web interface for example (instead of command line), or if you would like to implement different languages etc you can fork and (hopefully) just copy-paste your code.

I would love to hear your thoughts if you have other suggestions as well!

Artyom Shalkhakov

unread,
May 4, 2018, 11:33:47 PM5/4/18
to ats-lang-users
Hi Lance,


On Saturday, May 5, 2018 at 2:40:00 AM UTC+6, Lance Galletti wrote:

Hi Artyom,

Thanks for reading! So glad you asked because I actually just finished implementing a (very minimal) query language for creating and querying a database that is backed up on the blockchain. You can read about this here: https://beta.observablehq.com/@galletti94/functional-blockchain-part-2 but it is still a very rough draft.


You're writing it faster than I'm able to read. :-)

I was thinking along these lines, actually. Can we use blockchain for painless distributed line-of-business apps? Say I have an app that needs to sync data with a central server (the app is MOSTLY offline, and setting up proper networking is too costly).
 
From here, I see this project going two ways and I would love to know what people think will be more useful.

1. Add distribution to the blockchain so that we have a somewhat complete toy application that people can use in order to test various blockchain related ideas. For example, different consensus algorithms, ways to store the blockchain etc. I am very interested for example in the problem of the size of the blockchain and how that will severely limit its use and I would love to test some of my ideas on this simulator.

Scalability is an interesting problem to tackle.

Another issue, again from the business side of things, is whether it would make it easier to describe typical business stuff (where you have logical facts, and procedural knowledge, and it usually all gets intermixed to the point of being totally incomprehensible).

Lance Galletti

unread,
May 8, 2018, 11:08:47 AM5/8/18
to ats-lang-users
That sounds very interesting! If I understand correctly, we would define a formal set of rules and axioms at the genesis of the blockchain, and then validate (or provide a framework for validation of) business operations based on these rules? Do you have a specific business application in mind (other than supply chain type applications) to help me better understand?

Your idea makes me think of dependent types and I am dreaming of applying DT to this blockchain somehow - I just cannot figure out how... :)
Reply all
Reply to author
Forward
0 new messages