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

Sai/snark ledger query serialized #16000

Merged
merged 4 commits into from
Sep 3, 2024
Merged

Conversation

svv232
Copy link
Member

@svv232 svv232 commented Sep 2, 2024

It should now be possible to encode accounts as base64 binable types in gql output.

@svv232 svv232 requested a review from a team as a code owner September 2, 2024 21:08
@svv232
Copy link
Member Author

svv232 commented Sep 2, 2024

!ci-build-me

@svv232
Copy link
Member Author

svv232 commented Sep 2, 2024

query was made on a local build of mainnet.

  version
  encodedSnarkedLedgerAccountMembership(accountInfos: {publicKey: "B62qp69bsgUNySCY2wEYDCrRN3gdMB6cDSZGBucTzc9vUUH4jUoDSED"}, stateHash: "3NK4BpDSekaqsG6tx8Nse2zJchRft2JpnbvMiog55WCr5xJZaKeP") {
    account
    merklePath {
      left
      right
    }
  }
}
  "data": {
    "version": "1854932d3eb26923b56d06b1225699a2a6a0028a",
    "encodedSnarkedLedgerAccountMembership": [
      {
        "account": "qCFu5PuIF18s8OZetyAvBv7KkjXOKc8agOLxEaCzGw0AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/JjnHAcICwAA/V0SBAAcMI4ZJk3dLiJZXecOGWTPPmc6nN5jRvU9biUrxvD0JAG537xqITB5HYVrtDUbsxN2MBum5uYsBb1RlsokPfn5NAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH8ACCO0gY8AAAA/QCjAgD8AIijtAEPAAAAAf2fALEFAwADAAMDAwIDAwMDAwMA",
        "merklePath": [
          {
            "left": "25887079748421786662130415407725149724171875927770575284572937462292836319441",
            "right": null
          },
          {
            "left": "614999202486292012365254572014443699518159103864904101522690864803136116168",
            "right": null
          },
          {
            "left": "3826140224381436917232278997256788962962694942706300628042260557544945406933",
            "right": null
          },
          {
            "left": null,
            "right": "11676463571128201622689529358180157892678854310357338277542284846305873086657"
          },
          {
            "left": null,
            "right": "27787562760385956756047159224356169707145558216574544828828593296615049079648"
          },
          {
            "left": null,
            "right": "13806280414919178455764156740098494931834899279472737526430245112760034518581"
          },
          {
            "left": "8343625775965964710940710924859208238822708603679563390723012588232567304849",
            "right": null
          },
          {
            "left": null,
            "right": "28387272289633365143446590763071782371159113199950030065661127084919348143852"
          },
          {
            "left": "28110679534492610289898297608174039037667504201468600582420139957622367206638",
            "right": null
          },
          {
            "left": null,
            "right": "4021894764986598997182199179011518690249420750486912384717508682507935861298"
          },
          {
            "left": "20582707962679723119531493186893380886779712046428850341041828568370633955778",
            "right": null
          },
          {
            "left": "4048502695161474733554498569043516034231970177113021674304283784026502698216",
            "right": null
          },
          {
            "left": "27631704281190809000075154521185244422042006069680201690185896139804003754329",
            "right": null
          },
          {
            "left": "5638649610096571761423490657110946718612035863295467052945121084048816803177",
            "right": null
          },
          {
            "left": "6404678551526682000669202960905674673723569948145570471997969243700667405221",
            "right": null
          },
          {
            "left": "3926629693301283950785052267265665503738943725229225640135193760932755040819",
            "right": null
          },
          {
            "left": "14446073507865406948424681628751100951969596963211988635845417934448749425392",
            "right": null
          },
          {
            "left": "1403654313334101251152974902939449424008196508539204695367231319041388383569",
            "right": null
          },
          {
            "left": "16918038186554675056000578097630897159236284751433663183439602696852905624415",
            "right": null
          },
          {
            "left": "28627628212319805343454811139849901640500073315285842033614442274505756385536",
            "right": null
          },
          {
            "left": "28758859610334920473530372700694516882691452974475767468086895285359096307274",
            "right": null
          },
          {
            "left": "16430190523938219721147185711044261861887815192145019235086508794037748662978",
            "right": null
          },
          {
            "left": "23300248870286894992003584685086043578048220924304538552357941351343423298077",
            "right": null
          },
          {
            "left": "18721105361232651344875520416758751524020336778169872574984370086949138642085",
            "right": null
          },
          {
            "left": "10611828583016686420873473112404506690775956092186634604097134580560948638514",
            "right": null
          },
          {
            "left": "11448813184116204118725235537673043143764404790624366392625860187638781235615",
            "right": null
          },
          {
            "left": "6507258883578376028376981545955062827139698232277887871775971553968101691249",
            "right": null
          },
          {
            "left": "17493244980280937955941580434326677459751473714746227943153210535373918340114",
            "right": null
          },
          {
            "left": "18464507392887829891264190376236139806757048001410567864732128380527868369455",
            "right": null
          },
          {
            "left": "374677701015397178366310913911051069892586440922808798004746377118603064136",
            "right": null
          },
          {
            "left": "7414597540944309778303590613882007538175921122373418819351437768289067050688",
            "right": null
          },
          {
            "left": "4911425897386868865951704774190352922917918118795543476097437449334578129718",
            "right": null
          },
          {
            "left": "2537948008614359414287158135558328051431310188498471600040371216889620767874",
            "right": null
          },
          {
            "left": "11945594868601920248817415866479228952991063900530321216805456660202303767865",
            "right": null
          },
          {
            "left": "7727454798157491451398259626232336317494512806516291520841511378379541110711",
            "right": null
          }
        ]
      }
    ]
  }
}

@svv232
Copy link
Member Author

svv232 commented Sep 2, 2024

!ci-build-me

Copy link
Member

@mrmr1993 mrmr1993 left a comment

Choose a reason for hiding this comment

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

LGTM, but see nit.

Ok memberships )
module SnarkedLedgerMembership = struct
let resolve_membership :
mapper:(Ledger.path -> Account.t -> 'a)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: it would be more natural/readable to return a Ledger.path * Account.t and then map over the results in the individual resolvers.

@svv232
Copy link
Member Author

svv232 commented Sep 3, 2024

!ci-build-me

2 similar comments
@svv232
Copy link
Member Author

svv232 commented Sep 3, 2024

!ci-build-me

@svv232
Copy link
Member Author

svv232 commented Sep 3, 2024

!ci-build-me

@svv232
Copy link
Member Author

svv232 commented Sep 3, 2024

!ci-build-me

@svv232 svv232 merged commit dceffd7 into compatible Sep 3, 2024
44 checks passed
@svv232 svv232 deleted the sai/snark-ledger-query-serialized branch September 3, 2024 15:03
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