Saved in:
Bibliographic Details
Main Authors: Susik, Robert, Nowotniak, Robert
Format: Preprint
Published: 2022
Subjects:
Online Access:https://arxiv.org/abs/2207.14592
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929334923558912
author Susik, Robert
Nowotniak, Robert
author_facet Susik, Robert
Nowotniak, Robert
contents Blockchain received a vast amount of attention in recent years and is still growing. The second generation of blockchain, such as Ethereum, allows execution of almost any program in Ethereum Virtual Machine (EVM), making it a global protocol for distributed applications. The code deployment and each operation performed in EVM cost the network fee called gas, which price varies and can be significant. That is why code optimization and well-chosen algorithms are crucial in programming on the blockchain. This paper evaluates the gas usage of several exact pattern matching algorithms on the Ethereum Virtual Machine. We also propose an efficient implementation of the algorithms in the Solidity/YUL language. We evaluate the gas fees of all the algorithms for different parameters (such as pattern length, alphabet size, and text size). We show a significant gas fee and execution time reduction with up to 22-fold lower gas usage and 55-fold speed-up comparing to StringUtils (a popular Solidity string library).
format Preprint
id arxiv_https___arxiv_org_abs_2207_14592
institution arXiv
publishDate 2022
record_format arxiv
spellingShingle Pattern matching algorithms in Blockchain for network fees reduction
Susik, Robert
Nowotniak, Robert
Cryptography and Security
Distributed, Parallel, and Cluster Computing
Data Structures and Algorithms
68W32, 68M14
K.4.0; J.0
Blockchain received a vast amount of attention in recent years and is still growing. The second generation of blockchain, such as Ethereum, allows execution of almost any program in Ethereum Virtual Machine (EVM), making it a global protocol for distributed applications. The code deployment and each operation performed in EVM cost the network fee called gas, which price varies and can be significant. That is why code optimization and well-chosen algorithms are crucial in programming on the blockchain. This paper evaluates the gas usage of several exact pattern matching algorithms on the Ethereum Virtual Machine. We also propose an efficient implementation of the algorithms in the Solidity/YUL language. We evaluate the gas fees of all the algorithms for different parameters (such as pattern length, alphabet size, and text size). We show a significant gas fee and execution time reduction with up to 22-fold lower gas usage and 55-fold speed-up comparing to StringUtils (a popular Solidity string library).
title Pattern matching algorithms in Blockchain for network fees reduction
topic Cryptography and Security
Distributed, Parallel, and Cluster Computing
Data Structures and Algorithms
68W32, 68M14
K.4.0; J.0
url https://arxiv.org/abs/2207.14592