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

Offer Created, Offer Updated, Offer Removed effects #166

Open
orbitlens opened this issue Nov 19, 2017 · 5 comments
Open

Offer Created, Offer Updated, Offer Removed effects #166

orbitlens opened this issue Nov 19, 2017 · 5 comments
Assignees
Labels

Comments

@orbitlens
Copy link

Effects Offer Created, Offer Updated, Offer Removed are described in API docs, but they are not generated by the Horizon. Are there any specific reasons behind such behavior?

Those effects would be especially handy in case of historical asset price and orderbook recreation. I'm going to use historical data to implement coinmarketcap-like asset rating and trade volume history in my asset-centric block explorer. Besides, it's the only missing thing for the "time travel" feature, which will allow to view full asset/account stats for any point in timet.

Recreating active offers disposition at the particular point of time is really chalenging task without those effects implemented. Of course, I can parse raw XDR responses. However, I failed to found any solution for parsing XDR in SQL, so creating materialized view optimized for queries is not an option. On the other hand, parsing XDR outside the DB will result in additional tricky data sync with potentially stale data.

I understand that adding those effects may somewhat degrade the performance and increase Horizon DB size. So I would be very grateful if you could at least implement it as an optional feature that can be turned on by the env variable.

Thanks

@bartekn
Copy link
Contributor

bartekn commented Nov 20, 2017

Confirmed. Looks like a bug in

func (is *Session) ingestTradeEffects(effects *EffectIngestion, buyer xdr.AccountId, claims []xdr.ClaimOfferAtom) {
It only processed trades.

@dmichael
Copy link

Is there an ETA for getting this scheduled for development?

The only workaround I know for getting offerId from an offer transaction (absolutely critical for trading applications) is to walk the XDR returned from the transaction (which is a little tedious).

I can write up how to get this id using the JS SDK, but don't have enough experience with Horizon yet to submit a PR here.

@tomerweller
Copy link
Contributor

This is important for professional trading desks that are looking for an audit trail

@nullstyle
Copy link
Contributor

This is important for professional trading desks that are looking for an audit trail

I would not use the effects table for an audit trail! Use the stellar-core history archives.

@tomquisel tomquisel removed the ready label Jan 27, 2019
@howardtw howardtw self-assigned this Mar 18, 2019
howardtw added a commit to howardtw/go that referenced this issue Mar 22, 2019
This PR starts to ingest effects of an offer created/updated/deleted
with a trade. However, it can't handle the case where an offer is
affected by a path payment.

Close stellar#166
@tomquisel
Copy link
Contributor

@bartekn @howardtw do you think we should make this an option since it may have performance impacts? Or avoid the complexity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants