diff --git a/deployment/data-feeds/shared/validation.go b/deployment/data-feeds/shared/validation.go index f6b778bb444..5573d6ad0ba 100644 --- a/deployment/data-feeds/shared/validation.go +++ b/deployment/data-feeds/shared/validation.go @@ -29,10 +29,10 @@ func ValidateFeedID(feedID string) error { // bytes (1-4) are random bytes, so no validation needed - // Validate attribute bucket bytes (5-6) + // Validate attribute bucket bytes (5-6), see domains/data-feeds/cmd/feed_id.go in CLD for more details attributeBucket := [2]byte{bytes[5], bytes[6]} attributeBucketHex := hex.EncodeToString(attributeBucket[:]) - if attributeBucketHex != "0003" && attributeBucketHex != "0700" { + if attributeBucketHex != "0003" && attributeBucketHex != "0700" && attributeBucketHex != "0201" { return errors.New("invalid attribute bucket bytes") } diff --git a/deployment/data-feeds/shared/validation_test.go b/deployment/data-feeds/shared/validation_test.go index 8c6788675c4..8c4951aa5df 100644 --- a/deployment/data-feeds/shared/validation_test.go +++ b/deployment/data-feeds/shared/validation_test.go @@ -15,6 +15,7 @@ func TestValidateFeedID(t *testing.T) { }{ {"0x011e22d6bf0003320000000000000000", true}, // valid feed ID {"0x026d06ebb60700020000000000000000", true}, // valid feed ID + {"0x01ad92ce480201320000000000000000", true}, // valid feed ID {"0x126d06ebb60700020000000000000000", false}, // invalid feed format {"0x126d06ebb6000020000000000000000", false}, // invalid attribute bucket {"126d06ebb6000020000000000000000", false}, // no 0x prefix