Commit eee0dd4
authored
fix: verifier request schema (#4326)
## What ❔
Two changes to the verification request schema:
1. Change the type of the optimizer runs from `u16` to `usize`. This
allows values larger than 65535 to be passed and matches foundry's type
for the field.
2. Add a default value for `optimization_used`. Currently, it's tedious
that even for the JSON standard verification request, this field is
required but ignored.
Additionally, there is a DB migration to requeue some Etherscan
verifications, as Etherscan has fixed the issues on their end.
## Why ❔
<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- The `Why` has to be clear to non-Matter Labs entities running their
own ZK Chain -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->
1. Currently, there is no way to submit a request using the single file
format with optimizer runs greater than 65535.
2. To provide a better UX when working with the verification endpoint.
3. To verify contracts on Etherscan that previously failed due to bugs
in their API.
## Is this a breaking change?
- [ ] Yes
- [X] No
## Operational changes
<!-- Any config changes? Any new flags? Any changes to any scripts? -->
<!-- Please add anything that non-Matter Labs entities running their own
ZK Chain may need to know -->
## Checklist
<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->
- [X] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [X] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [X] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.1 parent 048753f commit eee0dd4
File tree
4 files changed
+19
-2
lines changed- core/lib
- contract_verifier/src/tests
- dal/migrations
- types/src/contract_verification
4 files changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
204 | | - | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| |||
0 commit comments