Return to search

Availability of Smart Contracts that Rely on External Data / Tillgänglighet av Smarta Kontrakt Beroende av Extern Data

Smart contracts are digital agreements stored and executed on a blockchain. With smart contracts, multiple parties can enter into an agreement whose correct execution is guaranteed by the underlying blockchain. However, there is no inherent way for smart contracts to access data APIs external to the blockchain they reside on, which is needed in order to expand their usefulness. This thesis investigates two approaches of feeding data to a smart contract on the Ethereum blockchain, with regard to the performance metrics gas cost, block delay, and network latency. The investigation is set in the context of train travel where the time of arrival of a train at its destination is retrieved to the smart contract. Receiving and aggregating submissions from varying numbers of passengers is compared to retrieving this data from the dedicated open API provided by Trafikverket using the Chainlink framework. Through experiments, involving issuing transactions and monitoring them, it was found that in the case of passenger submissions with aggregation the gas costs had a linear relationship to the amount of passengers submitting data. Compared to lower amounts, the block delay for passenger submissions started seeing an increase at 100 to 300 submissions whereas it was more or less constant for aggregations. Furthermore, there was no noticeable trend for increase in network delay with increase of submissions. Conclusively, with regard to all performance metrics, it was found that in all cases involving more than five passengers it was cheaper to use Chainlink to fetch data from Trafikverket.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:liu-169358
Date January 2020
CreatorsGuo, Tjelvar, Han Herzegh, Daniel
PublisherLinköpings universitet, Programvara och system, Linköpings universitet, Programvara och system
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0016 seconds