Comparing version 0.0.1 to 0.0.2
# Binary format for R1CS | ||
--- | ||
eip: | ||
title: r1cs binary format | ||
author: Jordi Baylina <jordi@baylina.cat> | ||
discussions-to: | ||
status: draft | ||
type: Standards Track | ||
category: ERC | ||
created: 2019-09-24 | ||
requires: | ||
--- | ||
## Simple Summary | ||
@@ -481,3 +469,3 @@ | ||
ββββββββββββ | ||
β 72316377 β Magic | ||
β 72316373 β Magic | ||
β£βββββββββββ« | ||
@@ -493,5 +481,5 @@ β 01000000 β Version | ||
β 20000000 β Field Size | ||
β£βββββββββββ»ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||
β£βββββββββββ»βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||
β 010000f0 93f5e143 9170b979 48e83328 5d588181 b64550b8 29a031e1 724e6430 β | ||
β£βββββββββββ³ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||
β£βββββββββββ³βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||
β 07000000 β # of wires | ||
@@ -510,3 +498,3 @@ β£βββββββββββ« | ||
ββββββββββββ³ββββββββββββββββββββ | ||
β 02000000 β 88200000 00000000 β SectionType: Constraints | ||
β 02000000 β 88020000 00000000 β SectionType: Constraints | ||
ββββββββββββ»ββββββββββββββββββββ | ||
@@ -518,3 +506,3 @@ ββββββββββββ Constraint 0: (3w_5 + 8w_6) * (2w_0 + 20w_2 + 12w_3) - (5w_0 + 7w_2) = 0 | ||
β£βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ« | ||
β 06000000 β 01000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 β | ||
β 06000000 β 08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 β | ||
ββββββββββββ»ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||
@@ -526,3 +514,3 @@ ββββββββββββ | ||
β£βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ« | ||
β 02000000 β 01140000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 β | ||
β 02000000 β 14000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 β | ||
β£βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ« | ||
@@ -602,3 +590,3 @@ β 03000000 β 0C000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 β | ||
```` | ||
72316377 | ||
72316373 | ||
01000000 | ||
@@ -615,9 +603,9 @@ 03000000 | ||
03000000 | ||
02000000 88200000 00000000 | ||
02000000 88020000 00000000 | ||
02000000 | ||
05000000 03000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 | ||
06000000 01000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 | ||
06000000 08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 | ||
03000000 | ||
00000000 02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 | ||
02000000 01140000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 | ||
02000000 14000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 | ||
03000000 0C000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 | ||
@@ -624,0 +612,0 @@ 02000000 |
{ | ||
"name": "r1csfile", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "r1cs file format parser", | ||
@@ -29,3 +29,9 @@ "main": "index.js", | ||
}, | ||
"homepage": "https://github.com/iden3/r1csfile#readme" | ||
"homepage": "https://github.com/iden3/r1csfile#readme", | ||
"dependencies": { | ||
"big-integer": "^1.6.48" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^6.8.0" | ||
} | ||
} |
@@ -56,6 +56,6 @@ | ||
res.nWires = await readU32(); | ||
res.nPubOuts = await readU32(); | ||
res.nPubIns = await readU32(); | ||
res.nPrvIns = await readU32(); | ||
res.nVars = await readU32(); | ||
res.nOutputs = await readU32(); | ||
res.nPubInputs = await readU32(); | ||
res.nPrvInputs = await readU32(); | ||
res.nLabels = await readU64(); | ||
@@ -84,3 +84,3 @@ res.nConstraints = await readU32(); | ||
res.map = []; | ||
for (let i=0; i<res.nLabels; i++) { | ||
for (let i=0; i<res.nVars; i++) { | ||
const idx = await readU64(); | ||
@@ -107,3 +107,3 @@ res.map.push(idx); | ||
const b = Buffer.allocUnsafe(8); | ||
await fd.read(b, 0, 4, p); | ||
await fd.read(b, 0, 8, p); | ||
@@ -123,3 +123,3 @@ p+=8; | ||
for (let i=0; i<n32; i++) { | ||
arr[n32-1-i] = b.readUInt32LL(i*4); | ||
arr[n32-1-i] = b.readUInt32LE(i*4); | ||
} | ||
@@ -126,0 +126,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119817
13
245
1
1
+ Addedbig-integer@^1.6.48
+ Addedbig-integer@1.6.52(transitive)