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

Support json parsing of epoch-rewards partition data sysvar accounts #34914

Merged

Conversation

CriesofCarrots
Copy link
Contributor

Problem

New epoch rewards partition-data sysvars aren't parsed, even though all the other accounts owned by Sysvar1111111111111111111111111111111111111 are.

Summary of Changes

Implement parsing

$ curl  -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["FdAGcHUFksSVgNj5ihPaddMet3cuuFwJsxkG6ZXVA4Ly", {"encoding":"jsonParsed","commitment":"confirmed"}]}' 127.0.0.1:8899 | jq
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "apiVersion": "1.18.0",
      "slot": 831
    },
    "value": {
      "data": {
        "parsed": {
          "info": {
            "numPartitions": 18,
            "parentBlockhash": "8m6GQ3auZGBMKsqcShxSqzUhuUpATJmXbbn3FqKYFdQp",
            "version": 0
          },
          "type": "epochRewardsPartitionData"
        },
        "program": "sysvar",
        "space": 44
      },
      "executable": false,
      "lamports": 1197120,
      "owner": "Sysvar1111111111111111111111111111111111111",
      "rentEpoch": 0,
      "space": 44
    }
  },
  "id": 1
}

Fixes #

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (e74f04a) 81.6% compared to head (ae187cd) 81.6%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34914     +/-   ##
=========================================
- Coverage    81.6%    81.6%   -0.1%     
=========================================
  Files         827      827             
  Lines      223846   223859     +13     
=========================================
- Hits       182823   182807     -16     
- Misses      41023    41052     +29     

@CriesofCarrots CriesofCarrots added the v1.18 PRs that should be backported to v1.18 label Jan 24, 2024
Copy link
Contributor

mergify bot commented Jan 24, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

@CriesofCarrots CriesofCarrots merged commit b9947bd into solana-labs:master Jan 24, 2024
36 checks passed
mergify bot pushed a commit that referenced this pull request Jan 24, 2024
mergify bot added a commit that referenced this pull request Jan 24, 2024
…counts (backport of #34914) (#34926)

Support json parsing of epoch-rewards partition data sysvar accounts (#34914)

(cherry picked from commit b9947bd)

Co-authored-by: Tyera <tyera@solana.com>
CriesofCarrots added a commit to CriesofCarrots/solana that referenced this pull request Feb 2, 2024
CriesofCarrots added a commit that referenced this pull request Feb 6, 2024
mergify bot pushed a commit that referenced this pull request Feb 6, 2024
…ccounts (#34914)"

This reverts commit b9947bd.

(cherry picked from commit e76da4a)
CriesofCarrots added a commit that referenced this pull request Feb 7, 2024
…ccounts (#34914)"

This reverts commit b9947bd.

(cherry picked from commit e76da4a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.18 PRs that should be backported to v1.18
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants