The present application claims the benefit under 35 U.S.C. § 119 of German Patent Application No. DE 102020212330.6 filed on Sep. 30, 2020, which is expressly incorporated herein by reference in its entirety.
The present invention relates to a method for operating a decentralized application by users of a blockchain. The present invention also relates to a corresponding device, to a corresponding computer program as well as to a corresponding memory medium.
Any protocol in computer networks that initiates a consensus with respect to the sequence of particular transactions is referred to as a decentralized transaction system, a transaction database or a distributed ledger. One common form of such a system is based on a blockchain and forms the basis of numerous so-called cryptocurrencies.
The consensus method most frequently used according to the related art provides a proof of work (PoW) for the generation of new valid blocks. In order to counteract excessive energy consumption caused by producing such proofs, and an unnecessary expansion of the blockchain, so-called transaction channels or state channels have been provided and generalized, which connect individual users off the blockchain (off-chain) but are nevertheless anchored in the latter. An overview of this technology is provided by COLEMAN, Jeff, HORNE, Liam, XUANJI, Li, “Counterfactual: Generalized state channels,” 2018.
German Patent Application No. DE 102018210224 A1 describes in a specific embodiment according to claim 6 the following method for agreeing to a collaboration between two systems. The first system sends its assumptions with respect to the second system and its guarantees granted to the second system; conversely, the second system sends its assumptions with respect to the first system and guarantees granted to it. A transaction database receives these mutual assumptions and guarantees, checks whether they correspond to one another, if necessary, draws up a digital security contract to be concluded between the systems and, finally, documents the security contract by adding a corresponding block to a blockchain. It then sends the block with the security contract to both systems, which start the collaboration once they receive the block. The systems establish a mutual transaction channel for this purpose on which they exchange pieces of information and signed messages after the block is received. If one of the systems receives a piece of information violating the security contract, it asks the transaction database for arbitration. The transaction database notifies the other system of the arbitration, requests from the other system the information—allegedly violating the security contract—and checks the latter based on the security contract.
Such intelligent contracts (smart contracts) embody the transactional logic of every distributed application (dApp) of a transaction database. German Patent Application No. DE 102017214902 A1, for example, describes an intelligent contract for preparing and/or executing transactions between an owner of a terminal and a service provider, the intelligent contract including conditions of the service provider for services of an information service provider, in particular, conditions regarding utilization fees, preferably a road toll, and/or for services of a service provider, in particular, conditions regarding license fees, preferably regarding parking fees, refueling fees, fees of a charging station for the terminal and/or conditions of an insurance and/or conditions regarding user fees, preferably regarding fees for the shared use of the terminal for providing and/or aborting a service and/or conditions defined by the owner of this terminal for an acceptance and/or termination of the service, the intelligent contract being executed in an authorization node of a computer network based on a blockchain.
The present invention provides a method for operating a decentralized application by users of a blockchain, a corresponding device, a corresponding computer program as well as a corresponding memory medium.
A method according to an example embodiment of the present invention is based in this case on the finding that in conventional state channel structures there is usually no time concept available in the off-chain phase. However, a time concept is also advantageous or even necessary even in the off-chain phase of a corresponding protocol.
This limitation is overcome by the approaches discussed in detail below, in accordance with example embodiments of the present invention. In summary, use is made of the fact that the underlying blockchain specifies via the block number or block depth an indirect but stringent time concept and furthermore even offers numerous distributed transaction systems possibly less, but nevertheless sufficiently secure, access to an essentially differentiated time concept such as, for example, the service “now( )” in Ethereum. The features described below make use of precisely this time concept and derive therefrom a time concept for the off-chain phase of channel constructs, which is based on a single or even on multiple flexibly usable time frames for the following timing cases, which may occur individually or in connection with one another:
Both applications are in turn suitable for two scheduling approaches:
Advantageous refinements of and improvements on the basic features of the present invention are possible with the measures disclosed herein.
Exemplary embodiments of the present invention are represented in the figures and explained in greater detail in the following description.
The case with strict interval clocking is initially considered.
The state provides individual substeps of duration Δi or a shared value for all steps of the protocol. For the sake of simplicity, the latter case is discussed here, a generalization is easily possible.
In first step (1) as depicted, first user A proposes a state change mA (referred to hereinafter consistently as “move,” according to game theory), the user shifting tuntilNext in conformance with the rules by predefined time difference Δ into the future, which may be checked by the program logic of the dApp—whether off-chain by other users or by the blockchain itself functioning as a virtual arbitrator:
tuntilNext=tuntilNext,i+Δ Formula 1
If a confirmation by second user I on the state channel does not occur 2, A uploads move mA 3 and prompts I by way of a challenge to confirm within the “Challenge period,” i.e., within a predefined time span 6 on the blockchain. If I fails even there to promptly reply on the move—as is usual in corresponding arbitrations on blockchains—the state change is adopted by the blockchain, and A may close the channel.
In the present example, user I replies either—with no progression of the dApp program logic or state change—by countersigning of mA 4a and accepts in this way the latest possible point in time tuntilNext,i+1 for its countermove 5a, or it complies with the request by immediately carrying out a countermove mI and updating in the process:
tuntilNext=max(tnow,tuntilNext,i+1)+Δ Formula 2
The function max covers the case in which the I exceeds value Δ of time span 6 granted within the scope of the request, as a result of which a reply after point in time tuntilNext, i+1 is considered. In this case, the strict interval clocking, which would otherwise be continued with tuntilNext,i+2 is to be shifted accordingly in order to grant the next user the agreed upon time difference Δ. In order to avoid any deviation from the time frame provided, time span 6 would therefore have to be selected to be equal to or shorter than A.
After step 4b and 5a, initial situation 1 with reversed roles of A and I is achieved, and the protocol may progress accordingly.
As a general rule, user I making its move responds promptly and thus prevents the challenge and reply on the block chain (on chain).
In sequence-based protocols such as “forceMove,” steps 4a and 4b would refer to an uneven move number j if A is the first channel user. If, however, the concept of the flexibly supported states is applied, in which an actor following in the sequence is able to propose a state for the then valid move number, and all other users sign this state, then the proposed combination of steps 4a and 5a would be possible. In this case, I carries out move mI under number j+2. If A delivers its signature, the protocol is continued. If not, I would prompt user A to do so while referring to the supported state. If the blockchain in this case decides in favor of A without the latter, however, adopting proposed state change m1 in the dApp, it would again be I's turn thereafter and I could again propose and finally implement this state.
If the application progression on the channel may be suspended for a definite or indefinite period of time, that user whose turn it was prior to the suspension may note this in the state memory. For a limited period of the interruption, tuntilNext could be updated accordingly. Various approaches are possible for an indefinite period of time. Thus, for example, tuntilNext could be set to a defined value such as zero. Alternatively, an additional data field could be used, for example, a Boolean variable tsuspended, which reflects the state of the suspension.
Furthermore, the techniques described in accordance with example embodiments of the present invention, in addition to the establishment of a time frame within which the next move must take place, may also be used to establish a time frame, which the users could exhaust without being penalized or being compelled—for example, by a challenge—to carry out their move. This may be implemented, for example, by not allowing the challenge prior to an agreed upon point in time. Both methods may also be used simultaneously, i.e., establishment of time intervals, which may be exhausted while simultaneously limiting the maximum duration. The advantage of this approach and of the use of different time intervals Δi is that it is left to the channel users to agree in detail about the time specifications on a channel off the block chain, for example, per move, per round or as a function of the dApp state.
When utilizing a channel protocol such as “perun,” which provides no prescribed sequence, the time specifications may be easily implemented in the manner discussed above. In summary, each user has the opportunity to propose time limitations by the user setting the corresponding data fields, and the other users may either agree or be compelled to answer in an arbitrary order.
An extension of the strict clocking is described below in order to enable a preferably rapid application progression in the channel construct. In this case, only differences are discussed; the basics described above apply here as well. Initially to be discussed is the path depicted in
The basis of this expansion is formed by the use of two additional data fields: a preferred point in time tuNo to be maintained in the best case and an optional time buffer δ. For a quickest possible sequence, user A making the move updates in step 1 not only tuntilNext as usual, but also proposes on the basis of the instantaneous time a preferred point in time that would have to be maintained under optimistic assumptions:
tuNo=tnow+Δ+δ Formula 3
The basic idea in this case is that the user making the move, if he is unable or would not like to completely exhaust time difference Δ, may propose shifting the reference for the time boxing in accordance with the time saved. An additional shorter time period δ may be agreed to by the users in order to compensate for usual delays, for example, due to communication difficulties, so that the receivers of the proposal are able to receive the proposal in the best case prior to point in time tnow+δ and to utilize time difference Δ completely for their own move. In one alternative embodiment of the method, δ may be disregarded and any delay of communication within the scope of Δ may be considered.
In the scenario according to
The protocol is then continued with reversed roles or—in the case of further channel users—between I and the user subordinate in the move sequence.
tuntilNext,i+2=tuNo,i+1+Δ Formula 4
As in the case of the strict interval clocking, both paths may alternate even with the quickest possible approach, so that the users may force as needed a move with minimal adverse effect on the blockchain and may then change back again to the sequence outside the chain. It should be emphasized once again that to simplify the above embodiments, a value Δ has been set across all steps. In the meantime, the users may communicate in one generalized specific embodiment in a variety of values Δ as a function of the type of move, dApp state, etc.; equally possible—as represented above—is the combination including a minimum time period, which the users may exhaust without being penalized or being forced to carry out their move.
This method may, for example, be implemented in software or in hardware or in a mixed form of software and hardware, for example, in a control unit 20, as illustrated by the schematic representation of
Number | Date | Country | Kind |
---|---|---|---|
102020212330.6 | Sep 2020 | DE | national |
Number | Name | Date | Kind |
---|---|---|---|
20170236123 | Ali | Aug 2017 | A1 |
20180123882 | Anderson | May 2018 | A1 |
20190102163 | Witherspoon | Apr 2019 | A1 |
20190253239 | Shao | Aug 2019 | A1 |
20190332702 | Manamohan | Oct 2019 | A1 |
20200193434 | Ma | Jun 2020 | A1 |
20200286049 | Basu | Sep 2020 | A1 |
Number | Date | Country |
---|---|---|
102017214902 | Feb 2019 | DE |
102018210224 | Dec 2019 | DE |
Entry |
---|
Coleman et al., “Counterfactual: Generalized State Channels,” 2018, pp. 1-48. <https://l4.ventures/papers/statechannels.pdf> Downloaded Sep. 3, 2021. |
Number | Date | Country | |
---|---|---|---|
20220100735 A1 | Mar 2022 | US |