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

API returns wrong control keys data after subnet ownership transfer #3012

Closed
jpop32 opened this issue May 10, 2024 · 0 comments · Fixed by #3054
Closed

API returns wrong control keys data after subnet ownership transfer #3012

jpop32 opened this issue May 10, 2024 · 0 comments · Fixed by #3054
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jpop32
Copy link
Contributor

jpop32 commented May 10, 2024

Describe the bug
When subnet ownership has been transferred over, platform.getSubnets() API call shows the old data unless selecting for the subent specifically using the ids param.

To Reproduce
Curl-ing with a payload of:

{
    "jsonrpc": "2.0",
    "method": "platform.getSubnets",
    "params": {},
    "id": 1
}

gives the list of all the subnets, among others it has:

            {
                "id": "HDHyjxQi3fnMDmuEGZzEx33rbGe6Yz1dz2WGgEit6jEuTbxdj",
                "controlKeys": [
                    "P-fuji1ywzvrftfqexh5g6qa9zyrytj6pqdfetza2hqln"
                ],
                "threshold": "1"
            },

But calling with

{
    "jsonrpc": "2.0",
    "method": "platform.getSubnets",
    "params": {"ids":["HDHyjxQi3fnMDmuEGZzEx33rbGe6Yz1dz2WGgEit6jEuTbxdj"]},
    "id": 1
}

returns the correct control key:

            {
                "id": "HDHyjxQi3fnMDmuEGZzEx33rbGe6Yz1dz2WGgEit6jEuTbxdj",
                "controlKeys": [
                    "P-fuji1mlhaxu92c5p57ce56trsc7eha6cflh20cfy4gn"
                ],
                "threshold": "1"
            }

Expected behavior
The API call should return the correct data in both cases.

Operating System
Node running on Ubuntu. Version info:

{
    "jsonrpc": "2.0",
    "result": {
        "version": "avalanchego/1.11.4",
        "databaseVersion": "v1.4.5",
        "rpcProtocolVersion": "35",
        "gitCommit": "e8904ae11aa144ae601bb9795682d11c3fb178ee",
        "vmVersions": {
            "avm": "v1.11.4",
            "evm": "v0.13.2",
            "platform": "v1.11.4"
        }
    },
    "id": 1
}
@jpop32 jpop32 added the bug Something isn't working label May 10, 2024
@dhrubabasu dhrubabasu self-assigned this May 28, 2024
@dhrubabasu dhrubabasu moved this from Backlog 🗄️ to Researching 📚 in Platform Engineering Group May 28, 2024
@dhrubabasu dhrubabasu moved this from Researching 📚 to In Progress 🏗 in Platform Engineering Group May 28, 2024
@dhrubabasu dhrubabasu added this to the v1.11.7 milestone May 28, 2024
@github-project-automation github-project-automation bot moved this from In Progress 🏗 to Done ✅ in Platform Engineering Group May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants