Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Add ProviderReportPushed log #69

Merged
merged 3 commits into from
May 31, 2019
Merged

Add ProviderReportPushed log #69

merged 3 commits into from
May 31, 2019

Conversation

ahnaguib
Copy link
Contributor

No description provided.

@@ -35,6 +35,7 @@ contract MedianOracle is Ownable, IOracle {
event ProviderAdded(address provider);
event ProviderRemoved(address provider);
event ReportTimestampOutOfRange(address provider);
event ProviderReportPushed(address provider, uint256 payload);
Copy link

Choose a reason for hiding this comment

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

Can we add the timestamp as well, so that we can really rely on the log instead of getting the timestamp from the block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. and added a test

Copy link
Member

@aalavandhan aalavandhan left a comment

Choose a reason for hiding this comment

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

👍

@@ -35,6 +35,7 @@ contract MedianOracle is Ownable, IOracle {
event ProviderAdded(address provider);
event ProviderRemoved(address provider);
event ReportTimestampOutOfRange(address provider);
event ProviderReportPushed(address provider, uint256 payload, uint256 timestamp);
Copy link
Member

Choose a reason for hiding this comment

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

@truncs Do any of these arguments need to be indexed?
What do you expect the query behavior to be like?

e.g.
would be need to query by provider?
query for payload outliers?
query for anything after a timestamp?

Copy link
Contributor Author

@ahnaguib ahnaguib May 31, 2019

Choose a reason for hiding this comment

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

query for payload outliers?
query for anything after a timestamp?
Indexing doesn't help with these two cases.

Querying everything and processing after the fact is more practical than indexing and doing operations using the log query itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added indexing to provider.

Copy link
Member

@brandoniles brandoniles left a comment

Choose a reason for hiding this comment

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

LGTM

@ahnaguib ahnaguib merged commit 5e0a501 into master May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants