Coder Social home page Coder Social logo

circomspect's People

Contributors

artemdinaburg avatar fcasal avatar fegge avatar gratla avatar tjade273 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circomspect's Issues

Circomspect doesn't recognize the syntax of a valid circom file.

I have a file which looks like this at the beginning

include "../node_modules/circomlib/circuits/poseidon.circom";
include "./merkleProof.circom"
include "./keypair.circom" 

but when I analyse it, it gives

# circomspect transaction.circom
error: UnrecognizedToken { token: (93, Token(61, "include"), 100), expected: ["\")\"", "\",\"", "\";\""] }                                                                  
  ┌─ /home/user/cash/circuits/transaction.circom:3:1
  │ 
3 │ include "./keypair.circom"
  │ ^^^^^^^ Invalid syntax

circomspect: 1 issue found.

However, the same file does compiles fine using npx circom -v without giving other input files or input settings on the command line.

The `signal-assignment` analysis pass should not emit warnings for constrained signals

If the assigned signal is constrained elsewhere in the circuit, it is enough to emit an informational finding.

In particular, the following should not raise a warning.

warning: Using the signal assignment operator `<--` does not constrain the assigned signal.
   ┌─ /.../file.circom:72:9
   │
72 │         m[i] <-- out[0][i];
   │         ^^^^^^^^^^^^^^^^^^^^^^^^^ The assigned signal `m[i]` is not constrained here.
73 │         mRangeCheck[i] = Num2Bits(n);
74 │         mRangeCheck[i].in <== m[i];
   │         -------------------------- The signal `q[i]` is constrained here.
   │
   = For more details, see https://github.com/trailofbits/circomspect/blob/main/doc/analysis_passes.md#signal-assignment.

The `unconstrained-less-than` analysis pass does not check if the input is constant

The unconstrained-less-than analysis pass should check if the input evaluates to a constant value before emitting a warning.

In particular, warnings like the following do not make any sense.

warning: Inputs to `LessThan` need to be constrained to ensure that they are non-negative
   ┌─ /.../file.circom:72:28
   │
72 │         lt.in[1] <== 50 + 5;
   │                      ^^^^^^ `50 + 5` needs to be constrained to ensure that it is <= p/2.
   │
   = For more details, see https://github.com/trailofbits/circomspect/blob/main/doc/analysis_passes.md#unconstrained-less-than.

installation: cargo install fails

Symptoms

  • given: the machine is Macbook Pro Apple M1
  • when: running the following command
cargo install circomspect
  • then: the error comes as the follows. I tried to install cli after cloning the repository, but same symptom happens.
   Compiling circomspect-program-structure v2.0.11 (/Users/sigridjin.eth/Documents/github/circomspect/program_structure)
error[E0658]: `let...else` statements are unstable
   --> program_structure/src/intermediate_representation/expression_impl.rs:172:17
    |
172 | /                 let Some(range) = cond.degree() else {
173 | |                     return result;
174 | |                 };
    | |__________________^
    |
    = note: see issue #87335 <https://github.com/rust-lang/rust/issues/87335> for more information

   Compiling circomspect-parser v2.0.11 (/Users/sigridjin.eth/Documents/github/circomspect/parser)
For more information about this error, try `rustc --explain E0658`.
error: could not compile `circomspect-program-structure` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `circomspect v0.7.2 (/Users/sigridjin.eth/Documents/github/circomspect/cli)`, intermediate artifacts can be found at `/Users/sigridjin.eth/Documents/github/circomspect/target`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.