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

ABI error in fio.address, "domains" table: wrong type for "expiration" #71

Closed
cc32d9 opened this issue Apr 10, 2020 · 8 comments · Fixed by #78
Closed

ABI error in fio.address, "domains" table: wrong type for "expiration" #71

cc32d9 opened this issue Apr 10, 2020 · 8 comments · Fixed by #78
Assignees
Labels
bug Something isn't working

Comments

@cc32d9
Copy link
Contributor

cc32d9 commented Apr 10, 2020

Current ABI returns uint32 for expiration field in "domains" table, but the contract defines it as uint64. This breaks decoding of domains in state history.

    },{
      "name": "domain",
      "base": "",
      "fields": [{
          "name": "id",
          "type": "uint64"
        },{
          "name": "name",
          "type": "string"
        },{
          "name": "domainhash",
          "type": "uint128"
        },{
          "name": "account",
          "type": "name"
        },{
          "name": "is_public",
          "type": "uint8"
        },{
          "name": "expiration",
          "type": "uint32"
        }
      ]
    },{
@0xCasey
Copy link
Member

0xCasey commented Apr 10, 2020

The appropriate type should be uint64. This should not break the contract or cause a table migration post change. @ericbutz might want to move this to 1.1 tasks.

@0xCasey 0xCasey added the bug Something isn't working label Apr 10, 2020
@cc32d9
Copy link
Contributor Author

cc32d9 commented Apr 10, 2020

it breaks the decoding of state history, so data analysis becomes difficult

@ericbutz
Copy link
Contributor

We are doing other ABI updates for the next version. Included this in the list.

@adsorptionenthalpy
Copy link
Member

Performed some local tests, setting new abi had no negative impact operation wise. Can continue to register and read domains from table. Concerns regarding decoding state history remain and needs further discussion.

@ericbutz ericbutz added this to the v1.1.0 milestone May 5, 2020
@ericbutz
Copy link
Contributor

ericbutz commented May 6, 2020

Resolved by #78

@ericbutz ericbutz closed this as completed May 6, 2020
@ericbutz ericbutz modified the milestones: v2.0, Contracts v2.1 Jul 29, 2020
@ericbutz
Copy link
Contributor

ericbutz commented Aug 6, 2020

Updating to uint64 broke the setcode for the system contracts. Need to troubleshoot this. Reopening.

@ericbutz ericbutz reopened this Aug 6, 2020
@ericbutz ericbutz removed this from the Contracts v2.1 milestone Aug 6, 2020
@adsorptionenthalpy
Copy link
Member

Updates: No issues are apparent when spinning up a new blockchain with these contracts.
When testing in devnet @dapixcasey found changing the domain expiration abi type to 64 can result in domain table read failures from the system contract voting.cpp. uint32_t value appears to be used instead of uint64_t and changing the domain expiration type and setting the abi on a live state would require multiple table migrations.

@ericbutz
Copy link
Contributor

@ericbutz ericbutz added this to the Contracts v2.1 milestone Oct 12, 2020
misterleet pushed a commit that referenced this issue Jul 15, 2022
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
None yet
Development

Successfully merging a pull request may close this issue.

4 participants