Challenges
A1. Create a blockchain network with an interface supporting transaction timing constraints and flexible block generation for accommodating more transactions within a single block time.
- There is no interface to express and utilize the deadline of each transaction.
(gas is not an answer.) - Make nodes can send each transaction to put as input the expected deadline of the transaction
- Increasing the rate of generating blocks itself cannot guarantee timely execution and incurs space inefficiency. (idle blocks can be accumulated.)
- Extend the target network to provide the flexibility of making zero to multiple blocks at a single block time.
A2. Develop novel scheduling principles specialized for the blockchain network so as to guarantee the timely execution of periodic/sporadic transactions without wasting the blockchain network resources.
- The timeline of the transaction request of a transaction-generating node is different from that of a block-generating node.
- Translate a periodic/sporadic request of a transaction-generating node, into a periodic/sporadic arrival on a block-generating node.
- Derive a condition of the modeled transaction load.
- Each transaction cannot be split to be included in more than one block.
- Develop a lazy deadline-based scheduling policy and its condition
Contributions
- We raise and address two issues to achieve timing guarantees for blockchain transactions, which is the first attempt.
- We modify the existing blockchain network enabling deadline-based transaction selection and extend it to provide the flexibility of the number of generated blocks at a single block time.
- We develop novel scheduling principles that can guarantee the timely execution of periodic/sporadic transactions, which is the first achievement.
- We develop advanced scheduling methodologies that reduce the number of generated blocks without compromising timing guarantees of transactions.
- We implement the proposed network architecture and scheduling principles in a real blockchain, and evaluate their performance.
RT-Blockchain

- A single block is generated and connected to the main blockchain
at regular intervals (slots)
- Each of whose duration is same and called block time (BT)
- All transactions entering the system are stored in the transaction pool, and they are ordered based on their respective deadlines, with the earliest deadline transactions given priority.
RT-Blockchain: Node's POV
Block Generation Time
- Select node to create the block.
- The selected block-generating node stops accepting additional
transactions into its pool.
- Starts selecting transactions to be included and then including them in the block.
- Also calculates block hash for ensuring the integrity and sequential order of the blocks in the blockchain.
Block Validation Time
- Validators independently validate the transactions and verify the
block hash.
- This process, starting from when the block is distributed to when
it is added to the main chain, is defined as block validation time.
RT-Blockchain: User's POV
Block Generation Time
- The duration from the sender to the pool, representing the transaction's time within the network, is referred to as
traffic time (≤tft)
- ts(SLj) denote the time instant at which SLj starts.
transaction schedule time: A block is filled with scheduled transactions (≤tst)
- Hash calculation time (≤hct)
- Block generation time ≤Cgen=tst+hct
Block Validation Time
- The generated block is distributed throughout the network and reaches the local machines of each validator (≤tft)
- The validating nodes run hash calculations on the given block to
check the validity(≤hct)
- Cval=tft+hct
- User’s transaction request can finish its execution no later than ts(SLj)+Cgen+Cval
Timely Transactions on RT-Blockchain
Definition 1.
A periodic/sporadic user-level blockchain transaction task ηi∈η > (Ti,Di,Si), Ti: the inter-arrival time, Di: the relative deadline, Si: the maximum transaction size.
A user-level blockchain transaction task ηi(Ti,Di,Si) generates a series of transaction jobs, the xth of which is denoted by ηi,x.
The release times of ηi’s two consecutive jobs ηi,x and ηi,x+1 are separated by at least Ti
Once a job ηi,x is released at t, its transaction whose size is at most Si should be completed no later than t+Di
Definition 2.
A periodic/sporadic user-level blockchain transaction task set η is said to be schedulable, if there is no single job deadline miss for every legal job series generated by η.
Now we can state our goal as follows.
Problem Statement:
We develop a deadline-based scheduling algorithm and a schedulability condition for η, which is scheduled by the scheduling algorithm on a RT-blockchain system, such that
G1. η is schedulable if η satisfies the schedulability condition (achieving timing guarantees).
Achieving G1 in the problem statement is totally different from the case for the traditional real-time periodic/sporadic task set τ executed on a computing platform due to the following challenges:
- The timeline of each user’s transaction request is different from that of block generation.
- Each transaction cannot be split to be included in more than one block, which may yield an arbitrarily small utilization of each block under priority-based approaches.
To address C1 first, we need to interpret the release time and the absolute deadline of each user’s transaction job, from the block-generating node’s point of view.
User-level to Slot-level Translation
Definition 3.
A periodic/sporadic slot-level blockchain transaction task ηiS∈ηS
ηiS(TiS,DiS,SiS,NiS)
- TiS: the inter-arrival slots
- DiS: the slot-unit relative deadline
- SiS: the maximum transaction size
- NiS: the number of transactions of each job of ηiS
The ready-to-be-scheduled time instant for ηi,xS is ts(SLj).
Once a job ηi,xS is ready-to-be-scheduled at ts(SLj), there are NiS transactions whose size is at most SiS.
Each of them should be included in any block of SLj , SLj+1, ..., or SLj+DiS−1,

