@xyo-network/xl1-protocol 1.3.8 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -21
- package/dist/neutral/index.mjs +216 -101
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/index.mjs +225 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/types/Addressable.d.ts +5 -0
- package/dist/types/Addressable.d.ts.map +1 -0
- package/dist/types/ChainIterator.d.ts +29 -0
- package/dist/types/ChainIterator.d.ts.map +1 -0
- package/dist/types/ChainIteratorEventData.d.ts +11 -0
- package/dist/types/ChainIteratorEventData.d.ts.map +1 -0
- package/dist/types/OpenTelemetryProviders.d.ts +6 -0
- package/dist/types/OpenTelemetryProviders.d.ts.map +1 -0
- package/dist/types/chain/ChainServiceCollection.d.ts +35 -0
- package/dist/types/chain/ChainServiceCollection.d.ts.map +1 -0
- package/dist/types/chain/Initializable.d.ts +3 -0
- package/dist/types/chain/Initializable.d.ts.map +1 -0
- package/dist/types/chain/index.d.ts +3 -0
- package/dist/types/chain/index.d.ts.map +1 -0
- package/dist/types/ethereum.d.ts +11 -0
- package/dist/types/ethereum.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/instances/BoundWitness.d.ts +9 -0
- package/dist/types/instances/BoundWitness.d.ts.map +1 -0
- package/dist/types/instances/Data.d.ts +4 -0
- package/dist/types/instances/Data.d.ts.map +1 -0
- package/dist/types/instances/Fees.d.ts +8 -0
- package/dist/types/instances/Fees.d.ts.map +1 -0
- package/dist/types/instances/HydratedBoundWitness.d.ts +10 -0
- package/dist/types/instances/HydratedBoundWitness.d.ts.map +1 -0
- package/dist/types/instances/Object.d.ts +5 -0
- package/dist/types/instances/Object.d.ts.map +1 -0
- package/dist/types/instances/Payload.d.ts +6 -0
- package/dist/types/instances/Payload.d.ts.map +1 -0
- package/dist/types/instances/Signature.d.ts +8 -0
- package/dist/types/instances/Signature.d.ts.map +1 -0
- package/dist/types/instances/block/BlockFields.d.ts +9 -0
- package/dist/types/instances/block/BlockFields.d.ts.map +1 -0
- package/dist/types/instances/block/HydratedBlock.d.ts +8 -0
- package/dist/types/instances/block/HydratedBlock.d.ts.map +1 -0
- package/dist/types/instances/block/SignedHydratedBlock.d.ts +6 -0
- package/dist/types/instances/block/SignedHydratedBlock.d.ts.map +1 -0
- package/dist/types/instances/block/index.d.ts +3 -0
- package/dist/types/instances/block/index.d.ts.map +1 -0
- package/dist/types/instances/index.d.ts +10 -0
- package/dist/types/instances/index.d.ts.map +1 -0
- package/dist/types/instances/modifiers/Signed.d.ts +7 -0
- package/dist/types/instances/modifiers/Signed.d.ts.map +1 -0
- package/dist/types/instances/modifiers/Validatable.d.ts +5 -0
- package/dist/types/instances/modifiers/Validatable.d.ts.map +1 -0
- package/dist/types/instances/modifiers/index.d.ts +3 -0
- package/dist/types/instances/modifiers/index.d.ts.map +1 -0
- package/dist/types/instances/transaction/HydratedTransaction.d.ts +6 -0
- package/dist/types/instances/transaction/HydratedTransaction.d.ts.map +1 -0
- package/dist/types/instances/transaction/SignedHydratedTransaction.d.ts +6 -0
- package/dist/types/instances/transaction/SignedHydratedTransaction.d.ts.map +1 -0
- package/dist/types/instances/transaction/TransactionFields.d.ts +9 -0
- package/dist/types/instances/transaction/TransactionFields.d.ts.map +1 -0
- package/dist/types/instances/transaction/index.d.ts +3 -0
- package/dist/types/instances/transaction/index.d.ts.map +1 -0
- package/dist/types/payload/elevatable/ChainStakeIntent.d.ts +17 -0
- package/dist/types/payload/elevatable/ChainStakeIntent.d.ts.map +1 -0
- package/dist/types/payload/elevatable/Executable.d.ts +14 -0
- package/dist/types/payload/elevatable/Executable.d.ts.map +1 -0
- package/dist/types/payload/elevatable/Hash.d.ts +19 -0
- package/dist/types/payload/elevatable/Hash.d.ts.map +1 -0
- package/dist/types/payload/elevatable/TransferPayload.d.ts +17 -0
- package/dist/types/payload/elevatable/TransferPayload.d.ts.map +1 -0
- package/dist/types/payload/elevatable/index.d.ts +5 -0
- package/dist/types/payload/elevatable/index.d.ts.map +1 -0
- package/dist/types/payload/index.d.ts +2 -0
- package/dist/types/payload/index.d.ts.map +1 -0
- package/dist/types/protocol/AllowedBlockPayload.d.ts +11 -0
- package/dist/types/protocol/AllowedBlockPayload.d.ts.map +1 -0
- package/dist/types/protocol/BlockBoundWitness.d.ts +34 -0
- package/dist/types/protocol/BlockBoundWitness.d.ts.map +1 -0
- package/dist/types/protocol/BlockDuration.d.ts +23 -0
- package/dist/types/protocol/BlockDuration.d.ts.map +1 -0
- package/dist/types/protocol/BlockNumber.d.ts +37 -0
- package/dist/types/protocol/BlockNumber.d.ts.map +1 -0
- package/dist/types/protocol/ChainAnalyzer.d.ts +9 -0
- package/dist/types/protocol/ChainAnalyzer.d.ts.map +1 -0
- package/dist/types/protocol/ChainReference.d.ts +11 -0
- package/dist/types/protocol/ChainReference.d.ts.map +1 -0
- package/dist/types/protocol/HydratedBlock.d.ts +6 -0
- package/dist/types/protocol/HydratedBlock.d.ts.map +1 -0
- package/dist/types/protocol/HydratedTransaction.d.ts +9 -0
- package/dist/types/protocol/HydratedTransaction.d.ts.map +1 -0
- package/dist/types/protocol/Issuer.d.ts +5 -0
- package/dist/types/protocol/Issuer.d.ts.map +1 -0
- package/dist/types/protocol/Steps.d.ts +2 -0
- package/dist/types/protocol/Steps.d.ts.map +1 -0
- package/dist/types/protocol/TransactionBoundWitness.d.ts +26 -0
- package/dist/types/protocol/TransactionBoundWitness.d.ts.map +1 -0
- package/dist/types/protocol/TransactionFeesFields.d.ts +35 -0
- package/dist/types/protocol/TransactionFeesFields.d.ts.map +1 -0
- package/dist/types/protocol/index.d.ts +13 -0
- package/dist/types/protocol/index.d.ts.map +1 -0
- package/dist/types/provider/XyoProvider.d.ts +18 -0
- package/dist/types/provider/XyoProvider.d.ts.map +1 -0
- package/dist/types/provider/XyoRunner.d.ts +7 -0
- package/dist/types/provider/XyoRunner.d.ts.map +1 -0
- package/dist/types/provider/XyoSigner.d.ts +10 -0
- package/dist/types/provider/XyoSigner.d.ts.map +1 -0
- package/dist/types/provider/XyoStorage.d.ts +16 -0
- package/dist/types/provider/XyoStorage.d.ts.map +1 -0
- package/dist/types/provider/XyoViewer.d.ts +17 -0
- package/dist/types/provider/XyoViewer.d.ts.map +1 -0
- package/dist/types/provider/XyoWallet.d.ts +13 -0
- package/dist/types/provider/XyoWallet.d.ts.map +1 -0
- package/dist/types/provider/index.d.ts +7 -0
- package/dist/types/provider/index.d.ts.map +1 -0
- package/dist/types/repository/Repository.d.ts +10 -0
- package/dist/types/repository/Repository.d.ts.map +1 -0
- package/dist/types/repository/TransactionReadRepository.d.ts +5 -0
- package/dist/types/repository/TransactionReadRepository.d.ts.map +1 -0
- package/dist/types/repository/TransactionRepository.d.ts +10 -0
- package/dist/types/repository/TransactionRepository.d.ts.map +1 -0
- package/dist/types/repository/TransactionRepositoryIterator.d.ts +5 -0
- package/dist/types/repository/TransactionRepositoryIterator.d.ts.map +1 -0
- package/dist/types/repository/TransactionWriteRepository.d.ts +5 -0
- package/dist/types/repository/TransactionWriteRepository.d.ts.map +1 -0
- package/dist/types/repository/index.d.ts +6 -0
- package/dist/types/repository/index.d.ts.map +1 -0
- package/dist/types/services/AccountBalanceService.d.ts +7 -0
- package/dist/types/services/AccountBalanceService.d.ts.map +1 -0
- package/dist/types/services/BlockProducer.d.ts +7 -0
- package/dist/types/services/BlockProducer.d.ts.map +1 -0
- package/dist/types/services/BlockReward.d.ts +6 -0
- package/dist/types/services/BlockReward.d.ts.map +1 -0
- package/dist/types/services/Chain/ChainContractViewer.d.ts +12 -0
- package/dist/types/services/Chain/ChainContractViewer.d.ts.map +1 -0
- package/dist/types/services/Chain/ChainIdentification.d.ts +14 -0
- package/dist/types/services/Chain/ChainIdentification.d.ts.map +1 -0
- package/dist/types/services/Chain/ChainInformation.d.ts +12 -0
- package/dist/types/services/Chain/ChainInformation.d.ts.map +1 -0
- package/dist/types/services/Chain/ChainService.d.ts +8 -0
- package/dist/types/services/Chain/ChainService.d.ts.map +1 -0
- package/dist/types/services/Chain/ChainStakeViewer.d.ts +10 -0
- package/dist/types/services/Chain/ChainStakeViewer.d.ts.map +1 -0
- package/dist/types/services/Chain/ChainStaker.d.ts +6 -0
- package/dist/types/services/Chain/ChainStaker.d.ts.map +1 -0
- package/dist/types/services/Chain/index.d.ts +7 -0
- package/dist/types/services/Chain/index.d.ts.map +1 -0
- package/dist/types/services/Election.d.ts +11 -0
- package/dist/types/services/Election.d.ts.map +1 -0
- package/dist/types/services/Params.d.ts +9 -0
- package/dist/types/services/Params.d.ts.map +1 -0
- package/dist/types/services/PendingTransactionsService.d.ts +7 -0
- package/dist/types/services/PendingTransactionsService.d.ts.map +1 -0
- package/dist/types/services/Service.d.ts +9 -0
- package/dist/types/services/Service.d.ts.map +1 -0
- package/dist/types/services/index.d.ts +10 -0
- package/dist/types/services/index.d.ts.map +1 -0
- package/dist/types/services/stakeIntent/ChainIndexingServiceStateSchema.d.ts +39 -0
- package/dist/types/services/stakeIntent/ChainIndexingServiceStateSchema.d.ts.map +1 -0
- package/dist/types/services/stakeIntent/StakeIntentService.d.ts +24 -0
- package/dist/types/services/stakeIntent/StakeIntentService.d.ts.map +1 -0
- package/dist/types/services/stakeIntent/index.d.ts +3 -0
- package/dist/types/services/stakeIntent/index.d.ts.map +1 -0
- package/dist/types/validation/block/BlockValidationFunction.d.ts +5 -0
- package/dist/types/validation/block/BlockValidationFunction.d.ts.map +1 -0
- package/dist/types/validation/block/HydratedBlockStateValidationFunction.d.ts +13 -0
- package/dist/types/validation/block/HydratedBlockStateValidationFunction.d.ts.map +1 -0
- package/dist/types/validation/block/HydratedBlockValidationFunction.d.ts +11 -0
- package/dist/types/validation/block/HydratedBlockValidationFunction.d.ts.map +1 -0
- package/dist/types/validation/block/index.d.ts +4 -0
- package/dist/types/validation/block/index.d.ts.map +1 -0
- package/dist/types/validation/boundwitness/BoundWitnessValidationFunction.d.ts +4 -0
- package/dist/types/validation/boundwitness/BoundWitnessValidationFunction.d.ts.map +1 -0
- package/dist/types/validation/boundwitness/HydratedBoundWitnessValidationFunction.d.ts +6 -0
- package/dist/types/validation/boundwitness/HydratedBoundWitnessValidationFunction.d.ts.map +1 -0
- package/dist/types/validation/boundwitness/index.d.ts +3 -0
- package/dist/types/validation/boundwitness/index.d.ts.map +1 -0
- package/dist/types/validation/index.d.ts +5 -0
- package/dist/types/validation/index.d.ts.map +1 -0
- package/dist/types/validation/payload/InBlockPayloadValidationFunction.d.ts +5 -0
- package/dist/types/validation/payload/InBlockPayloadValidationFunction.d.ts.map +1 -0
- package/dist/types/validation/payload/index.d.ts +2 -0
- package/dist/types/validation/payload/index.d.ts.map +1 -0
- package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts +13 -0
- package/dist/types/validation/transaction/HydratedTransactionStateValidationFunction.d.ts.map +1 -0
- package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts +12 -0
- package/dist/types/validation/transaction/HydratedTransactionValidationFunction.d.ts.map +1 -0
- package/dist/types/validation/transaction/index.d.ts +3 -0
- package/dist/types/validation/transaction/index.d.ts.map +1 -0
- package/documents/proof-of-perfect/proof-of-perfect-draft.log +741 -0
- package/documents/proof-of-perfect/proof-of-perfect-draft.pdf +0 -0
- package/documents/proof-of-perfect/proof-of-perfect-draft.tex +311 -0
- package/documents/xyol1-white-paper/white-paper-draft.log +547 -0
- package/documents/xyol1-white-paper/white-paper-draft.pdf +0 -0
- package/documents/xyol1-white-paper/white-paper-draft.tex +799 -0
- package/eslint.config.mjs +35 -0
- package/knip.config.ts +1 -1
- package/knip.log +491 -0
- package/package.json +31 -18
- package/src/Addressable.ts +6 -0
- package/src/ChainIterator.ts +29 -0
- package/src/ChainIteratorEventData.ts +11 -0
- package/src/OpenTelemetryProviders.ts +6 -0
- package/src/chain/ChainServiceCollection.ts +41 -0
- package/src/chain/Initializable.ts +3 -0
- package/src/chain/index.ts +2 -0
- package/src/ethereum.ts +26 -0
- package/src/index.ts +13 -1
- package/src/instances/BoundWitness.ts +13 -0
- package/src/instances/Data.ts +3 -0
- package/src/instances/Fees.ts +8 -0
- package/src/instances/HydratedBoundWitness.ts +15 -0
- package/src/instances/Object.ts +5 -0
- package/src/instances/Payload.ts +6 -0
- package/src/instances/Signature.ts +11 -0
- package/src/instances/block/BlockFields.ts +13 -0
- package/src/instances/block/HydratedBlock.ts +9 -0
- package/src/instances/block/SignedHydratedBlock.ts +5 -0
- package/src/instances/block/index.ts +2 -0
- package/src/instances/index.ts +9 -0
- package/src/instances/modifiers/Signed.ts +8 -0
- package/src/instances/modifiers/Validatable.ts +5 -0
- package/src/instances/modifiers/index.ts +2 -0
- package/src/instances/transaction/HydratedTransaction.ts +8 -0
- package/src/instances/transaction/SignedHydratedTransaction.ts +7 -0
- package/src/instances/transaction/TransactionFields.ts +12 -0
- package/src/instances/transaction/index.ts +2 -0
- package/src/payload/elevatable/ChainStakeIntent.ts +32 -0
- package/src/payload/elevatable/Executable.ts +29 -0
- package/src/payload/elevatable/Hash.ts +19 -0
- package/src/payload/elevatable/TransferPayload.ts +26 -0
- package/src/payload/elevatable/index.ts +4 -0
- package/src/payload/index.ts +1 -0
- package/src/protocol/AllowedBlockPayload.ts +29 -0
- package/src/protocol/BlockBoundWitness.ts +47 -0
- package/src/protocol/BlockDuration.ts +23 -0
- package/src/protocol/BlockNumber.ts +39 -0
- package/src/protocol/ChainAnalyzer.ts +10 -0
- package/src/protocol/ChainReference.ts +11 -0
- package/src/protocol/HydratedBlock.ts +8 -0
- package/src/protocol/HydratedTransaction.ts +19 -0
- package/src/protocol/Issuer.ts +5 -0
- package/src/protocol/Steps.ts +1 -0
- package/src/protocol/TransactionBoundWitness.ts +51 -0
- package/src/protocol/TransactionFeesFields.ts +38 -0
- package/src/protocol/index.ts +12 -0
- package/src/provider/XyoProvider.ts +29 -0
- package/src/provider/XyoRunner.ts +8 -0
- package/src/provider/XyoSigner.ts +21 -0
- package/src/provider/XyoStorage.ts +17 -0
- package/src/provider/XyoViewer.ts +18 -0
- package/src/provider/XyoWallet.ts +15 -0
- package/src/provider/index.ts +6 -0
- package/src/repository/Repository.ts +11 -0
- package/src/repository/TransactionReadRepository.ts +4 -0
- package/src/repository/TransactionRepository.ts +9 -0
- package/src/repository/TransactionRepositoryIterator.ts +4 -0
- package/src/repository/TransactionWriteRepository.ts +4 -0
- package/src/repository/index.ts +5 -0
- package/src/services/AccountBalanceService.ts +9 -0
- package/src/services/BlockProducer.ts +7 -0
- package/src/services/BlockReward.ts +7 -0
- package/src/services/Chain/ChainContractViewer.ts +12 -0
- package/src/services/Chain/ChainIdentification.ts +17 -0
- package/src/services/Chain/ChainInformation.ts +20 -0
- package/src/services/Chain/ChainService.ts +7 -0
- package/src/services/Chain/ChainStakeViewer.ts +10 -0
- package/src/services/Chain/ChainStaker.ts +5 -0
- package/src/services/Chain/index.ts +6 -0
- package/src/services/Election.ts +14 -0
- package/src/services/Params.ts +11 -0
- package/src/services/PendingTransactionsService.ts +8 -0
- package/src/services/Service.ts +10 -0
- package/src/services/index.ts +9 -0
- package/src/services/stakeIntent/ChainIndexingServiceStateSchema.ts +46 -0
- package/src/services/stakeIntent/StakeIntentService.ts +28 -0
- package/src/services/stakeIntent/index.ts +2 -0
- package/src/validation/block/BlockValidationFunction.ts +9 -0
- package/src/validation/block/HydratedBlockStateValidationFunction.ts +18 -0
- package/src/validation/block/HydratedBlockValidationFunction.ts +15 -0
- package/src/validation/block/index.ts +3 -0
- package/src/validation/boundwitness/BoundWitnessValidationFunction.ts +6 -0
- package/src/validation/boundwitness/HydratedBoundWitnessValidationFunction.ts +10 -0
- package/src/validation/boundwitness/index.ts +2 -0
- package/src/validation/index.ts +4 -0
- package/src/validation/payload/InBlockPayloadValidationFunction.ts +8 -0
- package/src/validation/payload/index.ts +1 -0
- package/src/validation/transaction/HydratedTransactionStateValidationFunction.ts +18 -0
- package/src/validation/transaction/HydratedTransactionValidationFunction.ts +16 -0
- package/src/validation/transaction/index.ts +2 -0
- package/typedoc.json +5 -0
- package/vite.config.ts +30 -0
- package/vitest.config.ts +14 -0
- package/vitest.teardown.ts +10 -0
- package/vitest.workspace.ts +5 -0
- package/xy.config.ts +2 -2
- package/dist/types/transaction/buildTransaction.d.ts +0 -7
- package/dist/types/transaction/buildTransaction.d.ts.map +0 -1
- package/dist/types/transaction/hydrateTransaction.d.ts +0 -11
- package/dist/types/transaction/hydrateTransaction.d.ts.map +0 -1
- package/dist/types/transaction/index.d.ts +0 -3
- package/dist/types/transaction/index.d.ts.map +0 -1
- package/src/transaction/buildTransaction.ts +0 -61
- package/src/transaction/hydrateTransaction.ts +0 -73
- package/src/transaction/index.ts +0 -2
|
Binary file
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
% Preamble
|
|
2
|
+
% ---
|
|
3
|
+
\documentclass{article}
|
|
4
|
+
|
|
5
|
+
% Packages
|
|
6
|
+
% ---
|
|
7
|
+
\usepackage{amsmath} % Advanced math typesetting
|
|
8
|
+
\usepackage[utf8]{inputenc} % Unicode support (Umlauts etc.)
|
|
9
|
+
\usepackage{hyperref} % Add a link to your document
|
|
10
|
+
\hypersetup{
|
|
11
|
+
colorlinks=true,
|
|
12
|
+
linkcolor=black,
|
|
13
|
+
filecolor=black,
|
|
14
|
+
citecolor=blue,
|
|
15
|
+
urlcolor=blue,
|
|
16
|
+
}
|
|
17
|
+
\usepackage{graphicx} % Add pictures to your document
|
|
18
|
+
\usepackage{listings} % Source code formatting and highlighting
|
|
19
|
+
\usepackage{framed} % Source code formatting and highlighting
|
|
20
|
+
\usepackage{appendix} % Source code formatting and highlighting
|
|
21
|
+
\usepackage{csquotes} % Pretty quotes
|
|
22
|
+
\usepackage[letterpaper, portrait, margin=1in]{geometry}
|
|
23
|
+
\usepackage{multicol}
|
|
24
|
+
\usepackage{parskip}
|
|
25
|
+
\usepackage{tikz}
|
|
26
|
+
\usetikzlibrary{arrows.meta, positioning}
|
|
27
|
+
\usepackage{ragged2e}
|
|
28
|
+
\usepackage[table]{xcolor} % Enables coloring in tables
|
|
29
|
+
\usepackage{tabularx}
|
|
30
|
+
\addtolength{\skip\footins}{10pt}
|
|
31
|
+
\usepackage{indentfirst}
|
|
32
|
+
\graphicspath{ {images/} }
|
|
33
|
+
|
|
34
|
+
\title {Proof of Perfect White Paper}
|
|
35
|
+
|
|
36
|
+
\author{
|
|
37
|
+
Joel Carter,
|
|
38
|
+
Arie Trouw,
|
|
39
|
+
Matt Jones,
|
|
40
|
+
Jordan Trouw
|
|
41
|
+
\thanks{XYO - \texttt{arie.trouw@xyo.network, joel.carter@xyo.network, matt.jones@xyo.network, jordan.trouw@xyo.network}}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
\date{March 2025}
|
|
45
|
+
|
|
46
|
+
\begin{document}
|
|
47
|
+
\maketitle
|
|
48
|
+
|
|
49
|
+
\begin{center}
|
|
50
|
+
\line(1,0){50}
|
|
51
|
+
\end{center}
|
|
52
|
+
|
|
53
|
+
%Abstract Section
|
|
54
|
+
\begin{abstract}
|
|
55
|
+
In areas of life where multiple parties interact to achieve an ideal outcome, from those as mundane as choosing where to go for dinner to those as weighty as voting on elected officials, the need for a clear and deterministic distributed consensus algorithm underlies the stability of the system. This need, and the associated solutions, have recently been of pioneering interest in the blockchain space.
|
|
56
|
+
\begin{center}
|
|
57
|
+
\line(1,0){50}
|
|
58
|
+
\end{center}
|
|
59
|
+
\end{abstract}
|
|
60
|
+
|
|
61
|
+
\section{Current Landscape}
|
|
62
|
+
There exist several recognized and widely adopted solutions for coming to
|
|
63
|
+
distributed consensus in the blockchain space.
|
|
64
|
+
|
|
65
|
+
\subsection{Proof of Work (PoW)}
|
|
66
|
+
\subsubsection{Benefits}
|
|
67
|
+
Revolutionized decentralized consensus by using computational puzzles to secure
|
|
68
|
+
networks, ensuring trust without a central authority.
|
|
69
|
+
\subsubsection{Limitations}
|
|
70
|
+
\begin{itemize}
|
|
71
|
+
\item High energy consumption.
|
|
72
|
+
\item Slow transaction speeds.
|
|
73
|
+
\item Centralization risks due to mining pools.
|
|
74
|
+
\item Vulnerability to 51\% attacks.
|
|
75
|
+
\item Risk of a single entity controlling the network with enough compute power.
|
|
76
|
+
\end{itemize}
|
|
77
|
+
|
|
78
|
+
\subsection{Proof of Stake (PoS)}
|
|
79
|
+
\subsubsection{Benefits}
|
|
80
|
+
Pioneered a more energy-efficient consensus model by leveraging stakeholders’
|
|
81
|
+
assets, reducing energy use and offering faster transaction speeds. Encourages
|
|
82
|
+
diversification of producers through random shuffling algorithms.
|
|
83
|
+
\subsubsection{Limitations}
|
|
84
|
+
\begin{itemize}
|
|
85
|
+
\item \enquote{Nothing at stake} problem.
|
|
86
|
+
\item Centralization risk with large stakeholders.
|
|
87
|
+
\item Vulnerability to long-range attacks.
|
|
88
|
+
\item Challenges in ensuring network security without high energy costs.
|
|
89
|
+
\end{itemize}
|
|
90
|
+
|
|
91
|
+
\section{Characteristics of an Ideal Algorithm}
|
|
92
|
+
|
|
93
|
+
Given the existing shortcomings of the current consensus algorithms it becomes
|
|
94
|
+
advantageous to envision a more ideal algorithm that maintains the guarantees
|
|
95
|
+
of the existing solutions while addressing their shortcomings. Paramount to any
|
|
96
|
+
distributed consensus algorithm for a blockchain is the ability to, given two
|
|
97
|
+
equally valid uncles, choose the best one. Moreover, for an algorithm to be
|
|
98
|
+
ideal it must not just meet the goal of consensus or even meet it well, but it
|
|
99
|
+
must be antifragile-–resilient and gaining in positive attributes--when subject
|
|
100
|
+
to the hostile entropy of the real world use cases it is subject to. The table
|
|
101
|
+
below lists several metrics across which an algorithm which arrives at that end
|
|
102
|
+
might be evaluated.
|
|
103
|
+
|
|
104
|
+
{
|
|
105
|
+
\hyphenpenalty=10000\exhyphenpenalty=10000
|
|
106
|
+
\renewcommand{\arraystretch}{1.5}
|
|
107
|
+
\begin{table}[h]
|
|
108
|
+
\centering
|
|
109
|
+
\begin{tabular}{|>{\RaggedRight\arraybackslash}p{3.5cm}|>{\RaggedRight\arraybackslash}p{3.5cm}|>{\RaggedRight\arraybackslash}p{3.5cm}|>{\RaggedRight\arraybackslash}p{3.5cm}|}
|
|
110
|
+
\hline
|
|
111
|
+
\rowcolor{lightgray}
|
|
112
|
+
\textbf{Metric} & \textbf{Good} & \textbf{Better} & \textbf{Best} \\
|
|
113
|
+
\hline
|
|
114
|
+
Consensus Mechanism & Independently verifiable & Simple to calculate & Hard to manipulate \\
|
|
115
|
+
\hline
|
|
116
|
+
CAP Theorem Balance & Chooses a balance of Consistency, Atomicity, and Partition Tolerance & Has an ideal balance for the network participants across conditions & Network partitions introduce minimal disruption due to constantly choosing best uncle, even when not partitioned \\
|
|
117
|
+
\hline
|
|
118
|
+
Scale & Does not fail as the network scales & Handles all reasonable scales across which the network will encounter without degrading in performance or increasing in cost & Gains in efficiency, robustness, \& decentralization as the network scales \\
|
|
119
|
+
\hline
|
|
120
|
+
Network Participation & Allows users of a sufficient threshold (financial, technological, etc.) to participate & Allows all users to participate & Encourages decentralization and variety of participants at the protocol level \\
|
|
121
|
+
\hline
|
|
122
|
+
\end{tabular}
|
|
123
|
+
\caption{Tiered Comparison of Sample Blockchain Characteristics}
|
|
124
|
+
\end{table}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
\subsection{For a Single Block}
|
|
128
|
+
Towards the goal of arriving at consensus, given N number of potential blocks
|
|
129
|
+
for inclusion in the blockchain which are all individually valid, it becomes
|
|
130
|
+
desirable to have a mechanism for comparing blocks to provide an unbiased and
|
|
131
|
+
impartial way for determining whether a block is more ideal for inclusion in
|
|
132
|
+
the blockchain. This provides a tie-breaker of sorts when deciding which
|
|
133
|
+
previous blocks to build on for block producers and an evaluation criteria for
|
|
134
|
+
validators to decide which of the candidate chains to work on as it likely has
|
|
135
|
+
the highest probability of being accepted. Existing mechanisms for this are the
|
|
136
|
+
first produced block in PoW or the block produced by the next elected producer
|
|
137
|
+
in PoS.
|
|
138
|
+
|
|
139
|
+
Of paramount importance to selecting the next block is the effect that a single
|
|
140
|
+
block can have in influencing the direction of a blockchain which leads to the
|
|
141
|
+
following maxims.
|
|
142
|
+
|
|
143
|
+
\begin{itemize}
|
|
144
|
+
\item It is not acceptable for the next block in a blockchain to have an outsized
|
|
145
|
+
influence on the chain, such as forcing an uncle to be accepted as the new
|
|
146
|
+
chain, as it allows a single network actor such a block producer with
|
|
147
|
+
sufficient computational power to manipulate the entire network.
|
|
148
|
+
\item It is permissible for the cumulative effect of older blocks, which are already
|
|
149
|
+
included in the chain to have an outsized influence on the future of the chain
|
|
150
|
+
so long as there was no way during the production of the blocks for any of the
|
|
151
|
+
network actors to have known they would influence events.
|
|
152
|
+
\end{itemize}
|
|
153
|
+
|
|
154
|
+
A simple but robust accounting system could be derived for a single block
|
|
155
|
+
giving each potential block a score such that the block score is the weighted
|
|
156
|
+
sum of the positive aspects to be encouraged minus the weighted sums of the
|
|
157
|
+
negative aspects we wish to discourage. For example, for a blockchain which
|
|
158
|
+
that only desires to encourage decentralization, the following would apply.
|
|
159
|
+
|
|
160
|
+
\[
|
|
161
|
+
\mathit{Score}_{\mathit{Block}} = \mathit{Score}_{\mathit{Decentralization}} - \mathit{Score}_{\mathit{Centralization}}
|
|
162
|
+
\]
|
|
163
|
+
|
|
164
|
+
Combining multiple desired/undesired traits with respective weights gives the
|
|
165
|
+
following.
|
|
166
|
+
|
|
167
|
+
\[
|
|
168
|
+
\mathit{Score}_{\mathit{Block}} = \sum_{i \in Q} \mathit{Weight}_i (\mathit{Score}_i - \mathit{Score}_{i'})
|
|
169
|
+
\]
|
|
170
|
+
|
|
171
|
+
{
|
|
172
|
+
\hyphenpenalty=10000\exhyphenpenalty=10000
|
|
173
|
+
\renewcommand{\arraystretch}{1.5}
|
|
174
|
+
\begin{table}[h]
|
|
175
|
+
\centering
|
|
176
|
+
\begin{tabular}{|>{\RaggedRight\arraybackslash}l|>{\RaggedRight\arraybackslash}p{10cm}|}
|
|
177
|
+
\hline
|
|
178
|
+
Q & Set of all qualities to emphasize \\
|
|
179
|
+
\hline
|
|
180
|
+
$\mathit{Score}_{\mathit{i}}$ & The measure to which the block exhibits the desired quality \\
|
|
181
|
+
\hline
|
|
182
|
+
$\mathit{Score}_{\mathit{i'}}$ & The measure to which the block exhibits the inverse of the desired quality \\
|
|
183
|
+
\hline
|
|
184
|
+
$\mathit{Weight}_{\mathit{i}}$ & The weight at which the quality should be emphasized \\
|
|
185
|
+
\hline
|
|
186
|
+
\end{tabular}
|
|
187
|
+
\caption{Single Block Scoring Key}
|
|
188
|
+
\end{table}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
\subsection{Across Multiple Blocks}
|
|
192
|
+
|
|
193
|
+
\begin{quote}
|
|
194
|
+
\enquote{The test of a first-rate intelligence is the ability to hold two opposed ideas in the mind at the same time, and still retain the ability to function.}
|
|
195
|
+
|
|
196
|
+
\hfill — F. Scott Fitzgerald, The Crack-Up
|
|
197
|
+
\end{quote}
|
|
198
|
+
|
|
199
|
+
Building on individual block evaluation, it becomes necessary to have a method
|
|
200
|
+
of evaluating N potential chains which are all independently valid for
|
|
201
|
+
determining which chain is more ideal for defining and furthering the
|
|
202
|
+
blockchain. Mechanisms such as Proof of Work (PoW) or Proof of Stake (PoS)
|
|
203
|
+
allow for comparing multiple chains to provide an unbiased and impartial means
|
|
204
|
+
for achieving this but have some shortcomings as address previously.
|
|
205
|
+
|
|
206
|
+
One of the most ubiquitous and well proven models for arriving at a desired
|
|
207
|
+
state across discrete data, like blocks in a blockchain, is a Control System.
|
|
208
|
+
Control systems, of the architecture shown in Figure~\ref{fig:control_system},
|
|
209
|
+
exist for applications as varied as thermostats to self-driving vehicles and
|
|
210
|
+
can be adapted to model blockchain consensus.
|
|
211
|
+
|
|
212
|
+
\begin{figure}[h]
|
|
213
|
+
\centering
|
|
214
|
+
\begin{tikzpicture}[
|
|
215
|
+
block/.style={draw, rectangle, minimum height=2em, minimum width=3cm},
|
|
216
|
+
>=Stealth
|
|
217
|
+
]
|
|
218
|
+
|
|
219
|
+
% Nodes
|
|
220
|
+
\node (input) at (0,0) {Input};
|
|
221
|
+
\node[block, right=1cm of input] (setpoint) {Setpoint};
|
|
222
|
+
\node[block, right=1.5cm of setpoint] (controller) {Controller};
|
|
223
|
+
\node[block, right=1.5cm of controller] (process) {Process};
|
|
224
|
+
\node[right=1cm of process] (output) {Output};
|
|
225
|
+
|
|
226
|
+
% Arrows
|
|
227
|
+
\draw[->] (input) -- (setpoint);
|
|
228
|
+
\draw[->] (setpoint) -- (controller);
|
|
229
|
+
\draw[->] (controller) -- (process);
|
|
230
|
+
\draw[->] (process) -- (output);
|
|
231
|
+
|
|
232
|
+
% Feedback loop
|
|
233
|
+
\draw[->] (process.south) -- ++(0,-1) node[below] {}
|
|
234
|
+
-- ++(-4.5,0) node[below] (fbtext) {Feedback}
|
|
235
|
+
-- (controller.south);
|
|
236
|
+
|
|
237
|
+
\end{tikzpicture}
|
|
238
|
+
\caption{A Control System}
|
|
239
|
+
\label{fig:control_system}
|
|
240
|
+
\end{figure}
|
|
241
|
+
|
|
242
|
+
A familiar Control System is a car’s shocks and struts which work together to
|
|
243
|
+
absorb bumps and steady the suspension, keeping the ride smooth by controlling
|
|
244
|
+
how much the vehicle moves and how quickly it settles. In a similar fashion, a
|
|
245
|
+
blockchain can be viewed as a continuously correcting system across which
|
|
246
|
+
producers, users, and cryptographic algorithms constantly interact with each
|
|
247
|
+
other to achieve consensus. For PoW chains the Control System can be modeled as
|
|
248
|
+
the simplified Controls System in Table~\ref{fig:pow_control_system}.
|
|
249
|
+
|
|
250
|
+
{
|
|
251
|
+
\hyphenpenalty=10000\exhyphenpenalty=10000
|
|
252
|
+
\renewcommand{\arraystretch}{1.5}
|
|
253
|
+
\begin{table}[h]
|
|
254
|
+
\centering
|
|
255
|
+
\begin{tabular}{|>{\RaggedRight\arraybackslash}l|>{\RaggedRight\arraybackslash}p{10cm}|}
|
|
256
|
+
\hline
|
|
257
|
+
Input & Difficulty Level \\
|
|
258
|
+
\hline
|
|
259
|
+
Setpoint & Block interval \\
|
|
260
|
+
\hline
|
|
261
|
+
Controller & Difficulty adjustment \\
|
|
262
|
+
\hline
|
|
263
|
+
Process & Miners generating blocks \\
|
|
264
|
+
\hline
|
|
265
|
+
Output & Actual time to mine next block \\
|
|
266
|
+
\hline
|
|
267
|
+
Feedback & Difference between actual \& desired block time \\
|
|
268
|
+
\hline
|
|
269
|
+
\end{tabular}
|
|
270
|
+
\caption{PoW Control System}
|
|
271
|
+
\label{fig:pow_control_system}
|
|
272
|
+
\end{table}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
For PoS chains the Control System becomes more complex implementing multiple
|
|
276
|
+
logical Control Systems for things like network throughput, gas economics, etc.
|
|
277
|
+
PoS chain Control Systems, while more complex than those of PoS, underscore the
|
|
278
|
+
need for optimizing the for more than just a single blockchain metric.
|
|
279
|
+
|
|
280
|
+
An ideal Control System for a blockchain would produce an optimal chain by
|
|
281
|
+
continuously evaluating and controlling for multiple metrics while also
|
|
282
|
+
including mechanisms to prevent participants from manipulating or negatively
|
|
283
|
+
influencing the blockchain.
|
|
284
|
+
|
|
285
|
+
\begin{itemize}
|
|
286
|
+
\item Prevent immediate correction (limit influence of a single block)
|
|
287
|
+
\item Amplify/attenuate across multiple blocks to achieve desired setpoint
|
|
288
|
+
\item Use randomness and decentralization to prevent deterministic attacks
|
|
289
|
+
\end{itemize}
|
|
290
|
+
|
|
291
|
+
\section{Features}
|
|
292
|
+
\subsection{Dampening Effect}
|
|
293
|
+
Longer than just previous block
|
|
294
|
+
\subsection{Amplify/Attenuate}
|
|
295
|
+
\[
|
|
296
|
+
\sum_{\mathit{W} - \mathit{N}}^{\mathit{N}} \mathit{N} \, \mathit{x}_{\mathit{i}}
|
|
297
|
+
\]
|
|
298
|
+
|
|
299
|
+
\section{Proof of Perfect}
|
|
300
|
+
\[
|
|
301
|
+
\sum_{i = \mathit{W} - \mathit{N}}^{\mathit{N}}
|
|
302
|
+
((\mathit{P} - \mathit{N}) \, {(\mathit{W} - \mathit{i})}) / (\mathit{W} - \mathit{i})
|
|
303
|
+
\]
|
|
304
|
+
|
|
305
|
+
Weighted contributions to rolling average with past counting for more Emphasize
|
|
306
|
+
the value of randomness to prevent deterministic attacks
|
|
307
|
+
|
|
308
|
+
notes on - Kalman filters as options - Bayesian Probabilistic feedback - or
|
|
309
|
+
even an appropriately bounded Markov models
|
|
310
|
+
|
|
311
|
+
\end{document}
|