PUP-33: Scale Parameters And Capacity for Evolution (SPACE)

Attributes

Table of Contents

  • [1. Summary / Abstract]
  • [2. Motivation / Rationale]
    • [2.1 Block Size Update]
    • [2.2 Minimum Number of Proofs Update]
  • [3. Dissenting Opinions]
    • [3.1 Updating Other Parameters]
    • [3.2 Cost of increasing BlockByteSize]
    • [3.3 Impact of Increasing MinimumNumberOfProofs]
    • [3.4 TradeOff Table]
  • [4. Analysis]

1. Summary / Abstract

tl;dr We need to Make SPACE on Morse while Shannon is cooking.

This proposal recommends updating two on-chain parameters to enable the Pocket Network protocol to scale and support more Gateways & more Chains / Services prior to Shannon’s launch.

2. Motivation / Rationale

tl;dr Increasing available block space and lowering usage of existing block space makes room for gateways and chains.

The next major rewrite & upgrade of the Pocket Network Protocol (Shannon) will have the technical capacity to scale and account for more relays, more gateways and more chains/services. Until the release & migration is complete, the current version of the Protocol (Morse) continues to support, grow and evolve the largest network of decentralized RPC providers.

The following two opportunities are currently limited by existing block space and its usage:

  1. Onboarding new gateways
  2. Adding more new chains/services

This is a result of the amount of space used by on-chain proofs. Every unique (Application, Node, Chain) set within every session requires an on-chain Claim & Proof.

Shannon development timelines should not hinder the opportunity and growth of the Pocket Network ecosystem. Therefore, we recommend updates to two parameters.

2.1 Block Size Update

tl;dr Bigger block → More space on-chain sessions

The block size will be updated from 8MB to 16MB. It will be held at 12MB for a month in between to avoid a potential shock to the system and allow node operators to upgrade their infrastructure.

This creates more space for more on-chain sessions to exist, enabling more Gateways & more Services.

2.2 Minimum Number of Proofs Update

tl;dr More proofs required → Lower number of on-chain sessions

The minimum number of proofs (i.e. relays) per session for a node to claim their work will increase.

This will reduce the usage of existing block space by requiring sufficient (i.e. above a minimum threshold) relay volume to be handled by a node before it’s session is stored & rewarded on-chain.

3. Dissenting Opinions

3.1 Updating Other Parameters

Updating pocketcore/SessionNodeCount or pocketCore/MaximumChains was also considered and discussed. However, changing these values has implications on gateways, node operators, tokenomics and other factors other than just the scalability of the protocol.

Updating other parameters can still be discussed but is out of scope given the short-term priority of resolving the Motivation & Rationale for this proposal.

3.2 Cost of increasing BlockByteSize

Increasing the block size will impact the cost of maintaining Pocket Nodes for gateways and node runners.

However, given the long block times (15 minutes) and small blocks (16MB), Pocket remains one of the cheapest and simplest blockchains to maintain. It should not have a prohibitive impact on capital expenditures for node runners.

3.3 Impact of Increasing MinimumNumberOfProofs

This has a negative impact on two accounts:

  1. A small fraction of existing sessions will no longer be rewarded
  2. New/small/niche chains with very low relay volume may lead to node consolidation

The response to this is:

  1. The value selected is worth the tradeoff of growing the network while minimizing the impact on node ROI.
  2. Consolidation of such low-volume chains is worth the tradeoff and will rebalance once traffic increases.

3.4 TradeOff Table

The following table captures a summary of the pros, cons & nuances.