Definition 4.
A periodic/sporadic slot-level blockchain transaction task set ηS is said to 1be schedulable, if there is no single job deadline miss for every legal job series generated by ηS.
We can translate η to ηS, without compromising timing constraints of every ηi∈η.
We should consider two cases:
- (Ti−tft)≥BT
- (Ti−tft)<BT
Theorem 1
The schedulability of a periodic/sporadic user-level blockchain transaction task set η is schedulable on a RT-blockchain system, if its corresponding periodic/sporadic slot-level blockchain transaction task set ηS is schedulable, where parameters of each ηiS∈ηS is set as follows.
DiSSiSIf Ti−tft≥BT,TiSIf Ti−tft<BT,TiS=⌊BTDi−tft−Cgen−Cval⌋,=Si,=⌊BTTi−tft⌋, and NiS=1,=1, and NiS=⌈TiBT+tft⌉.(1)(2)(3)(4)
Proof for DiS
The worst case is a job of ηi in block-generating node right after tS(SLj).
If its absolute deadline is no earlier than ts(SLj+1)+Cgen+Cval, it does not miss the deadline.
It's equivalent to Di−BT−tft−Cgen−Cval≥0.
Therefore, DiS is not smaller than ⌊BTDi−BT−tft−Cgen−Cval⌋+1. which is equivalant to Eq. (1).
Timing Guarantees for RT-Blockchain
Now we can translate the G1 to G1S
Problem Statement:
We develop a deadline-based scheduling algorithm and a schedulability condition for ηS, which is scheduled by the scheduling algorithm on a RT-blockchain system, such that
G1S. ηS is schedulable if ηS satisfies the schedulability condition (achieving timing guarantees).
Apply EDFWC (Work-Conserving Earliest Deadline First) for a RT-blockchain system as follows:
Algorithm of EDFWC for ηS with a single block
- At every beginning of each slot, sort all transactions in the waiting queue by their absolute slot-unit deadlines.
- Then, assign each sorted transaction to the block one by one, until the highest-priority unassigned transaction in the waiting queue cannot be assigned due to the remaining portion of the block is smaller than the size of the highest-priority unassigned transaction.
Definition 5.
Let DBF(ηiS,q) denote the demand bound function for a slot-level blockchain transition task ηiS∈ηS during q consecutive slots (where q=1,2,…,3), defined by
DBF(ηiS,q)=max(0,(⌊TiSq−DiS⌋+1)⋅BSSiS⋅NiS)(5)
Definition 6.
Let LOAD(ηS) denote the maximum of the sum of all DBF(ηiS,q) for ηiS∈ηi divided by the number of consecutive slots q, which is defined by
LOAD(ηS)=q=1,2,3,…maxq∑ηiS∈ηSDBF(ηiS,q)(6)
One may think that LOAD(ηS)≤1.0 could be schedulability condition for ηS.
However, this is wrong due to C2: Each transaction cannot be split to be included in more than one block.
Theorem 2
A set of periodic/sporadic slot-level blockchain transaction tasks ηS is schedulable by EDFWC on a RT-blockchain system, if the following condition holds.
LOAD(ηS)≤1.0−ηi∈ηSmaxBSSiS(7)
Proof
-
First, we prove the statement: if the sum of the size of transactions in the waiting queue is larger than BS⋅(1.0−maxηi∈ηSBSSiS), the block can include a set of transaction whose size summation is at least BS⋅(1.0−maxηi∈ηSBSSiS).
-
Suppose that the statement is wrong, then there exists a job that cannot be included in the block.
-
But the block has at least BS⋅maxηi∈ηSBSSiS amount remaining space.
-
This violates the Work-conserving
- Second, suppose that there exists a deadline miss of transaction of ηi,x at the nth slot.
- Let n0(≤n) is the largest index of the slot, such that
- BS⋅(1.0−maxηi∈ηSBSSiS) is strictly larger than the sum of the size of transactions whose slot-unit absolute deadline is no later than that of the transaction ηi,x in the block of (n0−1)th slot.
- BS⋅(1.0−maxηi∈ηSBSSiS) is no larger than that in the block of n0th slot.
The first property implies that there is no job whose release slot index is n0−1 or smaller, but is not included in any block until the beginning of the n0th slot.
Therefore, BS⋅∑ηi∈ηSDBF(ηi,n−n0+1) is the largest possible sum of the size of transactions whose slot-unit absolute deadline is no later than that of ηi,x.
Also, by definition, (n−n0+1)⋅BS⋅(1.0−maxηi∈ηSBSSiS) is a lower bound of the sum of the size of transactions whose slot-unit absolute deadline is no later than that of ηi,x.
This contradicts Eq. (7).
Design of Multi-Block RT-Blockchain
We design an architecture that generates multiple blocks per block time to enhance the scalability of the blockchain system while preventing the generation of empty blocks.
: multi-block RT-blockchain
Unlike traditional blockchain systems, our architecture allows the block-generating node to determine the number of blocks to generate during each block time based on the transactions in the pool.
- m: a predefined threshold of the maximum number of generating blocks in each slot.
Design of Multi-Block RT-Blockchain

