From 220f3f0660279bbae3e04f4e1293f51bbfc21133 Mon Sep 17 00:00:00 2001 From: filippoweb3 Date: Thu, 8 Feb 2024 15:35:53 +0100 Subject: [PATCH 01/15] added new page --- docs/learn/learn-elastic-scaling.md | 8 ++++++++ kusama-guide/sidebars.js | 1 + polkadot-wiki/sidebars.js | 1 + 3 files changed, 10 insertions(+) create mode 100644 docs/learn/learn-elastic-scaling.md diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md new file mode 100644 index 000000000000..3f43c1fd32fa --- /dev/null +++ b/docs/learn/learn-elastic-scaling.md @@ -0,0 +1,8 @@ +--- +id: learn-elastic-scaling +title: Polkadot's Elastic Scaling +sidebar_label: Elastic Scaling +description: Pushing Parachains' Boundaries Below 6 seconds Execution Time. +keywords: [elastic scaling, parachains, coretime, blockspace] +slug: ../learn-elastic-scaling +--- diff --git a/kusama-guide/sidebars.js b/kusama-guide/sidebars.js index c575e51b827e..d60721d49826 100644 --- a/kusama-guide/sidebars.js +++ b/kusama-guide/sidebars.js @@ -599,6 +599,7 @@ module.exports = { 'learn/learn-spree', "learn/learn-parathreads", "learn/learn-async-backing", + "learn/learn-elastic-scaling", "learn/learn-sassafras", ], }, diff --git a/polkadot-wiki/sidebars.js b/polkadot-wiki/sidebars.js index 2a7de4d67cb7..22c4f1ddc9d9 100644 --- a/polkadot-wiki/sidebars.js +++ b/polkadot-wiki/sidebars.js @@ -617,6 +617,7 @@ module.exports = { 'learn/learn-spree', "learn/learn-parathreads", "learn/learn-async-backing", + "learn/learn-elastic-scaling", "learn/learn-sassafras", "learn/learn-hyperbridge", ], From a9bf82715e5edc475564447928dafa06f56c4dee Mon Sep 17 00:00:00 2001 From: filippoweb3 Date: Thu, 8 Feb 2024 16:53:58 +0100 Subject: [PATCH 02/15] added text --- docs/learn/learn-elastic-scaling.md | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index 3f43c1fd32fa..e126196dc2af 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -6,3 +6,47 @@ description: Pushing Parachains' Boundaries Below 6 seconds Execution Time. keywords: [elastic scaling, parachains, coretime, blockspace] slug: ../learn-elastic-scaling --- + +The path of parablocks from their creation to their inclusion into the relay chain (discussed in the +[Parachain Protocol Page](./learn-parachains-protocol.md)) is divided into two parts: the parachain +side and the relay chain side. Scaling the Polkadot technology implies scaling how parablocks are +produced and how their data is processed, secured, made it available for additional checks, and +finally included into the relay chain. + +[Asynchronous backing](./learn-async-backing.md) is the first implementation to the parachain +protocol that alters how parachains produce blocks and how the relay chain process their data. +Briefly, parachains will be able to take up to 2 seconds execution time (produce parablocks), while +the relay chain will be able to include a parablock every 6 seconds. + +The limiting factor now is the relay chain and the 6 seconds it takes backing groups to back and +include parablocks. After asynchronous backing will be implented, parachains can theoretically +already produce parablocks in the sub-second time range, but this would just create large unincluded +segments on their end. Here is where elastic scaling comes into play. With elastic scaling, +parachains will be able to use multiple cores to include multiple parablocks within the same relay +chain block. Take for example a parachain that wants to submit 4 parablocks to the relay chain: + +Without elastic scaling it will take 35 s to include all of them through one core. Remember that a +core is occupied after backing and before inclusion, i.e. for the whole data availability process. A +block cannot enter a core before the previous block has been declared available. + +``` + R1 <----- R2 <----- R3 <----- R4 <----- R5 + +C1 |P1 B I + |P2 B I + |P3 B I + |P4 B I + +``` + +With elastic scaling it will take just 18 s to include all of them using 2 cores (C1 and C2). + +``` + R1 <----- R2 <----- R3 + +C1 |P1 B I + |P2 B I +C2 |P3 B I + |P4 B I + +``` From c04757d4d1ba25f35adda542ce3c6fcacbc9554b Mon Sep 17 00:00:00 2001 From: filippoweb3 Date: Thu, 8 Feb 2024 17:05:18 +0100 Subject: [PATCH 03/15] added more text - grammar --- docs/learn/learn-elastic-scaling.md | 32 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index e126196dc2af..ef1b85a4ae53 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -10,24 +10,24 @@ slug: ../learn-elastic-scaling The path of parablocks from their creation to their inclusion into the relay chain (discussed in the [Parachain Protocol Page](./learn-parachains-protocol.md)) is divided into two parts: the parachain side and the relay chain side. Scaling the Polkadot technology implies scaling how parablocks are -produced and how their data is processed, secured, made it available for additional checks, and -finally included into the relay chain. +produced and how their data is processed, secured, made available for additional checks, and finally +included in the relay chain. [Asynchronous backing](./learn-async-backing.md) is the first implementation to the parachain -protocol that alters how parachains produce blocks and how the relay chain process their data. -Briefly, parachains will be able to take up to 2 seconds execution time (produce parablocks), while -the relay chain will be able to include a parablock every 6 seconds. +protocol that alters how parachains produce blocks and how the relay chain processes their data. +Briefly, parachains will take up to 2 seconds execution time (produce parablocks), while the relay +chain will be able to include a parablock every 6 seconds. The limiting factor now is the relay chain and the 6 seconds it takes backing groups to back and -include parablocks. After asynchronous backing will be implented, parachains can theoretically -already produce parablocks in the sub-second time range, but this would just create large unincluded -segments on their end. Here is where elastic scaling comes into play. With elastic scaling, -parachains will be able to use multiple cores to include multiple parablocks within the same relay -chain block. Take for example a parachain that wants to submit 4 parablocks to the relay chain: +include parablocks. After asynchronous backing is implemented, parachains can theoretically produce +parablocks in the sub-second time range, but this would just create large unincluded segments on +their end. Here is where elastic scaling comes into play. With elastic scaling, parachains can use +multiple cores to include multiple parablocks within the same relay chain block. Take for example a +parachain that wants to submit 4 parablocks to the relay chain: -Without elastic scaling it will take 35 s to include all of them through one core. Remember that a -core is occupied after backing and before inclusion, i.e. for the whole data availability process. A -block cannot enter a core before the previous block has been declared available. +Without elastic scaling, it will take 35 s to include all of them through one core (C1). Remember +that a core is occupied after backing and before inclusion, i.e. for the whole data availability +process. A block cannot enter a core before the previous block has been declared available. ``` R1 <----- R2 <----- R3 <----- R4 <----- R5 @@ -39,7 +39,11 @@ C1 |P1 B I ``` -With elastic scaling it will take just 18 s to include all of them using 2 cores (C1 and C2). +The diagram above shows how backing and inclusion of parablocks (P) happen within the same relay +chain block (R). With one core, it is 6 s block time. With two cores is 3 seconds block time (see +below). + +With elastic scaling, it will take just 18 s to include all of them using 2 cores (C1 and C2). ``` R1 <----- R2 <----- R3 From 6322b99164db71354226bb2f4680ea01a2da3f11 Mon Sep 17 00:00:00 2001 From: filippoweb3 Date: Fri, 9 Feb 2024 14:49:01 +0100 Subject: [PATCH 04/15] added challenges --- docs/learn/learn-elastic-scaling.md | 43 +++++++++++++++++++---------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index ef1b85a4ae53..3d656b2ad0b6 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -8,10 +8,10 @@ slug: ../learn-elastic-scaling --- The path of parablocks from their creation to their inclusion into the relay chain (discussed in the -[Parachain Protocol Page](./learn-parachains-protocol.md)) is divided into two parts: the parachain -side and the relay chain side. Scaling the Polkadot technology implies scaling how parablocks are -produced and how their data is processed, secured, made available for additional checks, and finally -included in the relay chain. +[Parachain Protocol Page](./learn-parachains-protocol.md)) span two domains: the parachain side and +the relay chain side. Scaling the Polkadot technology implies scaling how parablocks are produced +and how their data is processed, secured, made available for additional checks, and finally included +in the relay chain. [Asynchronous backing](./learn-async-backing.md) is the first implementation to the parachain protocol that alters how parachains produce blocks and how the relay chain processes their data. @@ -20,14 +20,15 @@ chain will be able to include a parablock every 6 seconds. The limiting factor now is the relay chain and the 6 seconds it takes backing groups to back and include parablocks. After asynchronous backing is implemented, parachains can theoretically produce -parablocks in the sub-second time range, but this would just create large unincluded segments on -their end. Here is where elastic scaling comes into play. With elastic scaling, parachains can use -multiple cores to include multiple parablocks within the same relay chain block. Take for example a -parachain that wants to submit 4 parablocks to the relay chain: +parablocks in the sub-second time range, but this would just create large +[unincluded segments](./learn-async-backing.md#unincluded-segments) on their end and a bottleneck on +the relay chain. Here is where elastic scaling comes into play. With elastic scaling, parachains can +use multiple cores to include multiple parablocks within the same relay chain block. Take for +example a parachain that wants to submit 4 parablocks to the relay chain: -Without elastic scaling, it will take 35 s to include all of them through one core (C1). Remember -that a core is occupied after backing and before inclusion, i.e. for the whole data availability -process. A block cannot enter a core before the previous block has been declared available. +Without elastic scaling, it will take 35 s to include all of them through one core. Remember that a +core is occupied after backing and before inclusion, i.e. for the whole data availability process. A +block cannot enter a core before the previous block has been declared available. ``` R1 <----- R2 <----- R3 <----- R4 <----- R5 @@ -40,10 +41,10 @@ C1 |P1 B I ``` The diagram above shows how backing and inclusion of parablocks (P) happen within the same relay -chain block (R). With one core, it is 6 s block time. With two cores is 3 seconds block time (see -below). +chain block (R). With one core (C1), it is 6 s block time. With two cores is 3 seconds block time +(see below). -With elastic scaling, it will take just 18 s to include all of them using 2 cores (C1 and C2). +With elastic scaling, it will take just 18 s to include all of them using two cores (C1 and C2). ``` R1 <----- R2 <----- R3 @@ -54,3 +55,17 @@ C2 |P3 B I |P4 B I ``` + +If the pace per core on the relay chain will not change (backing and inclusion every 6 seconds per +core), on the parachain side collators will need to increase the parablock production rate to push +P1 and P2 to the two relay chain cores. + +## Challenges + +Assuming a constant number of cores, from the relay chain side, elastic scaling will not see major +upgrades as a parachain will use multiple existing cores instead of just one. However, from the +parachain side, collators will need to produce more parablocks per unit time, implying that +technical specifications for collators will likely increase. + +For more advanced technical challenges, see the +[Elastic Scaling GitHub PR](https://github.com/paritytech/polkadot-sdk/issues/1829). From 4cd7d12d0261ed166d27bcf431a988c56a136b00 Mon Sep 17 00:00:00 2001 From: Filippo <110459737+filippoweb3@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:28:55 +0100 Subject: [PATCH 05/15] Update docs/learn/learn-elastic-scaling.md Co-authored-by: bader y --- docs/learn/learn-elastic-scaling.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index 3d656b2ad0b6..580f864f0b99 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -8,10 +8,9 @@ slug: ../learn-elastic-scaling --- The path of parablocks from their creation to their inclusion into the relay chain (discussed in the -[Parachain Protocol Page](./learn-parachains-protocol.md)) span two domains: the parachain side and -the relay chain side. Scaling the Polkadot technology implies scaling how parablocks are produced -and how their data is processed, secured, made available for additional checks, and finally included -in the relay chain. +[Parachain Protocol Page](./learn-parachains-protocol.md)) span two domains: the parachain's role and +the relay chain's role. Scaling the Polkadot protocol involves consideration on how parablocks are validated, processed, secured, made available for additional checks, and finally included +in the relay chain as part of its final state [Asynchronous backing](./learn-async-backing.md) is the first implementation to the parachain protocol that alters how parachains produce blocks and how the relay chain processes their data. From ebbd0e4a66882669fd6dcb8b784b3b85b66ff020 Mon Sep 17 00:00:00 2001 From: Filippo <110459737+filippoweb3@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:29:01 +0100 Subject: [PATCH 06/15] Update docs/learn/learn-elastic-scaling.md Co-authored-by: bader y --- docs/learn/learn-elastic-scaling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index 580f864f0b99..c2cf1d042318 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -14,7 +14,7 @@ in the relay chain as part of its final state [Asynchronous backing](./learn-async-backing.md) is the first implementation to the parachain protocol that alters how parachains produce blocks and how the relay chain processes their data. -Briefly, parachains will take up to 2 seconds execution time (produce parablocks), while the relay +This upgrade will allow parachains to take up to 2 seconds execution time (for producing parablocks), while the relay chain will be able to include a parablock every 6 seconds. The limiting factor now is the relay chain and the 6 seconds it takes backing groups to back and From d9245a1724ef68b0c5655d3ac0635ab64edb199c Mon Sep 17 00:00:00 2001 From: Filippo <110459737+filippoweb3@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:29:31 +0100 Subject: [PATCH 07/15] Update docs/learn/learn-elastic-scaling.md Co-authored-by: bader y --- docs/learn/learn-elastic-scaling.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index c2cf1d042318..6be4fe4732fa 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -17,13 +17,10 @@ protocol that alters how parachains produce blocks and how the relay chain proce This upgrade will allow parachains to take up to 2 seconds execution time (for producing parablocks), while the relay chain will be able to include a parablock every 6 seconds. -The limiting factor now is the relay chain and the 6 seconds it takes backing groups to back and -include parablocks. After asynchronous backing is implemented, parachains can theoretically produce -parablocks in the sub-second time range, but this would just create large -[unincluded segments](./learn-async-backing.md#unincluded-segments) on their end and a bottleneck on -the relay chain. Here is where elastic scaling comes into play. With elastic scaling, parachains can -use multiple cores to include multiple parablocks within the same relay chain block. Take for -example a parachain that wants to submit 4 parablocks to the relay chain: +With asynchronous backing enabled, parachains can theoretically produce +parablocks in the sub-second time range. However, to accomplish this, asynchronous backing must temporarily **hold** blocks in [unincluded segments](./learn-async-backing.md#unincluded-segments). This is the bottleneck that elastic scaling addresses. With elastic scaling, parachains can +use multiple cores to include multiple parablocks within the same relay chain block. Take, for +example, a parachain that wants to submit 4 parablocks to the relay chain: Without elastic scaling, it will take 35 s to include all of them through one core. Remember that a core is occupied after backing and before inclusion, i.e. for the whole data availability process. A From 2160f698565f5192cd7d2e1f11edcb8bf1040693 Mon Sep 17 00:00:00 2001 From: filippoweb3 Date: Tue, 13 Feb 2024 15:58:25 +0100 Subject: [PATCH 08/15] Bader's feedback --- docs/learn/learn-elastic-scaling.md | 43 +++++++++++++++++------------ 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index 6be4fe4732fa..4783f6cc37a9 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -8,23 +8,26 @@ slug: ../learn-elastic-scaling --- The path of parablocks from their creation to their inclusion into the relay chain (discussed in the -[Parachain Protocol Page](./learn-parachains-protocol.md)) span two domains: the parachain's role and -the relay chain's role. Scaling the Polkadot protocol involves consideration on how parablocks are validated, processed, secured, made available for additional checks, and finally included -in the relay chain as part of its final state +[Parachain Protocol Page](./learn-parachains-protocol.md)) span two domains: the parachain's role +and the relay chain's role. Scaling the Polkadot protocol involves consideration on how parablocks +are validated, processed, secured, made available for additional checks, and finally included in the +relay chain as part of its final state [Asynchronous backing](./learn-async-backing.md) is the first implementation to the parachain protocol that alters how parachains produce blocks and how the relay chain processes their data. -This upgrade will allow parachains to take up to 2 seconds execution time (for producing parablocks), while the relay -chain will be able to include a parablock every 6 seconds. +This upgrade will allow parachains to take up to 2 seconds execution time (for producing +parablocks), while the relay chain will be able to include a parablock every 6 seconds. -With asynchronous backing enabled, parachains can theoretically produce -parablocks in the sub-second time range. However, to accomplish this, asynchronous backing must temporarily **hold** blocks in [unincluded segments](./learn-async-backing.md#unincluded-segments). This is the bottleneck that elastic scaling addresses. With elastic scaling, parachains can -use multiple cores to include multiple parablocks within the same relay chain block. Take, for -example, a parachain that wants to submit 4 parablocks to the relay chain: +With asynchronous backing enabled, parachains can theoretically produce parablocks in the sub-second +time range. However, to accomplish this, asynchronous backing must temporarily **hold** blocks in +[unincluded segments](./learn-async-backing.md#unincluded-segments). This is the bottleneck that +elastic scaling addresses. With elastic scaling, parachains can use multiple cores to include +multiple parablocks within the same relay chain block. Take, for example, a parachain that wants to +submit 4 parablocks to the relay chain: -Without elastic scaling, it will take 35 s to include all of them through one core. Remember that a -core is occupied after backing and before inclusion, i.e. for the whole data availability process. A -block cannot enter a core before the previous block has been declared available. +Without elastic scaling, it will take 24 seconds to include all of them through one core. Remember +that a core is occupied after backing and before inclusion, i.e. for the whole data availability +process. A block cannot enter a core before the previous block has been declared available. ``` R1 <----- R2 <----- R3 <----- R4 <----- R5 @@ -37,10 +40,12 @@ C1 |P1 B I ``` The diagram above shows how backing and inclusion of parablocks (P) happen within the same relay -chain block (R). With one core (C1), it is 6 s block time. With two cores is 3 seconds block time -(see below). +chain block (R). With one core (C1), it is a 6-second block time. Note how P4 is included after 30 +seconds (not 24 seconds), because when P1 was pushed to the relay chain to being backed, there was +no other parablock. -With elastic scaling, it will take just 18 s to include all of them using two cores (C1 and C2). +With elastic scaling, it will take just 12 seconds (3-second block time) to include all of them +using two cores. ``` R1 <----- R2 <----- R3 @@ -52,12 +57,16 @@ C2 |P3 B I ``` +The diagram above shows how 4 parablocks are backed and included in the relay chain using two cores +(C1 and C2). Note how P2 and P4 are included after 18 seconds (not 12 seconds), because when P1 and +P3 were pushed to the relay chain for being backed, there were no other parablocks. + +## Technical Considerations + If the pace per core on the relay chain will not change (backing and inclusion every 6 seconds per core), on the parachain side collators will need to increase the parablock production rate to push P1 and P2 to the two relay chain cores. -## Challenges - Assuming a constant number of cores, from the relay chain side, elastic scaling will not see major upgrades as a parachain will use multiple existing cores instead of just one. However, from the parachain side, collators will need to produce more parablocks per unit time, implying that From c75093b545be910dca96a0bb2871bd4707bbe370 Mon Sep 17 00:00:00 2001 From: filippoweb3 Date: Tue, 13 Feb 2024 16:26:42 +0100 Subject: [PATCH 09/15] added details to text --- docs/learn/learn-elastic-scaling.md | 47 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index 4783f6cc37a9..aeb4a73f2216 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -8,26 +8,27 @@ slug: ../learn-elastic-scaling --- The path of parablocks from their creation to their inclusion into the relay chain (discussed in the -[Parachain Protocol Page](./learn-parachains-protocol.md)) span two domains: the parachain's role -and the relay chain's role. Scaling the Polkadot protocol involves consideration on how parablocks -are validated, processed, secured, made available for additional checks, and finally included in the +[Parachain Protocol Page](./learn-parachains-protocol.md)) span two domains: the parachain's and +relay chain's roles. Scaling the Polkadot protocol involves consideration of how parablocks are +validated, processed, secured, made available for additional checks, and finally included in the relay chain as part of its final state -[Asynchronous backing](./learn-async-backing.md) is the first implementation to the parachain +[Asynchronous backing](./learn-async-backing.md) is the first implementation of the parachain protocol that alters how parachains produce blocks and how the relay chain processes their data. This upgrade will allow parachains to take up to 2 seconds execution time (for producing parablocks), while the relay chain will be able to include a parablock every 6 seconds. With asynchronous backing enabled, parachains can theoretically produce parablocks in the sub-second time range. However, to accomplish this, asynchronous backing must temporarily **hold** blocks in -[unincluded segments](./learn-async-backing.md#unincluded-segments). This is the bottleneck that -elastic scaling addresses. With elastic scaling, parachains can use multiple cores to include -multiple parablocks within the same relay chain block. Take, for example, a parachain that wants to -submit 4 parablocks to the relay chain: +[unincluded segments](./learn-async-backing.md#unincluded-segments), while parablocks can be +included into the relay chain every 6 seconds per core. This is the bottleneck that elastic scaling +addresses. With elastic scaling, parachains can use multiple cores to include multiple parablocks +within the same relay chain block. -Without elastic scaling, it will take 24 seconds to include all of them through one core. Remember -that a core is occupied after backing and before inclusion, i.e. for the whole data availability -process. A block cannot enter a core before the previous block has been declared available. +Take, for example, a parachain that wants to submit four parablocks to the relay chain. Without +elastic scaling, it will take 24 seconds to include all of them through one core. Remember that a +core is occupied after backing and before inclusion, i.e., for the whole data availability process. +A block cannot enter a core before the previous block has been declared available. ``` R1 <----- R2 <----- R3 <----- R4 <----- R5 @@ -39,13 +40,13 @@ C1 |P1 B I ``` -The diagram above shows how backing and inclusion of parablocks (P) happen within the same relay -chain block (R). With one core (C1), it is a 6-second block time. Note how P4 is included after 30 -seconds (not 24 seconds), because when P1 was pushed to the relay chain to being backed, there was -no other parablock. +The diagram above shows how the backing and inclusion of parablocks (P) happen within the same relay +chain block (R). With one core (C1), a parablock is included every 6 seconds. Note how P4 is +included after 30 seconds (not 24 seconds) because when P1 was pushed to the relay chain for being +backed, there was no previous parablock. -With elastic scaling, it will take just 12 seconds (3-second block time) to include all of them -using two cores. +With elastic scaling, it will take just 12 seconds (3-second block time) to include all four +parablocks using two cores. ``` R1 <----- R2 <----- R3 @@ -57,20 +58,20 @@ C2 |P3 B I ``` -The diagram above shows how 4 parablocks are backed and included in the relay chain using two cores -(C1 and C2). Note how P2 and P4 are included after 18 seconds (not 12 seconds), because when P1 and -P3 were pushed to the relay chain for being backed, there were no other parablocks. +The diagram above shows how four parablocks are backed and included in the relay chain using two +cores (C1 and C2). Note how P2 and P4 are included after 18 seconds (not 12 seconds) because when P1 +and P3 were pushed to the relay chain for being backed, there were no other parablocks before them. ## Technical Considerations If the pace per core on the relay chain will not change (backing and inclusion every 6 seconds per -core), on the parachain side collators will need to increase the parablock production rate to push +core), on the parachain side, collators will need to increase the parablock production rate to push P1 and P2 to the two relay chain cores. Assuming a constant number of cores, from the relay chain side, elastic scaling will not see major upgrades as a parachain will use multiple existing cores instead of just one. However, from the -parachain side, collators will need to produce more parablocks per unit time, implying that -technical specifications for collators will likely increase. +parachain side, collators must produce more parablocks per unit of time, implying that technical +specifications for collators will likely increase. For more advanced technical challenges, see the [Elastic Scaling GitHub PR](https://github.com/paritytech/polkadot-sdk/issues/1829). From 0862256a08958e2a4cad117fb08867ff1e7a4e68 Mon Sep 17 00:00:00 2001 From: Filippo <110459737+filippoweb3@users.noreply.github.com> Date: Mon, 25 Mar 2024 12:07:23 +0100 Subject: [PATCH 10/15] Update docs/learn/learn-elastic-scaling.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/learn/learn-elastic-scaling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index aeb4a73f2216..ab33ba94a6bf 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -2,7 +2,7 @@ id: learn-elastic-scaling title: Polkadot's Elastic Scaling sidebar_label: Elastic Scaling -description: Pushing Parachains' Boundaries Below 6 seconds Execution Time. +description: Enabling parachains to scale on-demand through instantaneous coretime. keywords: [elastic scaling, parachains, coretime, blockspace] slug: ../learn-elastic-scaling --- From 0a656f5fa1e6c31dc8681d7720fcc4dc5ad0f64d Mon Sep 17 00:00:00 2001 From: Filippo <110459737+filippoweb3@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:16:50 +0100 Subject: [PATCH 11/15] Update docs/learn/learn-elastic-scaling.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/learn/learn-elastic-scaling.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index ab33ba94a6bf..91a4091ef4a8 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -8,10 +8,12 @@ slug: ../learn-elastic-scaling --- The path of parablocks from their creation to their inclusion into the relay chain (discussed in the -[Parachain Protocol Page](./learn-parachains-protocol.md)) span two domains: the parachain's and -relay chain's roles. Scaling the Polkadot protocol involves consideration of how parablocks are -validated, processed, secured, made available for additional checks, and finally included in the -relay chain as part of its final state +[Parachain Protocol Page](./learn-parachains-protocol.md)) spans two domains: the parachain's and +relay chain's. Scaling the Polkadot protocol involves consideration of how parablocks are produced by the +parachain and then +validated, processed, secured, made available for additional checks, and finally included on the +relay chain. + [Asynchronous backing](./learn-async-backing.md) is the first implementation of the parachain protocol that alters how parachains produce blocks and how the relay chain processes their data. From 93b46a9e2c20241db16a814cb45bdc372780c0b0 Mon Sep 17 00:00:00 2001 From: Filippo <110459737+filippoweb3@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:17:05 +0100 Subject: [PATCH 12/15] Update docs/learn/learn-elastic-scaling.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/learn/learn-elastic-scaling.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index 91a4091ef4a8..bea4238da693 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -15,10 +15,9 @@ validated, processed, secured, made available for additional checks, and finally relay chain. -[Asynchronous backing](./learn-async-backing.md) is the first implementation of the parachain -protocol that alters how parachains produce blocks and how the relay chain processes their data. -This upgrade will allow parachains to take up to 2 seconds execution time (for producing -parablocks), while the relay chain will be able to include a parablock every 6 seconds. +[Asynchronous backing](./learn-async-backing.md) is the optimization implemented on the relay chain +that allows parachains to produce blocks faster and allows relay chain to process them seamlessly. Async backing also improves the parachain side with unincluded segments and augmented info that allows collators to produce multiple parablocks even if the previous blocks are not yet included. +This upgrade allows parachains to utilize up to 2 seconds execution time per parablock, and the relay chain will be able to include a parablock every 6 seconds. With asynchronous backing enabled, parachains can theoretically produce parablocks in the sub-second time range. However, to accomplish this, asynchronous backing must temporarily **hold** blocks in From b3e9dbf1f6fe5a61476bf93d9ebff7ce658b864a Mon Sep 17 00:00:00 2001 From: Filippo <110459737+filippoweb3@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:17:14 +0100 Subject: [PATCH 13/15] Update docs/learn/learn-elastic-scaling.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/learn/learn-elastic-scaling.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index bea4238da693..9a27d2ed8bef 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -19,13 +19,10 @@ relay chain. that allows parachains to produce blocks faster and allows relay chain to process them seamlessly. Async backing also improves the parachain side with unincluded segments and augmented info that allows collators to produce multiple parablocks even if the previous blocks are not yet included. This upgrade allows parachains to utilize up to 2 seconds execution time per parablock, and the relay chain will be able to include a parablock every 6 seconds. -With asynchronous backing enabled, parachains can theoretically produce parablocks in the sub-second -time range. However, to accomplish this, asynchronous backing must temporarily **hold** blocks in -[unincluded segments](./learn-async-backing.md#unincluded-segments), while parablocks can be -included into the relay chain every 6 seconds per core. This is the bottleneck that elastic scaling -addresses. With elastic scaling, parachains can use multiple cores to include multiple parablocks +With elastic scaling, parachains can use multiple cores to include multiple parablocks within the same relay chain block. + Take, for example, a parachain that wants to submit four parablocks to the relay chain. Without elastic scaling, it will take 24 seconds to include all of them through one core. Remember that a core is occupied after backing and before inclusion, i.e., for the whole data availability process. From e645389780b9a41ab829bc681260d82230814290 Mon Sep 17 00:00:00 2001 From: Filippo <110459737+filippoweb3@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:17:22 +0100 Subject: [PATCH 14/15] Update docs/learn/learn-elastic-scaling.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/learn/learn-elastic-scaling.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index 9a27d2ed8bef..abacac4dd444 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -22,6 +22,10 @@ This upgrade allows parachains to utilize up to 2 seconds execution time per par With elastic scaling, parachains can use multiple cores to include multiple parablocks within the same relay chain block. +The relay chain receives a sequence of parachain blocks on multiple cores, which are validated and checked if all their state roots line up during their inclusion, but assume they’re unrelated parachain blocks during backing, availability, and approvals. With elastic scaling implemented, a parachain's throughput depends upon its collator infrastructure. + +The [elastic scaling implementation](https://github.com/paritytech/polkadot-sdk/issues/1829) will be rolled out in multiple phases. In the first phase, elastic scaling is set to work on parachains with a trusted/permissioned collator set. With this restriction, it is possible to launch elastic scaling without changing the candidate receipt. After successfully implementing the first phase, changes can be made to the candidate receipt so the collator set can be untrusted/permissionless again. The final phase will feature full integration with the Cumulus framework, enabling parachains to be configured to access multiple cores continuously. + Take, for example, a parachain that wants to submit four parablocks to the relay chain. Without elastic scaling, it will take 24 seconds to include all of them through one core. Remember that a From d5128aceaf8c26bb40fae380d25b82411768a073 Mon Sep 17 00:00:00 2001 From: filippoweb3 Date: Mon, 25 Mar 2024 13:45:28 +0100 Subject: [PATCH 15/15] minor edit --- docs/learn/learn-elastic-scaling.md | 39 ++++++++++++++++++----------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/docs/learn/learn-elastic-scaling.md b/docs/learn/learn-elastic-scaling.md index abacac4dd444..a704f87407fa 100644 --- a/docs/learn/learn-elastic-scaling.md +++ b/docs/learn/learn-elastic-scaling.md @@ -9,23 +9,32 @@ slug: ../learn-elastic-scaling The path of parablocks from their creation to their inclusion into the relay chain (discussed in the [Parachain Protocol Page](./learn-parachains-protocol.md)) spans two domains: the parachain's and -relay chain's. Scaling the Polkadot protocol involves consideration of how parablocks are produced by the -parachain and then -validated, processed, secured, made available for additional checks, and finally included on the -relay chain. - +relay chain's. Scaling the Polkadot protocol involves consideration of how parablocks are produced +by the parachain and then validated, processed, secured, made available for additional checks, and +finally included on the relay chain. [Asynchronous backing](./learn-async-backing.md) is the optimization implemented on the relay chain -that allows parachains to produce blocks faster and allows relay chain to process them seamlessly. Async backing also improves the parachain side with unincluded segments and augmented info that allows collators to produce multiple parablocks even if the previous blocks are not yet included. -This upgrade allows parachains to utilize up to 2 seconds execution time per parablock, and the relay chain will be able to include a parablock every 6 seconds. - -With elastic scaling, parachains can use multiple cores to include multiple parablocks -within the same relay chain block. - -The relay chain receives a sequence of parachain blocks on multiple cores, which are validated and checked if all their state roots line up during their inclusion, but assume they’re unrelated parachain blocks during backing, availability, and approvals. With elastic scaling implemented, a parachain's throughput depends upon its collator infrastructure. - -The [elastic scaling implementation](https://github.com/paritytech/polkadot-sdk/issues/1829) will be rolled out in multiple phases. In the first phase, elastic scaling is set to work on parachains with a trusted/permissioned collator set. With this restriction, it is possible to launch elastic scaling without changing the candidate receipt. After successfully implementing the first phase, changes can be made to the candidate receipt so the collator set can be untrusted/permissionless again. The final phase will feature full integration with the Cumulus framework, enabling parachains to be configured to access multiple cores continuously. - +that allows parachains to produce blocks faster and allows relay chain to process them seamlessly. +Asynchronous backing also improves the parachain side with unincluded segments and augmented info +that allows collators to produce multiple parablocks even if the previous blocks are not yet +included. This upgrade allows parachains to utilize up to 2 seconds execution time per parablock, +and the relay chain will be able to include a parablock every 6 seconds. + +With elastic scaling, parachains can use multiple cores to include multiple parablocks within the +same relay chain block. + +The relay chain receives a sequence of parachain blocks on multiple cores, which are validated and +checked if all their state roots line up during their inclusion, but assume they’re unrelated +parachain blocks during backing, availability, and approvals. With elastic scaling implemented, a +parachain's throughput depends upon its collator infrastructure. + +The [elastic scaling implementation](https://github.com/paritytech/polkadot-sdk/issues/1829) will be +rolled out in multiple phases. In the first phase, elastic scaling is set to work on parachains with +a trusted/permissioned collator set. With this restriction, it is possible to launch elastic scaling +without changing the candidate receipt. After successfully implementing the first phase, changes can +be made to the candidate receipt so the collator set can be untrusted/permissionless again. The +final phase will feature full integration with the Cumulus framework, enabling parachains to be +configured to access multiple cores continuously. Take, for example, a parachain that wants to submit four parablocks to the relay chain. Without elastic scaling, it will take 24 seconds to include all of them through one core. Remember that a