Skip to content

Commit

Permalink
Merge branch 'master' of github.com:AztecProtocol/aztec-packages into…
Browse files Browse the repository at this point in the history
… gj/touchid_account
  • Loading branch information
Thunkar committed Aug 1, 2024
2 parents 1f3cd02 + 76ef298 commit b7b489e
Show file tree
Hide file tree
Showing 382 changed files with 8,070 additions and 4,677 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ jobs:
working-directory: ./barretenberg/cpp/
timeout-minutes: 40
# limit our parallelism to half our cores
run: earthly-ci --no-output +test --hardware_concurrency=64
run: earthly-ci --exec-stats --no-output +test --hardware_concurrency=64

bb-js-test:
needs: [build-images, changes]
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/devnet-deploys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,15 @@ jobs:
- name: Deploy L1 Contracts
run: |
set -e
set -o pipefail
docker pull aztecprotocol/aztec:${{ env.DEPLOY_TAG }}
docker run aztecprotocol/aztec:${{ env.DEPLOY_TAG }} deploy-l1-contracts \
--private-key ${{ secrets.SEQ_1_PUBLISHER_PRIVATE_KEY }} \
--private-key ${{ secrets.CONTRACT_PUBLISHER_PRIVATE_KEY }} \
--rpc-url https://${{ env.DEPLOY_TAG }}-mainnet-fork.aztec.network:8545/${{ secrets.FORK_API_KEY }} \
--l1-chain-id ${{ env.L1_CHAIN_ID }} \
--json \
| tee ./l1_contracts.json
--json | tee ./l1_contracts.json
# upload contract addresses to S3
aws s3 cp ./l1_contracts.json ${{ env.CONTRACT_S3_BUCKET }}/${{ env.DEPLOY_TAG }}/l1_contracts.json
Expand Down Expand Up @@ -204,25 +206,25 @@ jobs:
- name: Deploy protocol contracts
run: |
set -e
set -o pipefail
docker pull aztecprotocol/aztec:${{ env.DEPLOY_TAG }}
docker run aztecprotocol/aztec:${{ env.DEPLOY_TAG }} deploy-protocol-contracts \
--rpc-url https://api.aztec.network/${{ env.DEPLOY_TAG }}/aztec-pxe/${{ secrets.FORK_API_KEY }} \
--l1-chain-id ${{ env.L1_CHAIN_ID }} \
--json \
| tee ./protocol_contracts.json
--json | tee ./protocol_contracts.json
aws s3 cp ./protocol_contracts.json ${{ env.CONTRACT_S3_BUCKET }}/${{ env.DEPLOY_TAG }}/protocol_contracts.json
- name: Bootstrap network
run: |
set -e
set -o pipefail
docker run aztecprotocol/aztec:${{ env.DEPLOY_TAG }} bootstrap-network \
--rpc-url https://api.aztec.network/${{ env.DEPLOY_TAG }}/aztec-pxe/${{ secrets.FORK_API_KEY }} \
--l1-rpc-url https://${{ env.DEPLOY_TAG }}-mainnet-fork.aztec.network:8545/${{ secrets.FORK_API_KEY }} \
--l1-chain-id ${{ env.L1_CHAIN_ID }} \
--l1-private-key ${{ secrets.SEQ_1_PUBLISHER_PRIVATE_KEY }} \
--json \
| tee ./basic_contracts.json
--l1-private-key ${{ secrets.CONTRACT_PUBLISHER_PRIVATE_KEY }} \
--json | tee ./basic_contracts.json
aws s3 cp ./basic_contracts.json ${{ env.CONTRACT_S3_BUCKET }}/${{ env.DEPLOY_TAG }}/basic_contracts.json
Expand Down
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.47.0",
".": "0.47.1",
"yarn-project/cli": "0.35.1",
"yarn-project/aztec": "0.47.0",
"barretenberg": "0.47.0",
"barretenberg/ts": "0.47.0"
"yarn-project/aztec": "0.47.1",
"barretenberg": "0.47.1",
"barretenberg/ts": "0.47.1"
}
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## [0.47.1](https://github.com/AztecProtocol/aztec-packages/compare/aztec-packages-v0.47.0...aztec-packages-v0.47.1) (2024-07-30)


### Features

