Closed 4miners closed 5 years ago
2.0.0
nodeThe issue is back:
11:41:58.784Z INFO lisk-framework: Block 15910358440661876618 loaded from the network height: 19
11:41:58.787Z DEBUG lisk-framework:
Block processing failed { id: '16924785937353391122',
err:
'Transaction: 6536698525891138804 failed at .multisignature.keysgroup: \'.multisignature.keysgroup\' should NOT have fewer than 1 items',
module: 'blocks',
block:
{ id: '16924785937353391122',
version: 1,
timestamp: 97979230,
height: 20,
previousBlock: '15910358440661876618',
numberOfTransactions: 1,
totalAmount: 0,
totalFee: 1500000000,
reward: 0,
payloadLength: 249,
payloadHash:
'f4948f27ad04b75afefda6eac4b35e15c058c11834d410330b8ce89313502d06',
generatorPublicKey:
'03e811dda4f51323ac712cd12299410830d655ddffb104f2c9974d90bf8c583a',
generatorId: '11506830473925742632L',
blockSignature:
'40c13f018eb570716dc91c3075821657510682e52f04ca7dd2d0810732510edee6251101afb7d500541af8aca25d1fc66c185771f6a4d3419f8c8227d3da8e04',
confirmations: 0,
totalForged: '1500000000',
transactions: [ [MultisignatureTransaction] ] } }
Transaction: http://jenkinsnet-19-seed-01.liskdev.net:6040/tx/6536698525891138804
Sync with the network that have multisignature creation transaction (type 4).
release/2.0.0
We receive a response from a 1.6.0
peer in following format:
m_keysgroup:
[ '+bded9e57535342cb833f6cd1186d3719a185c6258ce41dd70de5dc95aa6a43c9',
'+8b6ba7434a7d3d327cacd9fadc04d70f465ae3559d8a4a55f17842cd646c9d1c' ],
Then the flow is following:
modules.blocks.process.loadBlocksFromNetwork
->
modules.blocks.utils.readDbRows
->
logic.initTransaction.dbRead
->
base_transaction.ts @ fromSync
Then we finally call: https://github.com/LiskHQ/lisk-sdk/blob/0711c1d3b9e45886d8d42ea3cd6bc1d565f884e7/elements/lisk-transactions/src/4_multisignature_transaction.ts#L393-L408
In case when raw.m_keysgroup
is not a string
it will set empty array for keysgroup
property.
The bug is fixed if we change the logic to something like:
protected assetFromSync(raw: any): object | undefined {
if (!raw.m_keysgroup) {
return undefined;
}
const multisignature = {
min: raw.m_min,
lifetime: raw.m_lifetime,
};
if (typeof raw.m_keysgroup === 'string') {
multisignature.keysgroup = raw.m_keysgroup.split(',');
} else {
multisignature.keysgroup = raw.m_keysgroup ? raw.m_keysgroup : [];
}
return { multisignature };
}
Expected behavior
The node should be able to sync when a block contains multisignature registration transaction.
Actual behavior
It fails with following message:
Steps to reproduce
Check logs on
fra1-alpha2-001.liskdev.net
machine.Which version(s) does this affect? (Environment, OS, etc...)
2.0.0-alpha.2