On-Chain Parameter Pros Cons Nuances Additional Context
Block Size pocketcore/BlockByteSize Enables the ability to handle more on-chain Sessions, enabling more Gateways & more Chains Costs for every supplier (i.e. node runner) will increase Introduces overhead to communicate new resource requirements 20MB blocks were tested on TestNet when the upgrade from 4MB to 8MB took places
# of Relays Per Session pocketcore/MinimumNumberOfProofs Reduces the number of on-chain Sessions, enabling more Gateways & more Chains Rewards and relays for low-volume chains decrease Could affect tokenomics if the number becomes too high. See the amazing data & analysis from @Ramiro Rodríguez Colmeiro above
# Nodes Per Session pocketcore/SessionNodeCount skipped skipped Out of scope given the requirements of this discussion since it impacts one or more of QoS, decentralization & tokenomics A new forum thread should be started for this discussion.
Max Chains pocketCore/MaximumChains skipped skipped Out of scope given the requirements of this discussion since it impacts one or more of QoS, decentralization & tokenomics A new forum thread should be started for this discussion.

4. Analysis

@RawthiL collected, analyzed and shared extensive data in the following discussion forum:

The takeaways from this data include:

  1. State & block size is increasing, but at a reasonable pace
  2. The impact on sessions that will no longer make it on-chain will be minimal

540f856bfe15226e4246b7fee19c596ec46fa4b7_2_650x500


e90d61abf8aa7b750a56b7e29667a258bcc23f52_2_682x499

Copyright

Copyright and related rights waived via CC0.

7 Likes

Are we ready to vote this?

3 Likes

@JackALaing Can we move this to a vote?

2 Likes

PUP-33 is now up for a vote :point_right: Snapshot

3 Likes

Nodies currently holds 20 app stakes staked into 5 chains, each 20M each per session (the other 6 we have are unused). Assuming best case scenario (or rather worst case scenario for block space) for our gateway, we take up 2MB of block space and have access to upwards to 9.6B relays a day assuming uniform distribution of traffic. (20M * 20 * 24). Obviously, the best case scenario is likely not to happen as our traffic is not uniform and not every node operator will be effective in a session. But it does give us a better general idea.

The other gateway operators that are coming onboard are expected to adopt the gateway server which will exhibit the same behaviors that Nodies gateway is showing on chain. With this, we should be able to scale upwards to roughly 3-4 more gateway (2MB each) operators if they have the same traffic patterns as us based off @RawthiL research

I support this proposal. Thanks everyone for the analysis and help

6 Likes

The proposal has been approved so moving on to next steps.

  1. @JackALaing When can PNF enable this on behalf of the DAO?

  2. @RawthiL Is there an easy way to reproduce the data collection you did in here so we can keep track of “small sessions that go unrewarded”?

The other gateway operators that are coming onboard are expected to adopt the gateway server which will exhibit the same behaviors that Nodies gateway is showing on chain.

  1. @Andy-Liquify Wanted to double check that you plan to adopt gateway-server as stated?

Nodies currently holds 20 app stakes staked into 5 chains, each 20M each per session (the other 6 we have are unused)

4.1 @poktblade Are the app stakes owned by nodies public? If so, could you share them?
4.2 @RawthiL Is it possible to filter by “app stake” on potkscan? If so, could you link to it.

1 Like

We can execute the parameter change transactions today or tomorrow. I am guessing tomorrow morning would be best to allow for time to monitor the impact of the change during working hours?

1 Like

The sessions with less than 500 relays will be invisible, they will never reach the block.
Gateways are the only ones that will have visibility on that (if they track their relays off-chain).

You mean get the number of relays on an arbitrary selection of apps? No, we don’t have that feature right now. Gateways relays are calculated during sync using the apps assigned to each gateway.
What you can get is the total and avg relays in the last 24 Hs of any app by means of the table filter. Just filter by an app address and see the values at the bottom of the table. However we do not support selection of arbitrary app lists (asking to add this right now).

Let me answer this and @poktblade please verify.
Apps owners can be seen on POKTscan, you can sort them by gateway:
https://poktscan.com/explore?tab=apps


Keep in mind that the gateway label is manually asigned by us, given the lists provided by PNF. If any gateway finds that there is an error with that list, they need to talk to PNF so we can get the correct list (we wont change it if a gateway asks us because PNF uses that to charge gateways).

3 Likes