Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/cargo/rustls-0.21.11
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Apr 22, 2024
2 parents cfd77a3 + 1969ce3 commit 116e079
Show file tree
Hide file tree
Showing 117 changed files with 508 additions and 393 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: ${{ matrix.target }}
components: clippy, rustfmt
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gates_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-acvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

# These steps are in a specific order so crate dependencies are updated first
- name: Publish acir_field
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx$(sw_vers -productVersion) --show-sdk-platform-version)" >> $GITHUB_ENV
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: ${{ matrix.target }}

Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: ${{ matrix.target }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-rust-workspace-msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: x86_64-unknown-linux-gnu

Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: x86_64-unknown-linux-gnu

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-rust-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: x86_64-unknown-linux-gnu

Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: x86_64-unknown-linux-gnu

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
* reserve `unchecked` keyword ([#4432](https://github.com/noir-lang/noir/issues/4432))
* Remove empty value from bounded vec ([#4431](https://github.com/noir-lang/noir/issues/4431))
* Ban Fields in for loop indices and bitwise ops ([#4376](https://github.com/noir-lang/noir/issues/4376))
* bump msrv to 1.73.0 ([#4406](https://github.com/noir-lang/noir/issues/4406))
* Bump msrv to 1.73.0 ([#4406](https://github.com/noir-lang/noir/issues/4406))
* **ci:** Bump MSRV to 1.72.1 and enforce that ACVM can be published using updated lockfile ([#4385](https://github.com/noir-lang/noir/issues/4385))
* Restrict bit sizes ([#4235](https://github.com/noir-lang/noir/issues/4235))
* move noir out of yarn-project (https://github.com/AztecProtocol/aztec-packages/pull/4479)
Expand Down
4 changes: 1 addition & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ version = "0.27.0"
# x-release-please-end
authors = ["The Noir Team <team@noir-lang.org>"]
edition = "2021"
rust-version = "1.73.0"
rust-version = "1.74.1"
license = "MIT OR Apache-2.0"
repository = "https://github.com/noir-lang/noir/"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The current focus is to gather as much feedback as possible while in the alpha p

## Minimum Rust version

This workspace's minimum supported rustc version is 1.73.0.
This workspace's minimum supported rustc version is 1.74.1.

## License

Expand Down
3 changes: 0 additions & 3 deletions acvm-repo/acvm_js/test/browser/black_box_solvers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ import initACVM, {
blake2s256,
ecdsa_secp256k1_verify,
ecdsa_secp256r1_verify,
initLogLevel,
keccak256,
sha256,
xor,
} from '@noir-lang/acvm_js';

beforeEach(async () => {
await initACVM();

initLogLevel('INFO');
});

it('successfully calculates the bitwise AND of two fields', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use noirc_errors::{Location, Span};
use noirc_frontend::ast::{FunctionReturnType, NoirFunction, UnresolvedTypeData};
use noirc_frontend::{
graph::CrateId,
macros_api::{FileId, HirContext},
parse_program, FunctionReturnType, NoirFunction, Type, UnresolvedTypeData,
parse_program, Type,
};

use crate::utils::{
Expand Down
5 changes: 3 additions & 2 deletions aztec_macros/src/transforms/contract_interface.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use noirc_frontend::ast::{NoirFunction, UnresolvedTypeData};
use noirc_frontend::{
graph::CrateId,
macros_api::{FileId, HirContext, HirExpression, HirLiteral, HirStatement},
parse_program,
parser::SortedModule,
NoirFunction, Type, UnresolvedTypeData,
Type,
};

use crate::utils::{
Expand Down Expand Up @@ -52,7 +53,7 @@ pub fn stub_function(aztec_visibility: &str, func: &NoirFunction) -> String {
})
.collect::<Vec<_>>()
.join(", ");
let fn_return_type: noirc_frontend::UnresolvedType = func.return_type();
let fn_return_type: noirc_frontend::ast::UnresolvedType = func.return_type();

let fn_selector = format!("dep::aztec::protocol_types::abis::function_selector::FunctionSelector::from_signature(\"{}\")", SELECTOR_PLACEHOLDER);

Expand Down
6 changes: 4 additions & 2 deletions aztec_macros/src/transforms/events.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use iter_extended::vecmap;
use noirc_errors::Span;
use noirc_frontend::ast::{
ExpressionKind, FunctionDefinition, FunctionReturnType, ItemVisibility, Literal, NoirFunction,
Visibility,
};
use noirc_frontend::{
graph::CrateId,
macros_api::{
Expand All @@ -8,8 +12,6 @@ use noirc_frontend::{
UnresolvedTypeData,
},
token::SecondaryAttribute,
ExpressionKind, FunctionDefinition, FunctionReturnType, ItemVisibility, Literal, NoirFunction,
Visibility,
};

use crate::{
Expand Down
15 changes: 9 additions & 6 deletions aztec_macros/src/transforms/functions.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
use convert_case::{Case, Casing};
use noirc_errors::Span;
use noirc_frontend::{
macros_api::FieldElement, parse_program, BlockExpression, ConstrainKind, ConstrainStatement,
Distinctness, Expression, ExpressionKind, ForLoopStatement, ForRange, FunctionReturnType,
Ident, Literal, NoirFunction, NoirStruct, Param, PathKind, Pattern, Signedness, Statement,
StatementKind, UnresolvedType, UnresolvedTypeData, Visibility,
use noirc_frontend::ast;
use noirc_frontend::ast::{
BlockExpression, ConstrainKind, ConstrainStatement, Distinctness, Expression, ExpressionKind,
ForLoopStatement, ForRange, FunctionReturnType, Ident, Literal, NoirFunction, NoirStruct,
Param, PathKind, Pattern, Signedness, Statement, StatementKind, UnresolvedType,
UnresolvedTypeData, Visibility,
};

use noirc_frontend::{macros_api::FieldElement, parse_program};

use crate::{
chained_dep, chained_path,
utils::{
Expand Down Expand Up @@ -334,7 +337,7 @@ fn serialize_to_hasher(
&UnresolvedType {
typ: UnresolvedTypeData::Integer(
Signedness::Unsigned,
noirc_frontend::IntegerBitSize::ThirtyTwo,
ast::IntegerBitSize::ThirtyTwo,
),
span: None,
},
Expand Down
8 changes: 6 additions & 2 deletions aztec_macros/src/transforms/note_interface.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
use noirc_errors::Span;
use noirc_frontend::ast::{
ItemVisibility, LetStatement, NoirFunction, NoirStruct, PathKind, TraitImplItem, TypeImpl,
UnresolvedTypeData, UnresolvedTypeExpression,
};
use noirc_frontend::{
graph::CrateId,
macros_api::{FileId, HirContext, HirExpression, HirLiteral, HirStatement},
parse_program,
parser::SortedModule,
ItemVisibility, LetStatement, NoirFunction, NoirStruct, PathKind, TraitImplItem, Type,
TypeImpl, UnresolvedTypeData, UnresolvedTypeExpression,
Type,
};

use regex::Regex;

use crate::{
Expand Down
8 changes: 5 additions & 3 deletions aztec_macros/src/transforms/storage.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
use std::borrow::Borrow;

use noirc_errors::Span;
use noirc_frontend::ast::{
BlockExpression, Expression, ExpressionKind, FunctionDefinition, Ident, Literal, NoirFunction,
NoirStruct, PathKind, Pattern, StatementKind, TypeImpl, UnresolvedType, UnresolvedTypeData,
};
use noirc_frontend::{
graph::CrateId,
macros_api::{
Expand All @@ -10,9 +14,7 @@ use noirc_frontend::{
parse_program,
parser::SortedModule,
token::SecondaryAttribute,
BlockExpression, Expression, ExpressionKind, FunctionDefinition, Ident, Literal, NoirFunction,
NoirStruct, PathKind, Pattern, StatementKind, Type, TypeImpl, UnresolvedType,
UnresolvedTypeData,
Type,
};

use crate::{
Expand Down
11 changes: 6 additions & 5 deletions aztec_macros/src/utils/ast_utils.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use noirc_errors::{Span, Spanned};
use noirc_frontend::{
token::SecondaryAttribute, BinaryOpKind, CallExpression, CastExpression, Expression,
ExpressionKind, FunctionReturnType, Ident, IndexExpression, InfixExpression, Lambda,
LetStatement, MethodCallExpression, NoirTraitImpl, Path, Pattern, PrefixExpression, Statement,
StatementKind, TraitImplItem, UnaryOp, UnresolvedType, UnresolvedTypeData,
use noirc_frontend::ast::{
BinaryOpKind, CallExpression, CastExpression, Expression, ExpressionKind, FunctionReturnType,
Ident, IndexExpression, InfixExpression, Lambda, LetStatement, MethodCallExpression,
NoirTraitImpl, Path, Pattern, PrefixExpression, Statement, StatementKind, TraitImplItem,
UnaryOp, UnresolvedType, UnresolvedTypeData,
};
use noirc_frontend::token::SecondaryAttribute;

//
// Helper macros for creating noir ast nodes
Expand Down
9 changes: 5 additions & 4 deletions aztec_macros/src/utils/errors.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
use noirc_errors::Span;
use noirc_frontend::{macros_api::MacroError, UnresolvedTypeData};
use noirc_frontend::ast;
use noirc_frontend::macros_api::MacroError;

use super::constants::MAX_CONTRACT_PRIVATE_FUNCTIONS;

#[derive(Debug, Clone)]
pub enum AztecMacroError {
AztecDepNotFound,
ContractHasTooManyPrivateFunctions { span: Span },
UnsupportedFunctionArgumentType { span: Span, typ: UnresolvedTypeData },
UnsupportedFunctionReturnType { span: Span, typ: UnresolvedTypeData },
UnsupportedStorageType { span: Option<Span>, typ: UnresolvedTypeData },
UnsupportedFunctionArgumentType { span: Span, typ: ast::UnresolvedTypeData },
UnsupportedFunctionReturnType { span: Span, typ: ast::UnresolvedTypeData },
UnsupportedStorageType { span: Option<Span>, typ: ast::UnresolvedTypeData },
CouldNotAssignStorageSlots { secondary_message: Option<String> },
CouldNotImplementComputeNoteHashAndNullifier { secondary_message: Option<String> },
CouldNotImplementNoteInterface { span: Option<Span>, secondary_message: Option<String> },
Expand Down
Loading

0 comments on commit 116e079

Please sign in to comment.