- The node generating the block first calculates how many blocks will be needed to fit the transaction in the pool
- the node stores transactions sequentially in each block while keeping the bound
We assume that tst′≤m⋅tst, implying block generation time for a m-block RT-blockchain is upper-bounded by tst′+m⋅hst≤m⋅(tst+hct)=m⋅Cgen.
Also, block validation time is upper-bounded by m⋅Cval=m⋅(tft+hct).
Therefore, any transaction included in one of the m blocks at the jth slot is finished no later than ts(SLj)+m⋅Cgen+m⋅Cval
Timing Guarantees for Multi-Block RT-Blockchain
Theorem 3
The schedulability of a periodic/sporadic user-level block-chain transaction task set ηS is schedulable on a m-block blockchain system,
If its corresponding periodic/sporadic slot-level block-chain transaction task set ηS is schedulable, where DiS of each ηiS is set to Eq. (8) and other parameters are set to Eqs. (2), (3) and (4) in Theorem 1.
DiS=⌊BTDi−tft−m⋅Cgen−m⋅Cval⌋(8)
When it comes to the scheduling algorithm, we also apply EDFWC, generalized for m blocks (instead of a single block) to be supplied.
Algorithm of EDFWC for ηS with m blocks
- At every beginning of each slot (i.e., tS(SLj)), sort all transactions in the waiting queue by their absolute slot-unit deadlines.
- Then, assign each sorted transaction to one of the m blocks one by one using the first-fit policy, until the highest-priority unassigned transaction in the waiting queue cannot be assigned to any of the m blocks
Theorem 4
A set of periodic/sporadic slot-level blockchain transaction tasks ηS is schedulable by EDFWC on a m-block blockchain system, if the following condition holds
LOAD(ηS)≤LOAD∗(ηS)(9)
whereLOAD∗(ηS)=m⋅(1.0−ηi∈ηSmaxBSSiS)(10)
But if (1.0−maxηi∈ηSBSSiS) is small, Theorem 4 is pessimistic.
We can improve this as follows.
Theorem 5
A set of periodic/sporadic slot-level blockchain transaction tasks ηS is schedulable by EDFWC on a m-block blockchain system, if the following condition holds
LOAD(ηS)≤LOAD∗∗(ηS)(11)
whereLOAD∗∗(ηS)=max(21,1.0−ηi∈ηSmaxBSSiS)⋅(m−1)+(1.0−ηi∈ηSmaxBSSiS)(12)
Proof
We only need to prove the case for (1.0−maxηi∈ηSBSSiS)<0.5.
If the sum of the size of transactions in the waiting queue is larger than BS⋅LOAD∗∗(ηS), the block can include a set of transactions whose size summation is at least BS⋅LOAD∗∗(ηS) without violating the priority of transactions
Suppose that there are at least two blocks, each of which is occupied no larger than 50%,
Then, it immediately contradicts the first-fit policy in EDFWC.
Therefore, there is at most one block that is occupied no larger than 50%.
Since no schedular can make ηS schedulable if LOAD(ηS)>m, the resource augmentation bound(?) is
21⋅m+21−ηi∈ηSmaxBSSiSm
which converges to 2.
Resource Efficiency with Timing Guarantees.
G2S. The number of generated blocks is minimized.
We develop a lazy algorithm called EDFLazy(r) as follows, where r is a positive rational number less than m.
Algorithm of EDFLazy(r) for ηS with m blocks
- At every beginning of each slot (i.e., tS(SLj)), sort all transactions in the waiting queue by their absolute slot-unit deadlines.
- Then, assign each sorted transaction to one of the m blocks one by one using the first-fit policy, until the sum of BSSiS for all assigned transactions is no smaller than r.
- Let m′ denote the number of blocks occupied by at least one transaction so far.
- We apply EDFWC for the remaining unassigned transactions as if we have only the m′ blocks instead of m
Theorem 6.
A set of periodic/sporadic slot-level blockchain transaction tasks ηS is schedulable by EDFLazy(LOAD(ηS)) on a m-block blockchain system, if Eq. (13) holds.
LOAD(ηS)≤LOAD∗∗(ηS)(13)
Proof
If the sum of the size of transactions in the waiting queue is larger than BS⋅LOAD(ηS), the block can include a set of transactions whose size summation is at least BS⋅LOAD(ηS) without violating the priority of transactions.
The operation of EDFLazy(LOAD(ηS)) is exactly the same as that of EDFWC until the m or smaller blocks include a set of earliest-deadline transactions whose size summation is barely no smaller than BS⋅LOAD(ηS), the remaining proof is similar to that of Theorem 5.
Implementation
- Turtlecoin, a commercially available and highly extensible blockchain platform.
- PoS (Proof of Stake) Consensus Mechanism
- BT = 12s, BS = 100KB
- 66% of validators should include the block in their main chain.