Jump to content
retryW

Tutorial: Create a Smart Contract from Scratch and Upload to a Codius Host

Recommended Posts

If I write a contract and upload to multiple hosts, how to make sure the data in different host are consistent, did the codius host maintain it or I should write some consensus mechanism in contract?

Share this post


Link to post
Share on other sites
5 hours ago, yxxyun said:

If I write a contract and upload to multiple hosts, how to make sure the data in different host are consistent, did the codius host maintain it or I should write some consensus mechanism in contract?

If you want some data that is uploaded to the contract on one host to show up on all hosts, yeah you'll have to work out some kind of consensus/syncronization system.  It shouldn't be too difficult,and as the platform evolves it should become far easier.  :)

Share this post


Link to post
Share on other sites
4 hours ago, Pablo said:

Fantastic work Cale. I’ll update the FAQ this weekend. 

Job offers coming your way in 3...2...

Thanks Pablo! Appreciated it :)

Doubt any jobs are coming my way, but I'm enjoying contributing to the community  :D thanks again!

Share this post


Link to post
Share on other sites

So, question. I think what you did is legit! I'm curious, however, if docker is 100% required? If not, I wonder what an alternative might be.  Reading the docs I see that a "pod" is required because deployed software must be containerized. However, I wasn't able to find something that definitively mentioned that Docker must be used to make said pod.  The link on the architecture page under the POD section does have a link to the docker site for containers, so it may be required after all. Or, designed for it at least. 

https://codius.org/docs/running-a-host/host-architecture 

https://kubernetes.io/docs/concepts/workloads/pods/pod/

Share this post


Link to post
Share on other sites
On 7/15/2018 at 7:34 AM, CoinTrek said:

So, question. I think what you did is legit! I'm curious, however, if docker is 100% required? If not, I wonder what an alternative might be.  Reading the docs I see that a "pod" is required because deployed software must be containerized. However, I wasn't able to find something that definitively mentioned that Docker must be used to make said pod.  The link on the architecture page under the POD section does have a link to the docker site for containers, so it may be required after all. Or, designed for it at least. 

https://codius.org/docs/running-a-host/host-architecture 

https://kubernetes.io/docs/concepts/workloads/pods/pod/

Hey,

Thanks CoinTrek!

I don't think Docker is necessarily required, but you would need some other alternative of creating a containerized image. Unsure of many other ways other than Docker.

Share this post


Link to post
Share on other sites

I really haven't had the time to start using codius, only hosting, they mention its possible to code with more common languages like C# etc. 
Again, haven't had the time to look into it, but where in the steps can I use C# instead? Wondering due to the index.ejs type extension.

Share this post


Link to post
Share on other sites
On 7/23/2018 at 2:51 AM, mikkelhviid said:

I really haven't had the time to start using codius, only hosting, they mention its possible to code with more common languages like C# etc. 
Again, haven't had the time to look into it, but where in the steps can I use C# instead? Wondering due to the index.ejs type extension.

@mikkelhviid The part where I create those three files of code. That is all the pieces for a basic web server and website.  You can replace that with an application that does anything (whether you make it forward facing or not). 
Your contract doesn't have to show output when you browse the URL. You could have some C# application just doing whatever stuff in the background.

Would also have to change stuff in the Dockerfile, so it know what environment / language to compile/run in.

Share this post


Link to post
Share on other sites
On 7/22/2018 at 12:51 PM, mikkelhviid said:

I really haven't had the time to start using codius, only hosting, they mention its possible to code with more common languages like C# etc. 
Again, haven't had the time to look into it, but where in the steps can I use C# instead? Wondering due to the index.ejs type extension.

 

 

https://github.com/jargoman/RippleLibSharp

Not related to codius. However if you are a c# programmer you may be interested in the library I recently released. It needs a fresh set of eyes. 

I also wrote a proprietary application that is a distributed exchange. Beyond doubt the best wallet in crypto 

 

Share this post


Link to post
Share on other sites

×