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
If the node provides some attributes, they must be valid or not conflicting. If there is LOCODE attribute, it must be valid. If there are other geographical attributes that can be derived from LOCODE, they must be logically valid and be set in the same format. If those conditions are not met, the node must be denied entering the network.
For now there can be two ways:
Don't allow any LOCODE derivable attributes without LOCODE attribute set
If LOCODE is not set, check derivable attributes for correctness
Inner ring node must have sanity checks of attributes, for sure. However check of LOCODE derived attributes might be a bit too much. There are many corner cases: some omitted attributes from LOCODE base, comparing strings with and without dyacritics, etc.
Probably the best way to solve LOCODE sanity check is to forbid all LOCODE derived attributes in bootstrap txs.
Proposal for sanity check algorithm for LOCODE:
If derived locode attributes are present -- ignore this bootstrap tx.
If LOCODE attribute is present -- add derived attributes from db.
…d attributes
Make `Validator.VerifyAndUpdate` method to return an error if at least one
of LOCODE-derived attributes is set explicitly. Thus, IR will not confirm
the candidates for the network map who independently set these attributes.
Cover `Validator.VerifyAndUpdate` method with unit tests.
Signed-off-by: Leonard Lyubich <[email protected]>
If the node provides some attributes, they must be valid or not conflicting. If there is LOCODE attribute, it must be valid. If there are other geographical attributes that can be derived from LOCODE, they must be logically valid and be set in the same format. If those conditions are not met, the node must be denied entering the network.
For now there can be two ways:
The second one seems to be a more solid choice.
Originally posted by @realloc in #397 (comment)
The text was updated successfully, but these errors were encountered: