Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding cache and sync functionality #5

Merged
merged 27 commits into from
Aug 21, 2024
Merged

feat: adding cache and sync functionality #5

merged 27 commits into from
Aug 21, 2024

Conversation

wei3erHase
Copy link
Member

No description provided.

@wei3erHase wei3erHase marked this pull request as ready for review August 19, 2024 20:45
Copy link
Member

@0xJabberwock 0xJabberwock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are 🔥!

test/e2e/data-receiver.spec.ts Outdated Show resolved Hide resolved
test/unit/DataFeed.spec.ts Outdated Show resolved Hide resolved
solidity/contracts/DataReceiver.sol Outdated Show resolved Hide resolved
Base automatically changed from feat/sepolia to dev August 21, 2024 13:36
@wei3erHase wei3erHase changed the title feat: adding cache functionality feat: adding cache and sync functionality Aug 21, 2024
Copy link
Member

@0xJabberwock 0xJabberwock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines 214 to 215
it('should all the observations when called without max', async () => {
tx = await dataReceiver.syncObservations(salt, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'should add the observations...'

Comment on lines 226 to 227
it('should all observations limited by max argument', async () => {
tx = await dataReceiver.syncObservations(salt, 2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'should add observations...'

Comment on lines 328 to 329
it('should all observations limited by max argument', async () => {
tx = await dataReceiver.syncObservations(randomSalt, 2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'should add observations...'

Comment on lines 341 to 342
it('should all the observations when called without max', async () => {
tx = await dataReceiver.syncObservations(randomSalt, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'should add the observations...'

Comment on lines +357 to +361
it.skip('should delete added cache observations', async () => {
// should sync nonce and nonce + 1 (nonce + 2 should remain in cache)
await dataReceiver.syncObservations(randomSalt, 2);

// NOTE: smock having issues with internal mapping structs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch. 🙃

Comment on lines 63 to 64

/// @notice Allows any address to attemt to insert cached observations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows any address to attempt to...

@wei3erHase wei3erHase merged commit 07e2c9d into dev Aug 21, 2024
5 checks passed
@wei3erHase wei3erHase deleted the feat/cache-v2 branch August 21, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants