Skip to content

Document deliberate schema divergences from Horizon (trade orientation, TTL effects, outer inclusion_fee_bid, …) #465

Description

@chowbao

Priority: P3 — part of #448

Deliberate conventions that differ from horizon and should be written down for consumers:

  • Trades are seller-oriented (selling_/buying_), never base/counter-canonicalized; price_n/price_d is the raw claimed-offer price, so it is the reciprocal of horizon's canonical price on ~half of trades (horizon swaps by asset id and inverts, trades_processor.go:133-145). The farmhash asset_ids cannot be ordered the way horizon's sequential ids can.
  • last_modified_ledger for removed offers/liquidity pools keeps the pre-state value (the delete ledger is in ledger_sequence); horizon overwrites it with the delete ledger.
  • extend_footprint_ttl / restore_footprint effects (types 98/99) exist here; horizon deliberately emits none.
  • inclusion_fee_bid for fee-bumps uses the outer fee (stellar-rpc agrees; the SDK helper uses inner).
  • contract_event_type detail on SAC effects is an etl-only addition.
  • FarmHashAsset concatenates code+issuer+type with no delimiter (theoretical collision; consistent everywhere once the trustline bug is fixed).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-human-reviewAuto-filed from 2026 roadmap reconciliation - needs human review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions