FIO Chain Issue: Exception on some chain transactions
5 months ago by FIO Protocol
Discovery date | Severity | Estimated impact | Status |
---|---|---|---|
2024-07-12 | LOW | Multiple accounts | RESOLVED |
Issue Description
The following bug has been observed on Mainnet and was introduced with FIO Contracts release 2.10.
In certain situations, the chain will not accept a properly formatted transaction and will return server error 500. Observed conditions required for the error condition to be triggered:
- Account was never sent any FIO Tokens. If account receives tokens then sent them out and now has 0 balance, error will not be triggered.
- The transaction can be paid for using bundled transactions, such as add_pub_address.
- Transaction contains a TPID which is a proxy. If a valid TPID is supplied that is not a proxy, error will not be triggered.
Example server response
{
code: 500,
message: 'Internal Service Error - (fc)',
error: {
code: 3050003,
name: 'eosio_assert_message_exception',
what: 'eosio_assert_message assertion failure',
details: [
{
message: 'assertion failure with message: unable to find key',
file: 'wasm_interface.cpp',
line_number: 1041,
method: 'eosio_assert'
},
{
message: 'pending console output: ',
file: 'apply_context.cpp',
line_number: 137,
method: 'exec_one'
}
]
}
},
errorCode: 500,
requestParams: {
baseUrl: 'https://fio.blockpane.com/v1/',
endPoint: 'chain/push_transaction',
body: '{"signatures":["SIG_K1_K6yPFCzYeRG5RwDowYUh8iGsTrwDNdUY4dsW3uHodU3fFPevWRRUgsbmpdy89CxfkxZEjuTeqkuRdKoqS8rsu9ndjMqtJ8"],"compression":0,"packed_context_free_data":"","packed_trx":"5686916615401ad1b8180000000001003056372503a85b0000c6eaa664523201c0b95f5e11f9ee8700000000a8ed3232510b706d7561743140656467650103425443034254431e3432333432323334323334343233343233343233343233343233343233340000000000000000c0b95f5e11f9ee870c66696e616e6365406564676500"}',
fetchOptions: undefined
}
}
Impact of Issue
If an integrator is supplying a TPID which is registered as a proxy and the account never had any tokens every transaction attempting to utilize bundled transactions will fail.
Recommended Course of Action
Affected integrators are encouraged to remove TPID from all transactions by accounts which have a 0 balance.
Example request before change
{
fio_address: 'myhandle@hodl',
public_addresses: [
{
chain_code: 'BTC',
token_code: 'BTC',
public_address: '123456789123456789123456789123456789'
}
],
max_fee: 0,
tpid: 'tpid@hodl',
actor: 'accountname'
}
Example request after change
{
fio_address: 'myhandle@hodl',
public_addresses: [
{
chain_code: 'BTC',
token_code: 'BTC',
public_address: '123456789123456789123456789123456789'
}
],
max_fee: 0,
tpid: '',
actor: 'accountname'
}
Issue Resolution
This issue was resolved in FIO Chain Release 2.11.