Added tests for vault blob broadcast size and batch request limit in …#22119
Added tests for vault blob broadcast size and batch request limit in …#22119russell-stern wants to merge 11 commits intodevelopfrom
Conversation
|
✅ No conflicts with other open PRs targeting |
| }, | ||
| } | ||
| fetcher := &callbackBlobFetcher{fn: func([]byte) error { return nil }} | ||
| result, err := r.broadcastBlobPayloads(t.Context(), fetcher, 1, payloads, ids) |
There was a problem hiding this comment.
🤔 This will never fail I think -- your callbackBlobFetcher isn't the real fetcher that would be injected, so in other words even if you passed a payload that was too big, the test would still succeed
I would suggest instead checking against the plugin limit value instantiated by the NewReportingPlugin function
There was a problem hiding this comment.
I have that check below but you're right the runBroadcast isn't actually testing anything. I removed the call altogether and since the blob limit is per payload the batch size doesn't matter. I removed the loop that created multiple payloads and we're just checking against the max size payload for each request type
b6f88a8 to
1bc64cc
Compare
prashantkumar1982
left a comment
There was a problem hiding this comment.
Thanks for these new validation tests :)
But looking at these, I think we should do this validation in more layers in our stack. See detailed comments.
| name string | ||
| id *vaultcommon.SecretIdentifier | ||
| maxIDLen int | ||
| maxOwnerLen int |
There was a problem hiding this comment.
These 3 limits on max values should ideally be tested inside the validator too.
OCR plugin is too deep in our stack to be the only place to validate these.
I mean look at this code:
chainlink/core/capabilities/vault/validator.go
Lines 59 to 61 in 01f4475
This code too should be checking these limits and failing.
@cedric-cordenier what do you think?
|
I see you updated files related to
|
…ator logic in plugin
421eb77 to
2dd1f26
Compare
|




…vault validator