iXledger Platform: Solidity
Read the insights this week regarding Solidity on the iXledger platform and more…
Welcome to this week’s blog post, as we bring you exclusive content again from our developers. But, to start things off, we would like to provide you with a quick update on our whitepaper.
We are making progress to complete the new version of our whitepaper, however, our WP release has met a small delay because we are continuing to receive more feedback from our key community members to fill in the missing piece to our WP.
The dev team have done a great job completing Sprint 5. We now move onto Sprint 6 for the next two weeks, which consists of the following tasks:
- Submissions. Messaging and RFI (Request For Information) — Exchange of instant messages between market participants.
- Submissions page. RFI — RFI is a formal way of requesting and returning additional information.
- Submissions — When insurers receive submissions they can provide quotes against them.
Click here to view our Sprint roadmap and FAQ’s.
Written by our Blockchain Developers.
First things first, before we dive into our experience with Solidity in Sprint 5, let us help you briefly understand what it is. Solidity is a programming language for writing smart contracts. It is used for implementing smart contracts on various blockchain platforms. We are using Solidity to program smart contracts on the iXledger platform.
The dev team has been busy extending the application’s use of the blockchain. One of the challenges has been storing large data structures of varying sizes, because solidity does not allow parsing variably sized arrays of any non-native type to functions. To solve this, we need to chop up our data into chunks of 32 bytes before storing it in a contract, and subsequently merge it back together when receiving it. Furthermore, to not exceed the gas limit in a block, any array with more than ~200 entries needs to be added to (and deleted from) the contract in separate transactions. This in turn creates atomicity issues, as it would be possible to delete an array before having finished building it. In other words, someone could falsely believe to have completely deleted an array, when part of it hasn’t even been added to the blockchain yet!
We are currently thinking of a good solution to this, which will involve some sort of locking mechanism for creating and deleting arrays. Using smart contracts for data storage is a controversial topic as some believe that it is too expensive and inefficient, and that smart contracts are designed for business logic only.
However, we will start by using smart contracts for both data storage and business logic, then evaluate how inefficient it actually is and think about alternatives in case the cost is too high. Additionally, keep in mind that once the data has been stored, it is free to retrieve it from the contract any time you like, so any data that only needs to be stored once won’t be an issue.
A large amount of time has also been spent on fixing issues with communication between the web3 JS object and the geth (go-ethereum) client that currently runs our local blockchain. Both technologies are still being worked on heavily by the open-source community, which means that there are still unresolved bugs.
One of them being that the geth client starts randomly returning empty strings when being sent too many transaction calls/sends. This hinders progress as most of our test cases rely on a functioning geth client, and fixing it is therefore a high priority. Another bug seems to involve the decoding function of web3. Click here to read more.
Working on the cutting edge of technology (well… blockchain technology) is exciting but means that we will keep running into these unresolved bugs. Patience and hard work is the key and we’ll keep you updated on the way.
iXledger, Co-founder & President US, Cristina Dolan, was joined by VariabL, Co-founder & COO, Simon Polrot, BigDataLondon, Founder, Emmanuel Marchal, Consul General of France in New York, Anne-Claire Legendre, CNRS Research Dir, Ricardo Perez Marco, Legolas Exchange, CEO & Founder, Federic Montagno, Eastmore Group, CIO, Elie Galam, and Tezos, Co-founder, Arthur Breitman, to discuss the future of Blockchain.
Follow our community and social media platforms to keep up to date with us. Join the discussions!