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

[v0.11 feature] Per-chain Relays To Token Multiplier #1580

Merged
merged 5 commits into from
Dec 15, 2023
Merged

Commits on Sep 2, 2023

  1. Configuration menu
    Copy the full SHA
    d215121 View commit details
    Browse the repository at this point in the history
  2. Part 2 - MinSignedPerWindow() should return the parameter value

    The parameter `pos/MinSignedPerWindow` defines a proportion, but the function
    `MinSignedPerWindow` returns the number of blocks, calculated as
    `pos/MinSignedPerWindow * pos/SignedBlocksWindow`.  This is confusing.
    
    To resolve this discrepancy, we had "custom logic" to convert the return value
    back to the parameter value.  This is unnecessary calculation.
    
    There was indeed a bug in `PosKeeper.GetParams` that returned the return
    value from `k.MinSignedPerWindow(ctx)` without the "custom logic".  As a
    result, the value of `min_signed_per_window` in the response from
    /v1/query/nodeparams was always wrong.
    
    To remove this confusing design, this patch does:
    - Rename the function `MinSignedPerWindow` to `MinBlocksSignedPerWindow`
    - Add a new `MinSignedPerWindow` function returning the exact parameter value
      in decimal as the other parameter getter functions do
    kinesis-agent authored and msmania committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    9a11177 View commit details
    Browse the repository at this point in the history
  3. Part 3 - Correct the condition to write additional parameters

    The function `SetParamSet` writes parameters to application db,
    where we have a special logic to prevent parameters introduced
    after genesis from being written in blocks before those parameters
    are introduced.
    
    However, using `IsOnUpgradeHeight` in this logic is wrong because
    all post-genesis parameters we have are activated by a feature name,
    not when the protocol version is upgraded.  As a result, we had
    never exercised this logic.  This didn't cause any real problem yet
    because we never call `SetParamSet` for post-genesis parameters
    before they're introduced.
    
    We should do the right thing before this bug causes problems in the
    future.
    kinesis-agent authored and msmania committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    6f2c369 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2023

  1. Part 4 - Per-chain RTTM

    kinesis-agent authored and msmania committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    0bd97f7 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. address comments

    msmania committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    78971e9 View commit details
    Browse the repository at this point in the history