stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 667 forks source link

Mocknet block limits #4890

Open wileyj opened 3 months ago

wileyj commented 3 months ago

Is there still a benefit from having large block limits for mocknet, compared to testnet/mainnet? I anticipate it can lead to some strange behaviour where a contract may be valid on mocknet, but rejected on testnet/mocknet.

Proposed change: use the same limits as testnet/mainnet for mocknet (or even have it configurable for mocknet only)

current block limits in mocknet:

    {
      "epoch_id": "Epoch25",
      "start_height": 6,
      "end_height": 9223372036854776000,
      "block_limit": {
        "write_length": 18446744073709552000,
        "write_count": 18446744073709552000,
        "read_length": 18446744073709552000,
        "read_count": 18446744073709552000,
        "runtime": 18446744073709552000
      },
      "network_epoch": 10
    }

compared to mainnet:

      {
      "epoch_id": "Epoch25",
      "start_height": 840360,
      "end_height": 2000000,
      "block_limit": {
        "write_length": 15000000,
        "write_count": 15000,
        "read_length": 100000000,
        "read_count": 15000,
        "runtime": 5000000000
      },
      "network_epoch": 10
    },
jcnelson commented 3 months ago

I'd be in favor of making them the same as mainnet

On Tue, Jun 18, 2024, 10:24 AM wileyj @.***> wrote:

Is there still a benefit from having large block limits for mocknet, compared to testnet/mainnet? I anticipate it can lead to some strange behaviour where a contract may be valid on mocknet, but rejected on testnet/mocknet.

Proposed change: use the same limits as testnet/mainnet for mocknet (or even have it configurable for mocknet only)

current block limits in mocknet:

{
  "epoch_id": "Epoch25",
  "start_height": 6,
  "end_height": 9223372036854776000,
  "block_limit": {
    "write_length": 18446744073709552000,
    "write_count": 18446744073709552000,
    "read_length": 18446744073709552000,
    "read_count": 18446744073709552000,
    "runtime": 18446744073709552000
  },
  "network_epoch": 10
}

compared to mainnet:

{
"epoch_id": "Epoch25",
"start_height": 840360,
"end_height": 2000000,
"block_limit": {
  "write_length": 15000000,
  "write_count": 15000,
  "read_length": 100000000,
  "read_count": 15000,
  "runtime": 5000000000
},
"network_epoch": 10

},

— Reply to this email directly, view it on GitHub https://github.com/stacks-network/stacks-core/issues/4890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQJK6E2DQOXIIY6DVGOBLZIA7IHAVCNFSM6AAAAABJQE6JKCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TSOJZHAZDEMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

wileyj commented 3 months ago
  1. mocknet should start at epoch 2.5
  2. should mocknet be deprecated? is the more pertinent question to ask here, since mocknet is not compatible with nakamoto.