eos
eos copied to clipboard
renamed table deltas in 2.1 break all backward compatibility
This patch is renaming table deltas in the ABI for no apparent reason. This breaks compatibility with all state history readers, and makes no sense.
https://github.com/EOSIO/eos/commit/d71569a15a881f03793534ba84a0f20b3f1998f7
This change must be reverted:
"tables": [
{ "name": "account", "type": "account", "key_names": ["name"] },
- { "name": "account_metadata", "type": "account_metadata", "key_names": ["name"] },
+ { "name": "actmetadata", "type": "account_metadata", "key_names": ["name"] },
{ "name": "code", "type": "code", "key_names": ["vm_type", "vm_version", "code_hash"] },
- { "name": "contract_table", "type": "contract_table", "key_names": ["code", "scope", "table"] },
- { "name": "contract_row", "type": "contract_row", "key_names": ["code", "scope", "table", "primary_key"] },
- { "name": "contract_index64", "type": "contract_index64", "key_names": ["code", "scope", "table", "primary_key"] },
- { "name": "contract_index128", "type": "contract_index128", "key_names": ["code", "scope", "table", "primary_key"] },
- { "name": "contract_index256", "type": "contract_index256", "key_names": ["code", "scope", "table", "primary_key"] },
- { "name": "contract_index_double", "type": "contract_index_double", "key_names": ["code", "scope", "table", "primary_key"] },
- { "name": "contract_index_long_double", "type": "contract_index_long_double", "key_names": ["code", "scope", "table", "primary_key"] },
- { "name": "key_value", "type": "key_value", "key_names": ["database", "contract", "key"] },
- { "name": "global_property", "type": "global_property", "key_names": [] },
- { "name": "generated_transaction", "type": "generated_transaction", "key_names": ["sender", "sender_id"] },
- { "name": "protocol_state", "type": "protocol_state", "key_names": [] },
+ { "name": "contracttbl", "type": "contract_table", "key_names": ["code", "scope", "table"] },
+ { "name": "contractrow", "type": "contract_row", "key_names": ["code", "scope", "table", "primary_key"] },
+ { "name": "cntrctidx1", "type": "contract_index64", "key_names": ["code", "scope", "table", "primary_key"] },
+ { "name": "cntrctidx2", "type": "contract_index128", "key_names": ["code", "scope", "table", "primary_key"] },
+ { "name": "cntrctidx3", "type": "contract_index256", "key_names": ["code", "scope", "table", "primary_key"] },
+ { "name": "cntrctidx4", "type": "contract_index_double", "key_names": ["code", "scope", "table", "primary_key"] },
+ { "name": "cntrctidx5", "type": "contract_index_long_double", "key_names": ["code", "scope", "table", "primary_key"] },
+ { "name": "keyvalue", "type": "key_value", "key_names": ["database", "contract", "key"] },
+ { "name": "global.pty", "type": "global_property", "key_names": [] },
+ { "name": "generatedtrx", "type": "generated_transaction", "key_names": ["sender", "sender_id"] },
+ { "name": "protocolst", "type": "protocol_state", "key_names": [] },
{ "name": "permission", "type": "permission", "key_names": ["owner", "name"] },
- { "name": "permission_link", "type": "permission_link", "key_names": ["account", "code", "message_type"] },
- { "name": "resource_limits", "type": "resource_limits", "key_names": ["owner"] },
- { "name": "resource_usage", "type": "resource_usage", "key_names": ["owner"] },
- { "name": "resource_limits_state", "type": "resource_limits_state", "key_names": [] },
- { "name": "resource_limits_config", "type": "resource_limits_config", "key_names": [] }
+ { "name": "permlink", "type": "permission_link", "key_names": ["account", "code", "message_type"] },
+ { "name": "rsclimits", "type": "resource_limits", "key_names": ["owner"] },
+ { "name": "rscusage", "type": "resource_usage", "key_names": ["owner"] },
+ { "name": "rsclimitsst", "type": "resource_limits_state", "key_names": [] },
+ { "name": "rsclimitscfg", "type": "resource_limits_config", "key_names": [] }
]
})";
Note for people upgrading ship clients:
- Some things were renamed from foo to foo_v0, and the new versions are labeled _v1 or _v2
- Some things were renamed from foo to foo_v0, and the new versions don't have the version suffix, potentially causing confusion
what a bullshit ... please revert.
This change was because the field was defined as eosio::name in abieos library in the first place. In order to consume the abi through abieos library, we needed to change either ship abi json or abieos library. At that time, we decided to change ship abi json.
Unfortunately, we have already publish this change to 2.1 release version, revert it back might cause issue to some other people. The easiest way is to upgrade your ship client to use the type field instead of name field because the values of name and type are exactly the same in version 2.0.x and the values of type field are not changed in version 2.1.x and above.
This change was because the field was defined as eosio::name in abieos library in the first place. In order to consume the abi through abieos library, we needed to change either ship abi json or abieos library. At that time, we decided to change ship abi json.
Unfortunately, we have already publish this change to 2.1 release version, revert it back might cause issue to some other people. The easiest way is to upgrade your ship client to use the
typefield instead ofnamefield because the values ofnameandtypeare exactly the same in version 2.0.x and the values oftypefield are not changed in version 2.1.x and above.
If the reason not to revert is "revert it back might cause issue to some other people because it's part of 2.1.x", I'm pretty sure there are fewer solutions relying on 2.1.x than on previous versions so reverting it probably is the lesser of two evils.