You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is that the block and the namespace table are reconstructed from the transactions: given that the first namespace is empty, it has no transaction attached to it and thus the number of namespaces in the block is only 2 and not 3.
I wonder if it is worth handling empty namespaces... Why would someone include an empty namespace inside a block? Does it not open the door for DoS attacks as one cannot charge a fee for an empty namespace?
Ah yes, I remember now! I should have posted a code comment. 🤦
The from_transactions constructor always produces a "valid" / "well-formed" block. Such a block will never have an empty namespace. So our basic_correctness test should not include empty namespaces.
A "malformed" block composed of arbitrary bytes might have empty namespaces, so that test should support empty namespaces. But that's the scope of #785 .
For this issue, I think it suffices to add a code comment explaining that from_transactions will never produce an empty namespace, and then delete those tests from basic_correctness that include an empty namespace. It's a trivial fix, so if desired we don't need a separate PR---we could instead bundle it into another nontrivial PR.
Commenting out the tests related to #746, triggers a test failure.
Also remove the comments related to #746.
The text was updated successfully, but these errors were encountered: