Base sum gate (#7)

* initial version of base_sum_gate

* add recursive circuit benchmark files

* added step circuit data and contant gate test

* moved step testing data into gate_testing_utils

* added test case for basesum gate

* added test for arithmetic_gate
This commit is contained in:
Kevin Jue
2023-05-16 11:13:42 -07:00
committed by GitHub
parent 11f5ee28c6
commit a0d5ad37de
16 changed files with 76099 additions and 3 deletions

View File

@@ -0,0 +1,172 @@
{
"config": {
"num_wires": 135,
"num_routed_wires": 80,
"num_constants": 2,
"use_base_arithmetic_gate": true,
"security_bits": 100,
"num_challenges": 2,
"zero_knowledge": false,
"max_quotient_degree_factor": 8,
"fri_config": {
"rate_bits": 3,
"cap_height": 4,
"proof_of_work_bits": 16,
"reduction_strategy": {
"ConstantArityBits": [
4,
5
]
},
"num_query_rounds": 2
}
},
"fri_params": {
"config": {
"rate_bits": 3,
"cap_height": 4,
"proof_of_work_bits": 16,
"reduction_strategy": {
"ConstantArityBits": [
4,
5
]
},
"num_query_rounds": 2
},
"hiding": false,
"degree_bits": 9,
"reduction_arity_bits": [
4
]
},
"gates": [
"NoopGate",
"ConstantGate { num_consts: 2 }",
"PublicInputGate",
"BaseSumGate { num_limbs: 63 } + Base: 2",
"ReducingExtensionGate { num_coeffs: 32 }",
"ReducingGate { num_coeffs: 43 }",
"ArithmeticExtensionGate { num_ops: 10 }",
"ArithmeticGate { num_ops: 20 }",
"MulExtensionGate { num_ops: 13 }",
"RandomAccessGate { bits: 4, num_copies: 4, num_extra_constants: 2, _phantom: PhantomData<plonky2_field::goldilocks_field::GoldilocksField> }<D=2>",
"PoseidonGate(PhantomData<plonky2_field::goldilocks_field::GoldilocksField>)<WIDTH=12>"
],
"selectors_info": {
"selector_indices": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
2
],
"groups": [
{
"start": 0,
"end": 6
},
{
"start": 6,
"end": 10
},
{
"start": 10,
"end": 11
}
]
},
"quotient_degree_factor": 8,
"num_gate_constraints": 123,
"num_constants": 5,
"num_public_inputs": 0,
"k_is": [
1,
7,
49,
343,
2401,
16807,
117649,
823543,
5764801,
40353607,
282475249,
1977326743,
13841287201,
96889010407,
678223072849,
4747561509943,
33232930569601,
232630513987207,
1628413597910449,
11398895185373143,
79792266297612001,
558545864083284007,
3909821048582988049,
8922003270666332022,
7113790686420571191,
12903046666114829695,
16534350385145470581,
5059988279530788141,
16973173887300932666,
8131752794619022736,
1582037354089406189,
11074261478625843323,
3732854072722565977,
7683234439643377518,
16889152938674473984,
7543606154233811962,
15911754940807515092,
701820169165099718,
4912741184155698026,
15942444219675301861,
916645121239607101,
6416515848677249707,
8022122801911579307,
814627405137302186,
5702391835961115302,
3023254712898638472,
2716038920875884983,
565528376716610560,
3958698637016273920,
9264146389699333119,
9508792519651578870,
11221315429317299127,
4762231727562756605,
14888878023524711914,
11988425817600061793,
10132004445542095267,
15583798910550913906,
16852872026783475737,
7289639770996824233,
14133990258148600989,
6704211459967285318,
10035992080941828584,
14911712358349047125,
12148266161370408270,
11250886851934520606,
4969231685883306958,
16337877731768564385,
3684679705892444769,
7346013871832529062,
14528608963998534792,
9466542400916821939,
10925564598174000610,
2691975909559666986,
397087297503084581,
2779611082521592067,
1010533508236560148,
7073734557655921036,
12622653764762278610,
14571600075677612986,
9767480182670369297
],
"num_partial_products": 9
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,140 @@
{
"constants_sigmas_cap": [
{
"elements": [
158845205314874220,
9668380905015929998,
1411954196422652535,
16261560315091018602
]
},
{
"elements": [
10819768878069205512,
10806329121382974236,
4449962652936030991,
3437130958683867731
]
},
{
"elements": [
13409308832792573752,
5142428395608775971,
8304804561534366563,
3333782371953158323
]
},
{
"elements": [
18228625912291347825,
10166925566614695203,
18158685652491144528,
5812383934966268838
]
},
{
"elements": [
9826807818157299303,
16982355347088639655,
9164194217012055587,
2807644941373961188
]
},
{
"elements": [
14310741273297755831,
12981827714166111968,
4530737992662289685,
18335773668219568846
]
},
{
"elements": [
7917966912899515534,
17667717333057450416,
952641997971486450,
428804504796282154
]
},
{
"elements": [
6150969121154358920,
8533162538572915310,
13902780732405127329,
10048329503515769882
]
},
{
"elements": [
17799006350046251788,
10571037994954145577,
16382491710544403234,
8887053452984223370
]
},
{
"elements": [
3963886065503765705,
2739764768577488879,
5343505536176223500,
9151432391854309795
]
},
{
"elements": [
4165310799113686308,
10915634867031695254,
5813235613342911366,
17907275021812350449
]
},
{
"elements": [
12954911538188629834,
6738667513261916639,
12025960525821021496,
3765915660295958137
]
},
{
"elements": [
15699732256890621800,
14355912053969064032,
9559845752177194786,
6008684051170164157
]
},
{
"elements": [
5973104887002336129,
15822297470108300955,
1285855046140391788,
8567304882129939594
]
},
{
"elements": [
531701086966465293,
13988001761158611208,
10640541520023034000,
12368315472470450606
]
},
{
"elements": [
16726108137472169650,
9400941780708454743,
2656080070909638220,
10262921538692249992
]
}
],
"circuit_digest": {
"elements": [
7291397556757192596,
149044718719699113,
14214393601687894808,
15901190186686913364
]
}
}