Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add beta testnet genesis #8

Merged
merged 7 commits into from
Nov 20, 2024
Merged

add beta testnet genesis #8

merged 7 commits into from
Nov 20, 2024

Conversation

okdas
Copy link
Member

@okdas okdas commented Nov 19, 2024

Used the following config.yml, plus authz authorizations.

version: 1
build:
  main: cmd/poktrolld
accounts:
  - name: pnf
    address: pokt1f0c9y7mahf2ya8tymy8g4rr75ezh3pkklu4c3e
    coins:
      - 69420000000upokt
  - name: validator1
    coins:
      - 1000000001000000upokt
  - name: validator2
    coins:
      - 1000000001000000upokt
  - name: validator3
    coins:
      - 1000000001000000upokt
  - name: validator4
    coins:
      - 1000000001000000upokt
  - name: validator5
    coins:
      - 1000000001000000upokt
  - name: faucet
    coins:
      - 9999999999999999999999999999999999999999999999999999999999999999upokt
client:
  typescript:
    path: ts-client
  hooks:
    path: react/src/hooks
  openapi:
    path: docs/static/openapi.yml
validators:
  # Multi-validator support is ready but not released yet https://github.com/ignite/cli/issues/4374, https://github.com/ignite/cli/pull/4409#issue-2659096643
  - name: validator1
    bonded: 1000000000000000upokt
    app:
      telemetry:
        enabled: true
        prometheus-retention-time: "1800" # seconds
    config:
      moniker: "validator1"
      consensus:
        timeout_commit: "300s"
        timeout_propose: "300s"
      instrumentation:
        prometheus: true
      log_level: "info"
    client:
      chain-id: pocket-beta

# We can persist arbitrary genesis values via 1 to 1 mapping to genesis.json
genesis:
  app_state:
    # https://docs.cosmos.network/main/build/modules/mint
    mint:
      params:
        mint_denom: upokt
        # Note that in Pocket Network, the majority of the inflation/deflation
        # comes from the utility of network, not just the validators that
        # secure it. Therefore, the inflation params of x/mint are set to 0.
        # See x/tokenomics for all details related to token inflation.
        inflation_rate_change: "0.0"
        inflation_max: "0.0"
        inflation_min: "0.0"
        # These parameters are included for posterity but commented out for clarity
        # goal_bonded: "NA"
        # blocks_per_year: "NA"
        # max_supply: "NA"
    staking:
      params:
        bond_denom: upokt
        # TODO_BETA(@okdas): Update this to 10 for Beta TestNet.
        max_validators: 10
    crisis:
      constant_fee:
        amount: "10000"
        denom: upokt
    gov:
      params:
        min_deposit:
          - amount: "10000"
            denom: upokt
    application:
      params:
        max_delegated_gateways: "7"
        min_stake:
          # TODO_BETA(@bryanchriswhite): Determine realistic amount for minimum application stake amount.
          amount: "100000000" # 100 POKT
          denom: upokt
      applicationList: []
    supplier:
      params:
        # TODO_BETA(@bryanchriswhite): Determine realistic amount for minimum gateway stake amount.
        min_stake:
          amount: "1000000" # 1 POKT
          denom: upokt
      supplierList: []
    gateway:
      params:
        # TODO_BETA(@bryanchriswhite): Determine realistic amount for minimum gateway stake amount.
        min_stake:
          amount: "1000000" # 1 POKT
          denom: upokt
      gatewayList: []
    service:
      params:
        add_service_fee:
          amount: "1000000000"
          denom: upokt
      serviceList: []
    proof:
      params:
        proof_request_probability: "0.25"
        proof_requirement_threshold:
          amount: "20000000"
          denom: upokt
        proof_missing_penalty:
          amount: "320000000"
          denom: upokt
        proof_submission_fee:
          amount: "1000000"
          denom: upokt
    session:
      params:
        num_suppliers_per_session: 15
    tokenomics:
      params:
        mint_allocation_percentages:
          dao: 0.1
          proposer: 0.05
          supplier: 0.7
          source_owner: 0.15
          application: 0.0
        # The dao reward address SHOULD match that of the "pnf" below (i.e. `make poktrolld_addr ACC_NAME=pnf`).
        # This is the address that will receive the dao/foundation rewards during claim settlement (global mint TLM).
        # TODO_MAINNET(@olshansk): Consolidate the usage of DAO/PNF throughout the configs & codebase.
        dao_reward_address: "pokt1f0c9y7mahf2ya8tymy8g4rr75ezh3pkklu4c3e"
    shared:
      params:
        num_blocks_per_session: 10
        grace_period_end_offset_blocks: 1
        claim_window_open_offset_blocks: 1
        claim_window_close_offset_blocks: 4
        proof_window_open_offset_blocks: 0
        proof_window_close_offset_blocks: 4
        supplier_unbonding_period_sessions: 1
        application_unbonding_period_sessions: 1
        compute_units_to_tokens_multiplier: 42

shannon/testnet/genesis.json Outdated Show resolved Hide resolved
"app_state": {
"application": {
"applicationList": [],
"application_list": [],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is interesting. We only have applicationList in the original config.yml. Don't know where application_list is coming from here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change applicationList to application_list in config.yml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto for all other camel cased configs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel comfortable changing this right now.

  • Not all modules have repeating fields (in different cases) and I don't know why
  • The code might expect a particular field - and I need to understand which one before removing another
  • Missing field might cause an issue
  • This can be removed with an upgrade in the future if necessary

@Olshansk Olshansk self-requested a review November 19, 2024 23:18
@Olshansk Olshansk added the documentation Improvements or additions to documentation label Nov 19, 2024
shannon/testnet/client.toml Outdated Show resolved Hide resolved
@@ -0,0 +1,5 @@
broadcast-mode = "sync"
chain-id = "poktroll"
keyring-backend = "test"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on renaming this to beta?

Sounds cool but I'm afraid it'll force us to change all our docs. If my assumption is correct, let's leave it as is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing keyring backend indeed will require us changing the docs (even replacing it with file like morse). I'm not sure if we should do it.

  1. Regular users won't care as they use different wallets;
  2. Production deployments will opt in to use a different backend: https://docs.cosmos.network/main/user/run-node/keyring#the-pass-backend

shannon/testnet/genesis.json Show resolved Hide resolved
shannon/testnet/genesis.json Outdated Show resolved Hide resolved
shannon/testnet/genesis.json Outdated Show resolved Hide resolved
"inflation": "0.130000000000000000"
},
"params": {
"blocks_per_year": "6311520",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what's our current block time?

Copy link
Member Author

@okdas okdas Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know where that number comes from or if it is used at all.

Block times are specified in validator configuration files. Currently 300s.

6311520 blocks per year is ~= 5s/block:
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this is mint module. I suppose this is used to reward validators. IIRC, we're not going to inflate the network with validator rewards, only with relay service.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nuanced answer. You're both right & wrong at the same time but we'll cover that offline.

@okdas
Copy link
Member Author

okdas commented Nov 20, 2024

@Olshansk updated ReadMe and rolled back the chain-id to poktroll. I want to investigate why I wasn't able to change it in the genesis file - I think it'll take longer to find that out.

@Olshansk
Copy link
Member

updated ReadMe and rolled back the chain-id to poktroll. I want to investigate why I wasn't able to change it in the genesis file - I think it'll take longer to find that out.

For posterity

Screenshot 2024-11-20 at 10 52 58 AM

@Olshansk
Copy link
Member

@okdas I'm creating [1] to keep track of this.

[1] pokt-network/poktroll#938

@okdas okdas merged commit b8027ce into master Nov 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants