Skip to content

refactor: Migrate --update_inputs flag to --vk_policy option#18237

Merged
johnathan79717 merged 1 commit intomerge-train/barretenbergfrom
jh/migrate-update-inputs-to-vk-policy
Nov 7, 2025
Merged

refactor: Migrate --update_inputs flag to --vk_policy option#18237
johnathan79717 merged 1 commit intomerge-train/barretenbergfrom
jh/migrate-update-inputs-to-vk-policy

Conversation

@johnathan79717
Copy link
Contributor

Summary

Replace the boolean --update_inputs flag with a new --vk_policy=rewrite option to provide more flexibility in handling verification keys.

Changes

  • Add REWRITE policy to VkPolicy enum
  • Update CLI to accept 'rewrite' as a valid vk_policy value
  • Remove update_inputs field from API::Flags
  • Update check_precomputed_vks to use vk_policy instead of update_inputs
  • Update tests and scripts to use --vk_policy=rewrite

Behavior

The new --vk_policy=rewrite provides the same functionality as the old --update_inputs flag: when a VK check fails, it rewrites the input file with the correct VK. This change provides better consistency with the existing vk_policy options (default, check, recompute).

Testing

  • Unit tests pass (CheckPrecomputedVks and CheckPrecomputedVksMismatch)
  • Verified CLI accepts --vk_policy=rewrite and rejects old --update_inputs flag
  • Scripts updated to use new flag

Migration Guide

Replace --update_inputs with --vk_policy=rewrite:

Before:

bb check --update_inputs --scheme chonk --ivc_inputs_path inputs.msgpack

After:

bb check --vk_policy=rewrite --scheme chonk --ivc_inputs_path inputs.msgpack

Replace the boolean --update_inputs flag with a new --vk_policy=rewrite
option to provide more flexibility in handling verification keys.

Changes:
- Add REWRITE policy to VkPolicy enum
- Update CLI to accept 'rewrite' as a valid vk_policy value
- Remove update_inputs field from API::Flags
- Update check_precomputed_vks to use vk_policy instead of update_inputs
- Update tests and scripts to use --vk_policy=rewrite

The new --vk_policy=rewrite provides the same functionality as the old
--update_inputs flag: when a VK check fails, it rewrites the input file
with the correct VK. This change provides better consistency with the
existing vk_policy options (default, check, recompute).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@johnathan79717 johnathan79717 added ci-full Run all master checks. and removed ci-full Run all master checks. labels Nov 6, 2025
@johnathan79717 johnathan79717 merged commit 7d5d01d into merge-train/barretenberg Nov 7, 2025
14 checks passed
@johnathan79717 johnathan79717 deleted the jh/migrate-update-inputs-to-vk-policy branch November 7, 2025 14:30
github-merge-queue bot pushed a commit that referenced this pull request Nov 7, 2025
BEGIN_COMMIT_OVERRIDE
chore: remove more pg references and leftovers (#18260)
refactor: Migrate --update_inputs flag to --vk_policy option (#18237)
chore: stdlib byte_array and bool external audit fixes (#17838)
chore: update naming in bb_proof_verification lib (#18269)
chore: cycle group 13 (#18200)
chore: universal handling for coord constancy in cycle_group (#18253)
END_COMMIT_OVERRIDE
ludamad pushed a commit that referenced this pull request Dec 16, 2025
## Summary

Replace the boolean `--update_inputs` flag with a new
`--vk_policy=rewrite` option to provide more flexibility in handling
verification keys.

## Changes

- Add `REWRITE` policy to `VkPolicy` enum
- Update CLI to accept 'rewrite' as a valid vk_policy value  
- Remove `update_inputs` field from `API::Flags`
- Update `check_precomputed_vks` to use `vk_policy` instead of
`update_inputs`
- Update tests and scripts to use `--vk_policy=rewrite`

## Behavior

The new `--vk_policy=rewrite` provides the same functionality as the old
`--update_inputs` flag: when a VK check fails, it rewrites the input
file with the correct VK. This change provides better consistency with
the existing vk_policy options (default, check, recompute).

## Testing

- Unit tests pass (`CheckPrecomputedVks` and
`CheckPrecomputedVksMismatch`)
- Verified CLI accepts `--vk_policy=rewrite` and rejects old
`--update_inputs` flag
- Scripts updated to use new flag

## Migration Guide

Replace `--update_inputs` with `--vk_policy=rewrite`:

**Before:**
```bash
bb check --update_inputs --scheme chonk --ivc_inputs_path inputs.msgpack
```

**After:**
```bash
bb check --vk_policy=rewrite --scheme chonk --ivc_inputs_path inputs.msgpack
```

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants