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

Add basic deal stats api server for spacerace slingshot #3963

Merged
merged 6 commits into from
Sep 23, 2020
Merged

Conversation

whyrusleeping
Copy link
Member

No description provided.

Copy link
Contributor

@pooja pooja left a comment

Choose a reason for hiding this comment

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

OMG @whyrusleeping you have totally made my day. Thank you for this one!!!!

var filteredClients map[address.Address]bool

func init() {
filteredClients = make(map[address.Address]bool)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way we can filter out miners as well? E.g. there are terabytes of data from Travis' miners that were stored at genesis on Space Race net, but this isn't legit usage data.

Copy link
Member Author

Choose a reason for hiding this comment

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

So, i'm only looking at deals on chain. Do the genesis miners have deals for their data?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I believe they do have deals on chain!


func init() {
filteredClients = make(map[address.Address]bool)
for _, a := range []string{"t0112", "t0113", "t0114", "t010089"} {
Copy link
Contributor

Choose a reason for hiding this comment

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

And is there some way that we can make this configurable? E.g. if we want to add more addresses to filter out of the search down the road?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I can make it into an environment variable

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome!

@ribasushi
Copy link
Contributor

🤯
I did not realize the dealdata is available from the state at all, sigh
Serves me right for not asking.

This will totally work, and obviates need for chainwatch entirely. Thank you @whyrusleeping, you totally saved the day!

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

(pushed the env var thing)

@magik6k magik6k merged commit f4f5ef6 into master Sep 23, 2020
@magik6k magik6k deleted the feat/dealstats branch September 23, 2020 20:17
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.

None yet

4 participants