Skip to content

Commit

Permalink
Merge branch 'master' into spy/simulate-l1-txs
Browse files Browse the repository at this point in the history
  • Loading branch information
spypsy authored Jan 17, 2025
2 parents dc8198a + 920a521 commit a3586fb
Show file tree
Hide file tree
Showing 523 changed files with 13,383 additions and 7,158 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/external-ci-approved.yml

This file was deleted.

17 changes: 16 additions & 1 deletion .github/workflows/nightly-masternet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@ concurrency:
cancel-in-progress: false

jobs:
get-latest-commit:
runs-on: ubuntu-latest
outputs:
commit: ${{ steps.get_commit.outputs.COMMIT }}

steps:
- uses: actions/checkout@v4

- name: Get latest published commit
id: get_commit
run: |
COMMIT=$(curl -s https://registry.hub.docker.com/v2/repositories/aztecprotocol/aztec/tags/master | jq ".digest" | tr -d '"')
echo "COMMIT=$COMMIT" >> $GITHUB_OUTPUT
deploy-network:
needs: get-latest-commit
uses: ./.github/workflows/network-deploy.yml
with:
ref: master
namespace: masternet
values_file: rc-1.yaml
aztec_docker_image: aztecprotocol/aztec:master
aztec_docker_image: aztecprotocol/aztec@${{ needs.get-latest-commit.outputs.commit }}
deployment_mnemonic_secret_name: testnet-deployment-mnemonic
respect_tf_lock: "false"
run_terraform_destroy: "true"
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/start-spot.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# Useful if the spot runners are in a bad state
name: Start/Stop Personal Spot
# Useful if the publish npm runner is in a bad state
name: Start Legacy Runner
on:
workflow_dispatch:
inputs:
username:
description: 'Username (optional)'
required: false
action:
description: "Defaults to 'start', can be 'stop', 'restart'"
required: false
default: 'start'
required: true
jobs:
start-build:
uses: ./.github/workflows/setup-runner.yml
with:
username: ${{ inputs.username || github.actor }}
username: ${{ inputs.username }}
runner_type: builder-x86
runner_action: ${{ inputs.action }}
secrets: inherit
secrets: inherit
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
db28cb9ffb710c286b54dbfcf57292ae3dffb03d
c172880ae47ec4906cda662801bd4b7866c9586b
8 changes: 4 additions & 4 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
".": "0.69.1",
".": "0.70.0",
"yarn-project/cli": "0.35.1",
"yarn-project/aztec": "0.69.1",
"barretenberg": "0.69.1",
"barretenberg/ts": "0.69.1"
"yarn-project/aztec": "0.70.0",
"barretenberg": "0.70.0",
"barretenberg/ts": "0.70.0"
}
204 changes: 204 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions aztec-up/bin/aztec-wallet
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,9 @@ set -euo pipefail

export SKIP_PORT_ASSIGNMENT=1
export WALLET_DATA_DIRECTORY=$(dirname $0)/wallet-data
export BB_WORKING_DIRECTORY=$(dirname $0)/bb-workdir

if [ -z "${BB_BINARY_PATH:-}" ]; then
export BB_BINARY_PATH=$HOME/.bb/bb
fi

if [ ! -f $BB_BINARY_PATH ]; then
echo "bb binary does not exist at $BB_BINARY_PATH. Set BB_BINARY_PATH environment variable to the path of the bb binary."
exit 1
fi

export ENV_VARS_TO_INJECT="WALLET_DATA_DIRECTORY SSH_AUTH_SOCK PXE_PROVER_ENABLED BB_BINARY_PATH BB_WORKING_DIRECTORY"

mkdir -p $BB_WORKING_DIRECTORY
mkdir -p $WALLET_DATA_DIRECTORY

