<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Towards Detecting Semantic Events on Blockchains</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Abhisha</forename><surname>Bhattacharyya</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">North Carolina State University</orgName>
								<address>
									<postCode>27695</postCode>
									<settlement>Raleigh</settlement>
									<region>NC</region>
									<country key="US">USA</country>
								</address>
							</affiliation>
						</author>
						<author role="corresp">
							<persName><forename type="first">Rahul</forename><surname>Iyer</surname></persName>
							<email>rahuliyer@ncsu.edu</email>
							<affiliation key="aff0">
								<orgName type="institution">North Carolina State University</orgName>
								<address>
									<postCode>27695</postCode>
									<settlement>Raleigh</settlement>
									<region>NC</region>
									<country key="US">USA</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Kemafor</forename><surname>Anyanwu</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">North Carolina State University</orgName>
								<address>
									<postCode>27695</postCode>
									<settlement>Raleigh</settlement>
									<region>NC</region>
									<country key="US">USA</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Towards Detecting Semantic Events on Blockchains</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">D9F1011AC82E33507156110D8F94B3B9</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-25T09:04+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Semantic Events</term>
					<term>Blockchains</term>
					<term>Declarative transactions</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Blockchains maintain information about transactions creating and transferring digital assets. "Smart contracts" which are arbitrary, immutable code executable on a blockchain, can be used to implement complex business rules that govern transactional behavior as well as raise events which external applications can be notified about. However, the arbitrary and imperative nature of smart contracts and the events they raise, make their discoverability and reuse challenging. Further, events represented merely as function signatures limit the ability for more complex, semantic event detection which require richer representations such as semantic rules. In this paper, we motivate and describe our efforts towards support for semantic event detection on blockchains that are founded on (i.) a declarative, semantic data, transaction and event model and (ii.) an integrated blockchain-streaming application execution architecture. We overview our selected implementation strategy that builds on the BigChainDB blockchain engine and Apache Kafka, a large-scale streaming platform.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Blockchains typically maintain information about transactions that create or transfer ownership of digital assets. To enable business applications with complex business logic for governing such transactions, the concept of "smart contracts" was introduced by blockchain platforms like <ref type="bibr">Ethereum [3]</ref> and HyperLedger <ref type="bibr">[1]</ref>. Smart contracts, which are arbitrary, immutable code executed on blockchains are also able to raise events which external applications can consume. Until very recently, limited interaction models were permitted with respect to events e.g. smart contracts cannot detect events raised by other smart contracts since they cannot read directly from the blockchain. Fortunately, a recent Ethereum extension Eventeum <ref type="bibr">[2]</ref> now provides a connection between smart contracts and middleware layer via a message bus containing details of the event emitted. However, there are still major limitations with the state-of-the art in smart contracts and blockchain event models as illustrated using the following example.</p><p>Imagine a digital service marketplace that allows consumers to request for bids for specific services and service providers to offer service bids. This scenario can be useful in domains such as Manufacturing that are increasingly becoming more Cloud-oriented. In large-scale or bespoke manufacturing for example, it is common to need to outsource the manufacturing of some components. However, in high-capital domains, a significant degree of confidence and trust in capabilities and capacities of service providers is required by the service requestor. Some ideas on using the blockchain for maintaining historical records of bids, their fulfillment, performance, etc to be leveraged for mediating automatic agreements, has been proposed in <ref type="bibr">[5]</ref>. These ideas have been explored using Ethereum smart contracts resulting in the following lessons learned:</p><p>Lack of Reusability: Each request-for-bid -rfb (and similarly bid) is a non-traditional blockchain transaction which would need to be implemented as a separate smart contract, even when rfbs have similarities or overlapping behavior. This is because program reuse is more challenging with imperative representations given that semantics is implicit in program behavior. The immutability of smart contracts also implies that if business conditions evolve even slightly, modifying the smart contract to capture new business logic is a major challenge. Discoverability: In our example, a service provider would need to be aware of the existence of a smart contract requesting for a bid on services that they provide. This requires either (i.) some standardized token contract interfaces for representing specific protocols (analogous to ERC20/721) or (ii.) some registry of smart contracts indexed by standardized metadata. However, it is unlikely that a fixed set of function interfaces that comprise a token will be general enough to capture such protocols, given the variability in possible request and bid requirements (unless perhaps organized into very narrow vertical segments). Another approach that can be used to discover requests is via the events raised by smart contracts. Such events may be routed through a publish/subscribe platform like Apache Kafka (such as is done by Eventeum). However, subscribing to events requires apriori knowledge of event definition. Unfortunately, each smart contract raises events using a function signature of its choosing. Consequently, the same event could be represented using different signatures which cannot all be known apriori. Secondly, how to map such events into an appropriate publishsubscribe event detection model is unclear. This is because the semantics of an event may be implicit and complex. For example, a request for bid transaction that has parameters Material as "PolyCarbonate" and Quantity as "10" can be mapped to "3D Printing" event. Such terms and relationships would need to be captured in an ontology and semantic rule engine.</p><p>Our preliminary investigation leads us to the conclusion that there are two key requirements needed to enable detection of semantic events on blockchains: (i.) The use of a declarative and semantic data, transaction and event model that allows new transaction (e.g. bids) and event classes to be introduced in a straightforward manner. The semantic-awareness requirement allows reasoning about semantic relationships between transaction and event types. (ii.) A processing architecture that integrates blockchains with a semantic rule engine</p></div>		</body>
		<back>
			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>and publish and subscribe mechanisms, enabling detection of complex semantic events. We are currently developing these ideas in the context of a project called SmartChainDB. SmartChainDB extends a blockchain platform <ref type="bibr">BigChainDB [4]</ref> that has a semi-structured data model, enable significant flexibility in extensibility.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>References</head><p>1 </p></div>			</div>
			<div type="references">

				<listBibl/>
			</div>
		</back>
	</text>
</TEI>
