-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem statement
Analysis and simulation has highlighted that Linear Leios has some fairly stringent constraints on CPU usage. Previous simulation work has demonstrated the feasibility of (1) the "happy path" for Plutus and non-Plutus workloads and (2) resilience to attacks involving late release of transactions and/or EBs. However, these conclusion are based on several assumptions that may require further investigation:
- The Rust simulator faithfully represents and sequences the CPU operations and threading that would occur on the a node under a wide variety of conditions (happy path, heavy Plutus, attacks, etc.).
- The Rust simulator does not model the ledger or UTxO set.
- The Rust simulator does not model updates to the memory pool in detail.
- The Rust simulator may be overly optimistic in that it is performing operations before sufficient information is available (e.g., conflicting txs might be applied on different threads in parallel even though that couldn't occur in a real node).
- The CPU costs of
ApplyandReapplythat were derived from measuring Cardano mainnet withdb-analyserare accurate enough for use in modeling Leios. - We already know that these data are extremely noisy.- We don't have sufficient evidence that that Plutus cost model corresponds directly and linearly to CPU usage.
- It is likely that the existing ledger state, the size of ledger's active UTxO set, and the number of transaction inputs/outputs strongly affect the ledger-update time.
- A unified memory pool is possible even though transactions with size or Plutus that exceeds the RB limits would have to appear in an EB.
- An "oversize" transaction (required to be in an EB) might have to be re-applied whenever a smaller transaction (suitable for an RB) is inserted before it in the memory pool.
- At the very least, a sophisticated data structure or index would be needed for the memory pool, and that might incur extra CPU cost.
Proposed tasks
- Carefully review the existing
ApplyandReapplyoperations incardano-nodeand other implementations in order to assess . . .- how much Leios will affect these, and
- what opportunities for parallelism, caching, memorization, etc. are feasible for Leios.
- Revisit the
db-analysertool and data set.- Alter
db-analyserto provide finer-grained output of measured ledger-update and transaction-validation operations. - Study the relationships between Plutus units and actual CPU usage, in the context of the complexity of the script context.
- Study the relationship between the size of the ledger's active UTxO set and the
Reapplytime. - Study the relationship between the number of a transactions inputs/outputs and the
Reapplytime.
- Alter
- Consider upgrading the Rust simulator and/or the Haskell prototype to more faithfully model of CPU usage.
- Run both optimistic vs pessimistic simulations of application and re-application of transactions to ledger.
- Develop a fine-grained mathematical model for constraints on sequencing CPU-intensive operations.
- Prove that RB production/liveness will not be affected by CPU bottlenecks.
- Quantify how much throughput can be reduced by CPU bottlenecks.
- Apply the model to attacks aimed at overwhelming a node's CPUs (or forcing it into single-threaded operation) by triggering highly concentrated
Apply/Reapplyoperations just prior to voting, block production, etc.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Todo