Skip to content

Commit

Permalink
Update 8bit_cpu_64_cycles.js
Browse files Browse the repository at this point in the history
  • Loading branch information
supertestnet authored Dec 10, 2023
1 parent 8fc0d3b commit 4a0ffd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/view/8bit_cpu_64_cycles.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ if ($('.cpu_8bit_64_cycles_program')) {
bytes_to_chop_off.forEach( item => {var i; for ( i=0; i<8; i++ ) bits_to_chop_off.push( item * 8 + i );});
var assembly_bits = {}
assembly_bits_prep.forEach( ( item, index ) => {if ( !bits_to_chop_off.includes( index ) ) assembly_bits[ String( index ) ] = item;});
var assembly_bits_to_send_vicky = [];
Object.keys( assembly_bits ).forEach( item => assembly_bits_to_send_vicky.push( Number( item ) ) );
console.log( "assembly_bits:", assembly_bits );
var remaining_ram_bits = "0".repeat( 120 ).split( "" );
var assembly_preimages = [];
Object.keys( assembly_bits ).forEach( ( item ) => assembly_preimages.push( initial_commitment_preimages[ 35 + Number( item ) ][ assembly_bits[ item ] ] ));
console.log( "assembly_preimages:", assembly_preimages );
var preimage_positions = [0, 1, 2, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162];
var intended_output_preimages = [0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
var revealed_output_preimages = [];
Expand All @@ -84,7 +85,7 @@ if ($('.cpu_8bit_64_cycles_program')) {
subsequent_commitment_hashes,
output_preimages: revealed_output_preimages,
assembly: assembly_preimages,
assembly_bits_included: assembly_bits,
assembly_bits_included: assembly_bits_to_send_vicky,
}
saveDataToFile(JSON.stringify(message_to_vicky), "promise_file.txt");
}
Expand Down

0 comments on commit 4a0ffd0

Please sign in to comment.