GSoC 2019 proposal - Easy Ethereum Blockchain integration

已查看 170 次
跳至第一个未读帖子

Diego Lima

未读,
2019年3月14日 16:01:382019/3/14
收件人 Django developers (Contributions to Django itself)

Introduction


These days, every single living being has heard of Bitcoin. Some of those know that Bitcoin is a cryptocurrency (crypto for short) and, within those, a few know that it runs on top of a technology called Blockchain.


This technology has boomed just alongside Bitcoin since the year 2008, and it is being used in many different sectors of society (having numerous examples worldwide): finance, industry, healthcare, government.


It has existed for some years now, and there are many different blockchains. For crypto, their role is to provide a descentralized framework upon which one can execute monetary transactions in a verifiable, irreversible manner. But some of those blockchains provide extra funcionality: something known as a smart contract.


Basically, a smart contract is some computer code that runs on top of a blockchain (thus, it has cryptography-enabled credibility) that enforces some rules to be obeyed by the involved parties.

The first blockchain smart contracts were introduced by Ethereum platform. As stated in their website:

Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference. 
These apps run on a custom built blockchain, an enormously powerful shared global infrastructure that can move value around and represent the ownership of property.

In other words, blockchain is a protocol for users to build systems which need to agree on something. And this thing may be just as simple as a monetary transaction, or as complex as a government. So, having a way to easily interact with this technology can enable a whole new set of applications.


My proposal is...

to develop a library to supplement or support the development of django applications with blockchain integration.

My success indicator is whether I have made it easy for anyone to store and retrieve information on the blockchain inside their Django code. 


Prototype

I already have a working prototype. It consists of a simple RESTFul API, and it is part of a side project I was working on: a generic architecture where the users can channel some input to a fast or robust machine to do some processing. The RESTful API was right in the middle, connecting the user device and the robust machine. 

The example I have built goes like this: 
  1. The user generates a drawn numerical digit through an android/iOS application, and sends it to the Django API along with his/her ethereum wallet address.
  2. The Django API verifies whether the user has paid a small fee. This verification is done by checking if the user has sent a certain ETH amount to a smart contract I have designed and launched (in a private network).
  3. The users who have paid this fee have their input processed by my machine. I have set up a convolutional neural network which will recognize single handwritten digits in images. The user then receives the processing result.
The idea for this architecture is to be modular and easily extendable for any purpose: signal processing, image processing, data crunching...

If my proposal is accepted, I will be open to work on it and do my best, and I expect to learn a lot with my mentor.  I also expect to hear suggestions on how to lead this proposal to the most useful functionality.


Schedule

Since I already have a working propotype, a good week can be spent on discussing the existing work, the general implementation design and scope.

The following weeks will be spent building, writing tests and documenting.

The last week should be spent building some working demo.


About me

I'm a computer engineering student in Brazil, and I have 3 (soon to be 4) years of experience working with Django. Some big projects I have worked on are PMAQ and SMART, which are related to health quality data collection (all over the country) and business intelligence.


Curtis Maloney

未读,
2019年3月14日 18:09:232019/3/14
收件人 django-d...@googlegroups.com
On 3/15/19 6:42 AM, Diego Lima wrote:
> *Introduction*
>
> These days, every single living being has heard of Bitcoin. Some of
> those know that Bitcoin is a cryptocurrency (crypto for short) and,
> within those, a few know that it runs on top of a technology called
> Blockchain.

Be aware that outside of the ponzi-scheme laden world of
cryptocurrencies, "crypto" is short for "cryptography" ; be careful to
ensure your audience knows which you mean :)

> *My proposal is...*

> to develop a library to supplement or support the development of django
> applications with blockchain integration.

> My success indicator is whether I have made it easy for anyone to store
> and retrieve information on the blockchain inside their Django code.

This sounds like an interesting and potentially very popular project.

However, AIUI Django's GSoC projects should involve development of
Django itself.

Is there a reason why your project could not remain a 3rd party library?
This would allow it to develop and release at a pace independently of
Django's release cadence.

--
Curtis

Diego Lima

未读,
2019年3月14日 19:30:242019/3/14
收件人 Django developers (Contributions to Django itself)
On Thursday, March 14, 2019 at 7:09:23 PM UTC-3, Curtis Maloney wrote:
Be aware that outside of the ponzi-scheme laden world of
cryptocurrencies, "crypto" is short for "cryptography" ; be careful to
ensure your audience knows which you mean :)

Noted! 

This sounds like an interesting and potentially very popular project.

Awesome! I'm glad you think that.
 
However, AIUI Django's GSoC projects should involve development of
Django itself. 

So my idea falls out of scope? Did I make a mistake?

I think I didn't. Check this out:

Screenshot from 2019-03-14 19-50-03.png


Is there a reason why your project could not remain a 3rd party library? 
This would allow it to develop and release at a pace independently of 
Django's release cadence. 

Originally, this idea is a library which supplements or add new features to Django in order to ease the development. This category already includes tools such as South and Django Debug Toolbar, as stated in Django's GSoC page.

As such, this project could remain a 3rd party library. Right?



Alternatively (and free-thinking-ly), one "variant" of this proposal would be to make some sort of database blockchain-enabled backend. So, today you have postgres, mysql, sqlite and oracle backends. With this project, there would be a fifth one: custom blockchain backend. You could store your data seamlessly, through your models, using this backend.

The schedule would be very different, though. 

Also, it's probably better not to make a backend out of it, but a model meta option instead.

As of now, I prefer the original idea.

Carlton Gibson

未读,
2019年3月18日 05:57:012019/3/18
收件人 Django developers (Contributions to Django itself)
Hi Diego. 

Thanks for your interest. 

> So my idea falls out of scope? Did I make a mistake?

I think there's a difference in kind between e.g. South and Django Debug Toolbar (or even things like Django Extenstions, or Braces or Model Utils) which support development with Django and your proposal which is more building a feature in Django. ("with" vs "in") Hopefully that distinction is clear enough for here and now. 

It's not that all "in" type third-party suggestion would be out of scope — I could imagine a good proposal for 2FA and One-time-passwords being at least considered, even if preferred as a third-party app, for example — but I think yes, "Using Blockchain in Django" is out of scope for us for GSoC. 

Kind Regards,

Carlton




Diego Lima

未读,
2019年3月20日 05:06:272019/3/20
收件人 Django developers (Contributions to Django itself)
Hi Carlton!


On Monday, March 18, 2019 at 6:57:01 AM UTC-3, Carlton Gibson wrote:
Hopefully that distinction is clear enough for here and now. 

Yes, I understand this distinction. Thank you for clarifying. 
 
It's not that all "in" type third-party suggestion would be out of scope — I could imagine a good proposal for 2FA and One-time-passwords being at least considered, even if preferred as a third-party app, for example — but I think yes, "Using Blockchain in Django" is out of scope for us for GSoC. 

I understand.

From your perspective, do you think there is some different angle we can look this proposal from?

Do you have any suggestion for bringing this proposal into GSoC's scope?

Thank you for you attention!
 

Carlton Gibson

未读,
2019年3月21日 11:02:222019/3/21
收件人 Django developers (Contributions to Django itself)
Hi Diego. 

> Do you have any suggestion for bringing this proposal into GSoC's scope?

No. Sorry. 🙂

Django is a web framework. So stuff in that area would be in-scope. 

Likely it's just my lack of imagination but, I think blockchain is a totally different area of tech. 
Equally if you'd have suggested "django-tensorflow" (say) I'd guess I'd think, "good luck but not for Django itself". 

I hope that makes sense. 

Kind Regards,

Carlton

回复全部
回复作者
转发
0 个新帖子