* Add recursive aggregation object to proving/verification keys ([#6770](https://github.com/AztecProtocol/aztec-packages/issues/6770)) ([f48b069](https://github.com/AztecProtocol/aztec-packages/commit/f48b069181e316cb2a9d81f0acf6c00ee90e3db3))
* Adding aggregation to honk and rollup ([#7466](https://github.com/AztecProtocol/aztec-packages/issues/7466)) ([2633aa9](https://github.com/AztecProtocol/aztec-packages/commit/2633aa91a97684f481a861aee0be8756c956135a))
* Allow get_notes to return zero notes ([#7621](https://github.com/AztecProtocol/aztec-packages/issues/7621)) ([e16452a](https://github.com/AztecProtocol/aztec-packages/commit/e16452ab7640169e1235b91d598e3d90ba4ce57e))
* **avm:** Pedersen commit in avm ([#7634](https://github.com/AztecProtocol/aztec-packages/issues/7634)) ([45e7867](https://github.com/AztecProtocol/aztec-packages/commit/45e7867f4b42a3392b4b95767621284ebc7378fe))
* **avm:** Pedersen commitment sim ([#7632](https://github.com/AztecProtocol/aztec-packages/issues/7632)) ([cc420a0](https://github.com/AztecProtocol/aztec-packages/commit/cc420a081e23558b9441cbf563625002e1d45f18))
* Do not evict tx objects from p2p tx pool immediately ([#7652](https://github.com/AztecProtocol/aztec-packages/issues/7652)) ([96492dc](https://github.com/AztecProtocol/aztec-packages/commit/96492dccbf501eb9d05b57827c79c5977b393df7))
* Handle L1toL2 msgs in prover-node ([#7654](https://github.com/AztecProtocol/aztec-packages/issues/7654)) ([f35bac5](https://github.com/AztecProtocol/aztec-packages/commit/f35bac5d35d22e269d8bf2ffccc4484a715d70ae))
* Leonidas ([#7597](https://github.com/AztecProtocol/aztec-packages/issues/7597)) ([eda498a](https://github.com/AztecProtocol/aztec-packages/commit/eda498aec6d852c8732c86564e4226f13cb4cdcd))
* Min and max block times for sequencer ([#7630](https://github.com/AztecProtocol/aztec-packages/issues/7630)) ([2a013b8](https://github.com/AztecProtocol/aztec-packages/commit/2a013b86e554f0516dd1d086a30a4e1e4e4ec684))
* **sol-honk:** Integrate solidity honk verifier with bb and acir tests ([#7573](https://github.com/AztecProtocol/aztec-packages/issues/7573)) ([344ca6f](https://github.com/AztecProtocol/aztec-packages/commit/344ca6f413263a3c2c516b388f85a11fada2840f))
* **sol-honk:** Test verifying recursive proof ([#7576](https://github.com/AztecProtocol/aztec-packages/issues/7576)) ([26408c1](https://github.com/AztecProtocol/aztec-packages/commit/26408c197f5c6e8a300d24e441f4a4860210b5f0))
* Static.aztec.network ([#7649](https://github.com/AztecProtocol/aztec-packages/issues/7649)) ([9dffef5](https://github.com/AztecProtocol/aztec-packages/commit/9dffef598dd5adb6fe02ff697916b63f81a4b054))
* Transaction sender bot ([#7586](https://github.com/AztecProtocol/aztec-packages/issues/7586)) ([176fd08](https://github.com/AztecProtocol/aztec-packages/commit/176fd08c7b72bce2beb405080b7992ebf4ba0a31)), closes [#7562](https://github.com/AztecProtocol/aztec-packages/issues/7562)


### Bug Fixes

* Aztec start --prover ([#7617](https://github.com/AztecProtocol/aztec-packages/issues/7617)) ([ac206a6](https://github.com/AztecProtocol/aztec-packages/commit/ac206a609b3fa6bcad5d8981de8e42967b41050b))
* Bb mac build ([#7619](https://github.com/AztecProtocol/aztec-packages/issues/7619)) ([e3c5602](https://github.com/AztecProtocol/aztec-packages/commit/e3c560216e1bce7d22e30ef18d428f1ab7335a09))
* Faucet correctly derives its account ([#7645](https://github.com/AztecProtocol/aztec-packages/issues/7645)) ([921773f](https://github.com/AztecProtocol/aztec-packages/commit/921773fa7fbd614948b1c76f655746483935809f))
* Uniswap e2e test "nonce too low" ([#7633](https://github.com/AztecProtocol/aztec-packages/issues/7633)) ([e9e2318](https://github.com/AztecProtocol/aztec-packages/commit/e9e231833a50c0763164f9a502a322549ce9d05c))


### Miscellaneous

* Add tx bot to terraform ([#7609](https://github.com/AztecProtocol/aztec-packages/issues/7609)) ([6caa914](https://github.com/AztecProtocol/aztec-packages/commit/6caa914d96a13d0e50f0403c561aa72e6b455782))
* **bb readme:** Add installation instructions and TODOs ([#7601](https://github.com/AztecProtocol/aztec-packages/issues/7601)) ([1a97698](https://github.com/AztecProtocol/aztec-packages/commit/1a97698071a667cd56510c7b7201373a9ac9c646))
* **bb readme:** Update versioning instructions and add Honk Solidity verifier commands ([#7608](https://github.com/AztecProtocol/aztec-packages/issues/7608)) ([9dd9195](https://github.com/AztecProtocol/aztec-packages/commit/9dd9195d8da2d7e2bc85d39e53b33cc82597da1f))
* Bench client ivc proof verification ([#7553](https://github.com/AztecProtocol/aztec-packages/issues/7553)) ([b060309](https://github.com/AztecProtocol/aztec-packages/commit/b060309540af2c4db5057ae526ee65f5f1fd6d0e))
* Call requests ([#7483](https://github.com/AztecProtocol/aztec-packages/issues/7483)) ([ffedf39](https://github.com/AztecProtocol/aztec-packages/commit/ffedf39d98aee4c4149e55e4a133e878553e1e25))
* Constant inputs for most blackboxes ([#7613](https://github.com/AztecProtocol/aztec-packages/issues/7613)) ([3247058](https://github.com/AztecProtocol/aztec-packages/commit/3247058d2e54e1fb84680ad9fcf9ece611235e96))
* **docs:** Fix links ([#7602](https://github.com/AztecProtocol/aztec-packages/issues/7602)) ([f2029be](https://github.com/AztecProtocol/aztec-packages/commit/f2029be410ce2381eb4cf56fc5fcc8707492db45))
* Merge Devnet back to Master ([#7611](https://github.com/AztecProtocol/aztec-packages/issues/7611)) ([112961c](https://github.com/AztecProtocol/aztec-packages/commit/112961cd9c9276e2cd95b41b6de31d27bb43bb41))
* **p2p:** Tx serialization cleanup ([#7620](https://github.com/AztecProtocol/aztec-packages/issues/7620)) ([022a899](https://github.com/AztecProtocol/aztec-packages/commit/022a899bb729ec0cd8403955908f3537b108c61b))
* Replace relative paths to noir-protocol-circuits ([ebaafc7](https://github.com/AztecProtocol/aztec-packages/commit/ebaafc7f660cd0ee915e1b6daa2d2e499d9d7280))
* Replace relative paths to noir-protocol-circuits ([d3b818d](https://github.com/AztecProtocol/aztec-packages/commit/d3b818d8fcaffe51273b9eea91b621f62ccf8f1f))
* Replace relative paths to noir-protocol-circuits ([4a26a19](https://github.com/AztecProtocol/aztec-packages/commit/4a26a19c4f03d2c7800cf769b46724d09dcb8b0e))

## [0.47.0](https://github.com/AztecProtocol/aztec-packages/compare/aztec-packages-v0.46.7...aztec-packages-v0.47.0) (2024-07-24)


Expand Down
2 changes: 2 additions & 0 deletions avm-transpiler/src/opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pub enum AvmOpcode {
PEDERSEN, // temp - may be removed, but alot of contracts rely on it
ECADD,
MSM,
PEDERSENCOMMITMENT, // temp
// Conversions
TORADIXLE,
// Other
Expand Down Expand Up @@ -170,6 +171,7 @@ impl AvmOpcode {
AvmOpcode::PEDERSEN => "PEDERSEN",
AvmOpcode::ECADD => "ECADD",
AvmOpcode::MSM => "MSM",
AvmOpcode::PEDERSENCOMMITMENT => "PEDERSENCOMMITMENT",
// Conversions
AvmOpcode::TORADIXLE => "TORADIXLE",
// Other
Expand Down
18 changes: 18 additions & 0 deletions avm-transpiler/src/transpile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,24 @@ fn handle_black_box_function(avm_instrs: &mut Vec<AvmInstruction>, operation: &B
..Default::default()
});
}
// Temporary while we dont have efficient noir implementations (again)
BlackBoxOp::PedersenCommitment { inputs, domain_separator, output } => {
let input_offset = inputs.pointer.0;
let input_size_offset = inputs.size.0;
let index_offset = domain_separator.0;
let output_offset = output.pointer.0;
avm_instrs.push(AvmInstruction {
opcode: AvmOpcode::PEDERSENCOMMITMENT,
indirect: Some(ZEROTH_OPERAND_INDIRECT | FIRST_OPERAND_INDIRECT),
operands: vec![
AvmOperand::U32 { value: input_offset as u32 },
AvmOperand::U32 { value: output_offset as u32 },
AvmOperand::U32 { value: input_size_offset as u32 },
AvmOperand::U32 { value: index_offset as u32 },
],
..Default::default()
});
}
_ => panic!("Transpiler doesn't know how to process {:?}", operation),
}
}
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 = 172dafd81d1a38fc7c05b7765b186b4620efaa5e
parent = e16452ab7640169e1235b91d598e3d90ba4ce57e
commit = f0a50e61d1713eb8b188d720fbe40a966919e85e
parent = 790ea5aadb212408ff609763898b54db4e45a784
method = merge
cmdver = 0.4.6
26 changes: 26 additions & 0 deletions barretenberg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## [0.47.1](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.47.0...barretenberg-v0.47.1) (2024-07-30)


### Features

* Add recursive aggregation object to proving/verification keys ([#6770](https://github.com/AztecProtocol/aztec-packages/issues/6770)) ([f48b069](https://github.com/AztecProtocol/aztec-packages/commit/f48b069181e316cb2a9d81f0acf6c00ee90e3db3))
* Adding aggregation to honk and rollup ([#7466](https://github.com/AztecProtocol/aztec-packages/issues/7466)) ([2633aa9](https://github.com/AztecProtocol/aztec-packages/commit/2633aa91a97684f481a861aee0be8756c956135a))
* **avm:** Pedersen commit in avm ([#7634](https://github.com/AztecProtocol/aztec-packages/issues/7634)) ([45e7867](https://github.com/AztecProtocol/aztec-packages/commit/45e7867f4b42a3392b4b95767621284ebc7378fe))
* **avm:** Pedersen commitment sim ([#7632](https://github.com/AztecProtocol/aztec-packages/issues/7632)) ([cc420a0](https://github.com/AztecProtocol/aztec-packages/commit/cc420a081e23558b9441cbf563625002e1d45f18))
* **sol-honk:** Integrate solidity honk verifier with bb and acir tests ([#7573](https://github.com/AztecProtocol/aztec-packages/issues/7573)) ([344ca6f](https://github.com/AztecProtocol/aztec-packages/commit/344ca6f413263a3c2c516b388f85a11fada2840f))
* **sol-honk:** Test verifying recursive proof ([#7576](https://github.com/AztecProtocol/aztec-packages/issues/7576)) ([26408c1](https://github.com/AztecProtocol/aztec-packages/commit/26408c197f5c6e8a300d24e441f4a4860210b5f0))


### Bug Fixes

* Bb mac build ([#7619](https://github.com/AztecProtocol/aztec-packages/issues/7619)) ([e3c5602](https://github.com/AztecProtocol/aztec-packages/commit/e3c560216e1bce7d22e30ef18d428f1ab7335a09))


### Miscellaneous

* **bb readme:** Add installation instructions and TODOs ([#7601](https://github.com/AztecProtocol/aztec-packages/issues/7601)) ([1a97698](https://github.com/AztecProtocol/aztec-packages/commit/1a97698071a667cd56510c7b7201373a9ac9c646))
* **bb readme:** Update versioning instructions and add Honk Solidity verifier commands ([#7608](https://github.com/AztecProtocol/aztec-packages/issues/7608)) ([9dd9195](https://github.com/AztecProtocol/aztec-packages/commit/9dd9195d8da2d7e2bc85d39e53b33cc82597da1f))
* Call requests ([#7483](https://github.com/AztecProtocol/aztec-packages/issues/7483)) ([ffedf39](https://github.com/AztecProtocol/aztec-packages/commit/ffedf39d98aee4c4149e55e4a133e878553e1e25))
* Constant inputs for most blackboxes ([#7613](https://github.com/AztecProtocol/aztec-packages/issues/7613)) ([3247058](https://github.com/AztecProtocol/aztec-packages/commit/3247058d2e54e1fb84680ad9fcf9ece611235e96))
* Merge Devnet back to Master ([#7611](https://github.com/AztecProtocol/aztec-packages/issues/7611)) ([112961c](https://github.com/AztecProtocol/aztec-packages/commit/112961cd9c9276e2cd95b41b6de31d27bb43bb41))

## [0.47.0](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.46.7...barretenberg-v0.47.0) (2024-07-24)


Expand Down
12 changes: 12 additions & 0 deletions barretenberg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,15 @@ Stack trace (most recent call last):
25: blocks.arithmetic.q_2().emplace_back(in.b_scaling);
gate number4
```


### Improving LLDB Debugging

It can be quite hard to make sense of field_t circuit values that indirectly reference their contents, and even plain field values that are typically in montgomery form.
In command-line LLDB or VSCode debug console, run:

```
command script import ~/aztec-packages/barretenberg/cpp/scripts/lldb_format.py
```

Now when you `print` things with e.g. `print bigfield_t.get_value()` or inspect in VSCode (if you opened the debug console and put in these commands) then you will get pretty-printing of these types. This can be expanded fairly easily with more types if needed.
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.47.0 # x-release-please-version
VERSION 0.47.1 # x-release-please-version
LANGUAGES CXX C
)
# Insert version into `bb` config file
Expand Down
45 changes: 45 additions & 0 deletions barretenberg/cpp/scripts/lldb_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import lldb

# Define the bn254 modulus
N = 21888242871839275222246405745257275088548364400416034343698204186575808495617

# Define R as a power of 2 such that R > N (commonly used R for bn254 is 2^256)
R = 2**256

# Compute R inverse modulo N
R_inv = pow(R, -1, N)

def montgomery_to_standard(montgomery_value):
# Convert from Montgomery form to standard representation
standard_value = (montgomery_value * R_inv) % N
return standard_value

def montgomery_summary(valobj, internal_dict):
try:
data = valobj.GetChildMemberWithName('data')
data_0 = data.GetChildAtIndex(0).GetValueAsUnsigned()
data_1 = data.GetChildAtIndex(1).GetValueAsUnsigned()
data_2 = data.GetChildAtIndex(2).GetValueAsUnsigned()
data_3 = data.GetChildAtIndex(3).GetValueAsUnsigned()

montgomery_value = (
data_0 +
(data_1 << 64) +
(data_2 << 128) +
(data_3 << 192)
)

standard_value = montgomery_to_standard(montgomery_value)
return hex(standard_value)
except Exception as e:
return f"Error: {e}"


def montgomery_summary2(valobj, internal_dict):
return montgomery_summary(valobj.EvaluateExpression("get_value()"), internal_dict)


def __lldb_init_module(debugger, internal_dict):
debugger.HandleCommand("type summary add --python-function lldb_format.montgomery_summary bb::fr")
debugger.HandleCommand("type summary add --python-function lldb_format.montgomery_summary2 -x \"bb::stdlib::field_t.*\"")
print('The "formatter" command has been installed!')
1 change: 1 addition & 0 deletions barretenberg/cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ else()
message(STATUS "Using optimized assembly for field arithmetic.")
endif()

add_subdirectory(barretenberg/aztec_ivc)
add_subdirectory(barretenberg/bb)
add_subdirectory(barretenberg/circuit_checker)
add_subdirectory(barretenberg/client_ivc)
Expand Down
1 change: 1 addition & 0 deletions barretenberg/cpp/src/barretenberg/aztec_ivc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
barretenberg_module(aztec_ivc goblin)
Loading

0 comments on commit b7b489e

Please sign in to comment.