-
Notifications
You must be signed in to change notification settings - Fork 458
Unit test review for block processing (LIP 0055) #8135
Comments
this is tested by checking
this is tested in the state machine https://github.com/LiskHQ/lisk-sdk/blob/bcfec00b6c918e635ef009249fcb6e7b563bd4c7/framework/test/unit/state_machine/state_machine.spec.ts
eventRoot are tested in
State root verification is done in the
this is handled in another PR https://github.com/LiskHQ/lisk-sdk/pull/8440/files#diff-e5b4a5e9bd2d527e3be245f514f69edce40293da78958774fbb052a8f6e32201R316-R332 |
What I meant is that either
And the failure of one of these functions (
I see. But a test that
ok, but shouldn't they nevertheless be included in
Ok. And do we have a test that checks that block processing fails if this lisk-db call fails?
ok |
ill add the command execute check. the state machine is called from ABI Handler and they are checked in the test |
Looks good. But was the following point skipped on purpose, or was it just missed?
Note that the corresponding issue for assets was fixed, but not this one for transactions. |
No, your linked tests are about the transaction params size. MAX_TRANSACTIONS_SIZE_BYTES is about the size of all transactions in a block. |
Block
MAX_TRANSACTIONS_SIZE_BYTES
than the exiting one would be good. That means, one test where the size equalsMAX_TRANSACTIONS_SIZE_BYTES
and that passes. And one test where the size equalsMAX_TRANSACTIONS_SIZE_BYTES+1
and that fails.assets.validate()
andblockHeader.validate()
are called during block processing and that block processing fails if one of them fails.Block Header
eventRoot
andimpliesMaxPrevotes
are missing inblockHeaderProps
in block_header.spec.ts.impliesMaxPrevotes
property.Timestamp
Math.floor(Date.now() / 10000)
instead ofMath.floor(Date.now() / 10)
?State Root
stateRoot
property. In particular, there is no test that expects that block processing fails if the value ofheader.stateRoot
in incorrect.BFT properties
impliesMaximalPrevotes
property is missingimpliesMaximalPrevotes
should be mocked to ensure that it returns true.Block Assets
MAX_ASSET_DATA_SIZE_BYTES
: It would be good if the size of thedata
property equalsMAX_ASSET_DATA_SIZE_BYTES+1
instead of an arbitrary value.MAX_ASSET_DATA_SIZE_BYTES
instead of 64 to make it independent of the value ofMAX_ASSET_DATA_SIZE_BYTES
. But this is not so important.moduleId
instead ofmodule
. Also in the expectation.asset.module
does not refer to a registered module for any assetasset
in the block.The text was updated successfully, but these errors were encountered: