Skip to content

Commit

Permalink
Remove old proof fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasifaee committed May 28, 2024
1 parent 60e2f73 commit 422a828
Show file tree
Hide file tree
Showing 38 changed files with 5 additions and 471 deletions.
2 changes: 0 additions & 2 deletions ethereum/circuits/lib/src/fixtures/mainnet/cancun/approve.nr
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
mod header;
mod receipt_proof_new;
mod receipt_proof;
mod receipt;
mod transaction;
mod transaction_proof_new;
mod transaction_proof;
mod log;

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
mod header;
mod receipt_proof_new;
mod receipt_proof;
mod receipt;
mod transaction;
mod transaction_proof_new;
mod transaction_proof;
mod log;

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions ethereum/circuits/lib/src/fixtures/mainnet/cancun/transfer.nr
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
mod receipt_proof_new;
mod receipt_proof;
mod receipt;
mod transaction;
mod transaction_proof_new;
mod transaction_proof;

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod header;
mod account;
mod state_proof;
mod state_proof_new;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod header;
mod account;
mod state_proof;
mod state_proof_new;

This file was deleted.

2 changes: 0 additions & 2 deletions ethereum/circuits/lib/src/fixtures/mainnet/homestead/fork.nr
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod header;
mod receipt_proof_new;
mod receipt_proof;
mod receipt;
mod transaction;
mod transaction_proof_new;
mod transaction_proof;

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod header;
mod account;
mod state_proof;
mod state_proof_new;
mod storage;
mod storage_proof;
mod storage_proof_new;

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod header;
mod account;
mod state_proof;
mod state_proof_new;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod header;
mod account;
mod state_proof;
mod state_proof_new;
mod storage;
mod storage_proof;
mod storage_proof_new;

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions ethereum/circuits/lib/src/fixtures/mainnet/paris/nouns.nr
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod header;
mod account;
mod state_proof;
mod state_proof_new;
mod storage;
mod storage_proof;
mod storage_proof_new;

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod header;
mod account;
mod state_proof;
mod state_proof_new;
mod storage;
mod storage_proof;
mod storage_proof_new;

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
mod account;
mod state_proof;
mod state_proof_new;
mod storage;
mod storage_proof;
mod storage_proof_new;

This file was deleted.

This file was deleted.

3 changes: 1 addition & 2 deletions ethereum/circuits/lib/src/rlp/types_test.nr
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@ mod rlp_fragment {
use crate::rlp::types::{STRING, RlpFragment};
use crate::misc::types::Address;
use crate::misc::{arrays::alter_array, fragment::Fragment};
use crate::fixtures::mainnet::frontier::first::state_proof::state_proof as state_proof;
use crate::fixtures::mainnet::london::crypto_punks::account::address;

global address = state_proof.key;
global address_fragment = Fragment::from_array(address);
global fragment = RlpFragment { offset: 0, length: 20, data_type: STRING };

Expand Down
37 changes: 0 additions & 37 deletions ethereum/oracles/src/noir/oracles/accountOracle/encode.test.ts

This file was deleted.

82 changes: 0 additions & 82 deletions ethereum/oracles/src/noir/oracles/accountOracle/encode.ts

This file was deleted.

13 changes: 0 additions & 13 deletions ethereum/oracles/src/noir/oracles/rpc/accountOracle.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,7 @@ describe('accountOracle', () => {
accountProofConfig.maxPrefixedKeyNibbleLen + accountProofConfig.maxValueLen
);
expect(proofInputValuePart).toMatchSnapshot();
<<<<<<< HEAD:ethereum/oracles/src/noir/oracles/rpc/accountOracle.int.test.ts
<<<<<<< HEAD:ethereum/oracles/src/noir/oracles/rpc/accountOracle.int.test.ts
const proofInputDepthPart = account[OFFSETS.PROOF_INPUT][account[OFFSETS.PROOF_INPUT].length - 1];
expect(proofInputDepthPart).toStrictEqual('0x09');
=======
const proofInputDepthPart = account[OFFSETS.PROOF_INPUT].slice(
account[OFFSETS.PROOF_INPUT].length - 1,
account[OFFSETS.PROOF_INPUT].length
);
expect(proofInputDepthPart).toStrictEqual(['0x09']);
>>>>>>> ea830395 (Update account & proof oracles tests):ethereum/oracles/src/noir/oracles/accountOracle.int.test.ts
=======
const proofInputDepthPart = account[OFFSETS.PROOF_INPUT][account[OFFSETS.PROOF_INPUT].length - 1];
expect(proofInputDepthPart).toStrictEqual('0x09');
>>>>>>> f869f18a (Remove slicing where unnecessary):ethereum/oracles/src/noir/oracles/accountOracle.int.test.ts
});
});
16 changes: 4 additions & 12 deletions ethereum/oracles/src/script/prepareNoirHistoryAPIFixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ import { HISTORY_API_FIXTURES } from '../fixtures/historyAPIConfig.js';
import { assert } from '../main.js';
import { createAccountFixture } from './noir_fixtures/account.js';
import { createHeaderFixture } from './noir_fixtures/header.js';
import { createReceiptProofFixture } from './noir_fixtures/receipt_proof.js';
import { createStateProofFixture } from './noir_fixtures/state_proof.js';
import { createStorageProofFixture } from './noir_fixtures/storage_proof.js';
import { createTransactionFixture } from './noir_fixtures/transaction.js';
import { getTxProof } from '../ethereum/txProof.js';
import { createTransactionProofFixture } from './noir_fixtures/transaction_proof.js';
import { createReceiptFixture } from './noir_fixtures/receipt.js';
import { createLogFixture } from './noir_fixtures/log.js';
import { createNewReceiptProofFixture } from './noir_fixtures/new_receipt_proof.js';
Expand Down Expand Up @@ -63,17 +59,15 @@ for (const chain in HISTORY_API_FIXTURES) {
});

await writeFile(join(modulePath, 'account.nr'), createAccountFixture(stateProof));
await writeFile(join(modulePath, 'state_proof.nr'), createStateProofFixture(stateProof));
await writeFile(join(modulePath, 'state_proof_new.nr'), createNewStateProofFixture(stateProof));
fixtureModules.push('account', 'state_proof', 'state_proof_new');
fixtureModules.push('account', 'state_proof_new');
if (storageKeys) {
await writeFile(join(modulePath, 'storage.nr'), createStorageFixture(stateProof));
await writeFile(join(modulePath, 'storage_proof.nr'), createStorageProofFixture(stateProof.storageProof));
await writeFile(
join(modulePath, 'storage_proof_new.nr'),
createNewStorageProofFixture(stateProof.storageProof)
);
fixtureModules.push('storage', 'storage_proof', 'storage_proof_new');
fixtureModules.push('storage', 'storage_proof_new');
}
}

Expand All @@ -84,9 +78,8 @@ for (const chain in HISTORY_API_FIXTURES) {
const receipt = blockReceipts[txIdx];
const txReceiptProof = await getReceiptProof(block, blockReceipts, txIdx);
await writeFile(join(modulePath, 'receipt.nr'), createReceiptFixture(receipt));
await writeFile(join(modulePath, 'receipt_proof.nr'), createReceiptProofFixture(txReceiptProof));
await writeFile(join(modulePath, 'receipt_proof_new.nr'), createNewReceiptProofFixture(txReceiptProof));
fixtureModules.push('receipt_proof_new', 'receipt_proof', 'receipt');
fixtureModules.push('receipt_proof_new', 'receipt');

const tx = await client.getTransaction({ hash: transactionHash });
await writeFile(join(modulePath, 'transaction.nr'), createTransactionFixture(tx));
Expand All @@ -97,9 +90,8 @@ for (const chain in HISTORY_API_FIXTURES) {
blockWithTransactions.transactionsRoot,
txIdx
);
await writeFile(join(modulePath, 'transaction_proof.nr'), createTransactionProofFixture(txProof));
await writeFile(join(modulePath, 'transaction_proof_new.nr'), createNewTransactionProofFixture(txProof));
fixtureModules.push('transaction_proof_new', 'transaction_proof');
fixtureModules.push('transaction_proof_new');
if (logIdx !== undefined) {
const log = receipt.logs[logIdx];
await writeFile(join(modulePath, 'log.nr'), createLogFixture(log, logIdx));
Expand Down

0 comments on commit 422a828

Please sign in to comment.