$(dirname $0)/.aztec-run aztecprotocol/cli-wallet $@
4 changes: 2 additions & 2 deletions aztec-up/bin/docker-compose.sandbox.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
ethereum:
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-${ARCH_TAG:-amd64}
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc
entrypoint: >
sh -c '
if [ -n "$$FORK_BLOCK_NUMBER" ] && [ -n "$$FORK_URL" ]; then
Expand All @@ -20,7 +20,7 @@ services:
ports:
- "${PXE_PORT:-8080}:${PXE_PORT:-8080}"
environment:
LOG_LEVEL: # Loaded from the user shell if explicitly set
LOG_LEVEL: '${LOG_LEVEL:-info; verbose: simulator:avm:debug_log}'
HOST_WORKDIR: "${PWD}" # Loaded from the user shell to show log files absolute path in host
ETHEREUM_HOST: ${ETHEREUM_HOST:-http://ethereum}:${ANVIL_PORT:-8545}
L1_CHAIN_ID: 31337
Expand Down
4 changes: 2 additions & 2 deletions barretenberg/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/AztecProtocol/barretenberg
branch = master
commit = 5740442e306a15888a5f3d462d79d6e869e1c092
parent = 1aa34e78f4f40a47f587feecb338d3c2ba108c1d
commit = e53d114ce74a6b1543c3168945137ae21ac7fcbe
parent = a964cd075b97c45a526bfb81ba612b6eb077a29f
method = merge
cmdver = 0.4.6
32 changes: 32 additions & 0 deletions barretenberg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## [0.70.0](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.69.1...barretenberg-v0.70.0) (2025-01-15)


### Features

* Allow concurrent world state access ([#11216](https://github.com/AztecProtocol/aztec-packages/issues/11216)) ([17aa4b4](https://github.com/AztecProtocol/aztec-packages/commit/17aa4b4cf2164d29d24d4da29d4b55d273802747))
* **avm2:** Avm redesign init ([#10906](https://github.com/AztecProtocol/aztec-packages/issues/10906)) ([231f017](https://github.com/AztecProtocol/aztec-packages/commit/231f017d14c3d261b28ab19dcbdf368c561d0cc7))
* Permutation argument optimizations ([#10960](https://github.com/AztecProtocol/aztec-packages/issues/10960)) ([de99603](https://github.com/AztecProtocol/aztec-packages/commit/de9960345da17e97464d2c36c35e3eada4fa3680))
* Use tail public inputs as transaction hash ([#11100](https://github.com/AztecProtocol/aztec-packages/issues/11100)) ([34be2c3](https://github.com/AztecProtocol/aztec-packages/commit/34be2c3800c2d99c11fe3448e01c77abf60c726d))


### Bug Fixes

* **avm:** AVM circuit fixes related calldata, returndata and call_ptr ([#11207](https://github.com/AztecProtocol/aztec-packages/issues/11207)) ([2f05dc0](https://github.com/AztecProtocol/aztec-packages/commit/2f05dc02fe7b147c7cd6fc235134279dbf332c08))
* **avm:** Mac build ([#11195](https://github.com/AztecProtocol/aztec-packages/issues/11195)) ([c4f4452](https://github.com/AztecProtocol/aztec-packages/commit/c4f44520a8cc234219f7e9e021b0574a894aa06e))
* **avm:** Mac build (retry) ([#11197](https://github.com/AztecProtocol/aztec-packages/issues/11197)) ([0a4b763](https://github.com/AztecProtocol/aztec-packages/commit/0a4b763a39fde0f37ac5baa3bd1e3052c01ca946))
* **bootstrap:** Don't download bad cache if unstaged changes ([#11198](https://github.com/AztecProtocol/aztec-packages/issues/11198)) ([2bd895b](https://github.com/AztecProtocol/aztec-packages/commit/2bd895bb0887fddc45433224b3ebef04660f744c))
* Remove max lookup table size constant (for now) ([#11095](https://github.com/AztecProtocol/aztec-packages/issues/11095)) ([7e9e268](https://github.com/AztecProtocol/aztec-packages/commit/7e9e2681e314145237f95f79ffdc95ad25a0e319))


### Miscellaneous

* **avm:** Fix mac build ([#11147](https://github.com/AztecProtocol/aztec-packages/issues/11147)) ([1775e53](https://github.com/AztecProtocol/aztec-packages/commit/1775e53025f9946ba26b8b624a0f15f4ccdabd2f))
* **avm:** Improve column stats ([#11135](https://github.com/AztecProtocol/aztec-packages/issues/11135)) ([535a14c](https://github.com/AztecProtocol/aztec-packages/commit/535a14c8c59399ce7579c69f6aec862f71981699))
* **avm:** Re-enable bb-prover tests in CI, change some to check-circuit-only, enable multi-enqueued call tests ([#11180](https://github.com/AztecProtocol/aztec-packages/issues/11180)) ([3092212](https://github.com/AztecProtocol/aztec-packages/commit/3092212d61cb1359d10b1741b48627518e5437d7))
* **avm:** Vm2 followup cleanup ([#11186](https://github.com/AztecProtocol/aztec-packages/issues/11186)) ([6de4013](https://github.com/AztecProtocol/aztec-packages/commit/6de4013c1204b3478b6d444c0cff5ca9c5c6cd03))
* **docs:** Update tx concepts page ([#10947](https://github.com/AztecProtocol/aztec-packages/issues/10947)) ([d9d9798](https://github.com/AztecProtocol/aztec-packages/commit/d9d9798f90cce34ff03cc89d8aa18bb9db0414f1))
* Move witness computation into class plus some other cleanup ([#11140](https://github.com/AztecProtocol/aztec-packages/issues/11140)) ([d41e9ab](https://github.com/AztecProtocol/aztec-packages/commit/d41e9abc8c2428be224400ec43f4844adfd954c3))
* Redo typo PR by longxiangqiao ([#11109](https://github.com/AztecProtocol/aztec-packages/issues/11109)) ([b8ef30e](https://github.com/AztecProtocol/aztec-packages/commit/b8ef30e2a147b5318b70ff2146186dfbae70af42))
* Refactor Solidity Transcript and improve error handling in sol_honk flow ([#11158](https://github.com/AztecProtocol/aztec-packages/issues/11158)) ([58fdf87](https://github.com/AztecProtocol/aztec-packages/commit/58fdf87560fc2c43255675c83dbc36eb370ca5b0))
* SmallSubgroupIPA tests ([#11106](https://github.com/AztecProtocol/aztec-packages/issues/11106)) ([f034e2a](https://github.com/AztecProtocol/aztec-packages/commit/f034e2af6f372e393b63ff19ca6d118d03506e1f))

## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.69.0...barretenberg-v0.69.1) (2025-01-08)


Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
project(
Barretenberg
DESCRIPTION "BN254 elliptic curve library, and PLONK SNARK prover"
VERSION 0.69.1 # x-release-please-version
VERSION 0.70.0 # x-release-please-version
LANGUAGES CXX C
)
# Insert version into `bb` config file
Expand Down
6 changes: 4 additions & 2 deletions barretenberg/cpp/pil/avm/gadgets/mem_slice.pil
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ namespace slice(256);
sel_mem_active * (cnt - 1 - cnt') = 0;
#[ADDR_INCREMENT]
sel_mem_active * (addr + 1 - addr') = 0;
#[COL_OFFSET_INCREMENT]
sel_mem_active * (col_offset + 1 - col_offset') = 0;

// #[COL_OFFSET_INCREMENT]
// sel_mem_active * (col_offset + 1 - col_offset') = 0;

#[SAME_CLK]
sel_mem_active * (clk - clk') = 0;
#[SAME_SPACE_ID]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ template <class Curve> class CommitmentKey {
CommitmentKey(const size_t num_points, std::shared_ptr<srs::factories::ProverCrs<Curve>> prover_crs)
: pippenger_runtime_state(num_points)
, srs(prover_crs)
, dyadic_size(get_num_needed_srs_points(num_points))
{}

/**
Expand All @@ -90,6 +91,7 @@ template <class Curve> class CommitmentKey {
PROFILE_THIS_NAME("commit");
// We must have a power-of-2 SRS points *after* subtracting by start_index.
size_t dyadic_poly_size = numeric::round_up_power_2(polynomial.size());
ASSERT(dyadic_poly_size <= dyadic_size && "Polynomial size exceeds commitment key size.");
// Because pippenger prefers a power-of-2 size, we must choose a starting index for the points so that we don't
// exceed the dyadic_circuit_size. The actual start index of the points will be the smallest it can be so that
// the window of points is a power of 2 and still contains the scalars. The best we can do is pick a start index
Expand Down Expand Up @@ -211,6 +213,7 @@ template <class Curve> class CommitmentKey {
{
PROFILE_THIS_NAME("commit_structured");
ASSERT(polynomial.end_index() <= srs->get_monomial_size());
ASSERT(polynomial.end_index() <= dyadic_size && "Polynomial size exceeds commitment key size.");

// Percentage of nonzero coefficients beyond which we resort to the conventional commit method
constexpr size_t NONZERO_THRESHOLD = 75;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ std::vector<typename GeminiProver_<Curve>::Claim> GeminiProver_<Curve>::prove(
bool has_zk)

{
size_t log_n = numeric::get_msb(static_cast<uint32_t>(circuit_size));
size_t n = 1 << log_n;
const size_t log_n = numeric::get_msb(static_cast<uint32_t>(circuit_size));
const size_t n = 1 << log_n;

// Compute batched polynomials
Polynomial batched_unshifted(n);
Expand All @@ -66,10 +66,8 @@ std::vector<typename GeminiProver_<Curve>::Claim> GeminiProver_<Curve>::prove(
transcript->send_to_verifier("Gemini:masking_poly_comm", commitment_key->commit(batched_unshifted));
// In the provers, the size of multilinear_challenge is CONST_PROOF_SIZE_LOG_N, but we need to evaluate the
// hiding polynomial as multilinear in log_n variables
std::vector<Fr> multilinear_challenge_resized(multilinear_challenge.begin(), multilinear_challenge.end());
multilinear_challenge_resized.resize(log_n);
transcript->send_to_verifier("Gemini:masking_poly_eval",
batched_unshifted.evaluate_mle(multilinear_challenge_resized));
batched_unshifted.evaluate_mle(multilinear_challenge.subspan(0, log_n)));
}

// Get the batching challenge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ template <typename Curve> class ShpleminiVerifier_ {
if (has_zk) {
hiding_polynomial_commitment =
transcript->template receive_from_prover<Commitment>("Gemini:masking_poly_comm");
batched_evaluation += transcript->template receive_from_prover<Fr>("Gemini:masking_poly_eval");
batched_evaluation = transcript->template receive_from_prover<Fr>("Gemini:masking_poly_eval");
}

// Get the challenge ρ to batch commitments to multilinear polynomials and their shifts
Expand Down Expand Up @@ -399,7 +399,7 @@ template <typename Curve> class ShpleminiVerifier_ {
Fr current_batching_challenge = Fr(1);

if (has_zk) {
// ρ⁰ is used to batch the hiding polynomial
// ρ⁰ is used to batch the hiding polynomial which has already been added to the commitments vector
current_batching_challenge *= multivariate_batching_challenge;
}

Expand Down Expand Up @@ -635,12 +635,12 @@ template <typename Curve> class ShpleminiVerifier_ {
// need to keep track of the contribution to the constant term
Fr& constant_term = scalars.back();

// add Libra commitments to the vector of commitments; compute corresponding scalars and the correction to
// the constant term
// add Libra commitments to the vector of commitments
for (size_t idx = 0; idx < libra_commitments.size(); idx++) {
commitments.push_back(libra_commitments[idx]);
}

// compute corresponding scalars and the correction to the constant term
std::array<Fr, NUM_LIBRA_EVALUATIONS> denominators;
std::array<Fr, NUM_LIBRA_EVALUATIONS> batching_scalars;
// compute Shplonk denominators and invert them
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ template <typename Flavor> class SmallSubgroupIPAProver {
const std::vector<FF>& multivariate_challenge,
const FF claimed_ipa_eval,
std::shared_ptr<typename Flavor::Transcript> transcript,
std::shared_ptr<typename Flavor::CommitmentKey> commitment_key)
std::shared_ptr<typename Flavor::CommitmentKey>& commitment_key)
: interpolation_domain(zk_sumcheck_data.interpolation_domain)
, concatenated_polynomial(zk_sumcheck_data.libra_concatenated_monomial_form)
, libra_concatenated_lagrange_form(zk_sumcheck_data.libra_concatenated_lagrange_form)
Expand All @@ -135,6 +135,11 @@ template <typename Flavor> class SmallSubgroupIPAProver {
, batched_quotient(QUOTIENT_LENGTH)

{
// Reallocate the commitment key if necessary. This is an edge case with SmallSubgroupIPA since it has
// polynomials that may exceed the circuit size.
if (commitment_key->dyadic_size < SUBGROUP_SIZE + 3) {
commitment_key = std::make_shared<typename Flavor::CommitmentKey>(SUBGROUP_SIZE + 3);
}
// Extract the evaluation domain computed by ZKSumcheckData
if constexpr (std::is_same_v<Curve, curve::BN254>) {
bn_evaluation_domain = std::move(zk_sumcheck_data.bn_evaluation_domain);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ void ContentAddressedAppendOnlyTree<Store, HashingPolicy>::get_leaf(const index_
RequestContext requestContext;
requestContext.includeUncommitted = includeUncommitted;
requestContext.root = store_->get_current_root(*tx, includeUncommitted);
std::optional<fr> leaf_hash = find_leaf_hash(leaf_index, requestContext, *tx);
std::optional<fr> leaf_hash = find_leaf_hash(leaf_index, requestContext, *tx, false);
response.success = leaf_hash.has_value();
if (response.success) {
response.inner.leaf = leaf_hash.value();
Expand Down Expand Up @@ -690,15 +690,15 @@ void ContentAddressedAppendOnlyTree<Store, HashingPolicy>::get_leaf(const index_
leaf_index,
" for block ",
blockNumber,
", leaf index is too high.");
", leaf index out of range.");
response.success = false;
return;
}
RequestContext requestContext;
requestContext.blockNumber = blockNumber;
requestContext.includeUncommitted = includeUncommitted;
requestContext.root = blockData.root;
std::optional<fr> leaf_hash = find_leaf_hash(leaf_index, requestContext, *tx);
std::optional<fr> leaf_hash = find_leaf_hash(leaf_index, requestContext, *tx, false);
response.success = leaf_hash.has_value();
if (response.success) {
response.inner.leaf = leaf_hash.value();
Expand Down Expand Up @@ -746,7 +746,6 @@ void ContentAddressedAppendOnlyTree<Store, HashingPolicy>::find_leaf_indices_fro

RequestContext requestContext;
requestContext.includeUncommitted = includeUncommitted;
requestContext.root = store_->get_current_root(*tx, includeUncommitted);

for (const auto& leaf : leaves) {
std::optional<index_t> leaf_index =
Expand Down Expand Up @@ -787,7 +786,6 @@ void ContentAddressedAppendOnlyTree<Store, HashingPolicy>::find_leaf_indices_fro
RequestContext requestContext;
requestContext.blockNumber = blockNumber;
requestContext.includeUncommitted = includeUncommitted;
requestContext.root = blockData.root;
requestContext.maxIndex = blockData.size;

for (const auto& leaf : leaves) {
Expand Down
Loading

0 comments on commit a3586fb

Please sign in to comment.