chore: Run nargo fmt on "formatting:fix"#3372
Conversation
| // docs:end:imports | ||
|
|
||
| // docs:start:storage_struct | ||
|
|
||
| // docs:end:imports | ||
| // docs:start:storage_struct |
There was a problem hiding this comment.
Do you know if this will affect docs codegen?
There was a problem hiding this comment.
Should now, I write it like that in many of the cases I have used
There was a problem hiding this comment.
Looks like it removed some of the docs stuff though 💀 docs now building because it cannot find ends
78cf3f6 to
91f3d6c
Compare
|
The |
yarn-project/noir-contracts/src/contracts/card_game_contract/src/game.nr
Outdated
Show resolved
Hide resolved
yarn-project/noir-contracts/src/contracts/card_game_contract/src/game.nr
Outdated
Show resolved
Hide resolved
yarn-project/noir-contracts/src/contracts/docs_example_contract/src/actions.nr
Show resolved
Hide resolved
yarn-project/noir-contracts/src/contracts/docs_example_contract/src/main.nr
Show resolved
Hide resolved
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Values are compared against data from master at commit L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 16 txs.
Circuits statsStats on running time and I/O sizes collected for every circuit run across all benchmarks.
MiscellaneousTransaction sizes based on how many contracts are deployed in the tx.
|
| note_interface: NoteInterface<Note, N>, | ||
| options: NoteViewerOptions<Note, N>, | ||
| ) -> [Option<Note>; MAX_NOTES_PER_PAGE] { | ||
| unconstrained pub fn view_notes<Note, N>(storage_slot: Field, note_interface: NoteInterface<Note, N>, options: NoteViewerOptions<Note, N>) -> [Option<Note>; MAX_NOTES_PER_PAGE] { |
There was a problem hiding this comment.
@f01dab1e I know you are most likely aware of this but having line length set to 120 by default would be useful. Is max line length already supported?
There was a problem hiding this comment.
Yes, this can be done. In noirfmt.toml:
max_width = 120The list of settings is here: https://github.com/noir-lang/noir/blob/master/tooling/nargo_fmt/src/config.rs#L44-L53
| .select(0, points as Field) | ||
| .select(1, secret) | ||
| .select(2, account_address) | ||
| pub fn create_exact_card_getter_options(points: u8, secret: Field, account_address: Field) -> NoteGetterOptions<CardNote, CARD_NOTE_LEN, Field> { |
There was a problem hiding this comment.
@f01dab1e Not wrapping function declaration looks like the only big issue with the formatter now. Everything else are minor issues.
There was a problem hiding this comment.
If needed, we support ignoring elements through // noir-fmt:ignore
There was a problem hiding this comment.
But it seems in this case we have a bug, as we are not taking into account the size of the function name
| // nested call to confirm that balance is zero | ||
| let _callStackItem3 = context.call_private_function(inputs.call_context.storage_contract_address, | ||
| get_note_zero_fn_selector, | ||
| [owner]); |
There was a problem hiding this comment.
@f01dab1e In this case doing this:
let _callStackItem3 = context.call_private_function(
inputs.call_context.storage_contract_address,
get_note_zero_fn_selector,
[owner]
);
would be nicer but it's a detail.
Run the
nargo fmtcommand when executingformatting:fixso our eyes may rest in peaceChecklist:
Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.