kadena-io / chainweb-node

Chainweb: A Proof-of-Work Parallel-Chain Architecture for Massive Throughput
https://docs.kadena.io/basics/whitepapers/overview
BSD 3-Clause "New" or "Revised" License
248 stars 95 forks source link

/poll endpoint omits results #1732

Closed raduciobanu22 closed 1 year ago

raduciobanu22 commented 1 year ago

When fetching multiple tx results at once using the /poll endpoint some of the request keys are ignored even though they are valid. I am able to retrieve the result for those missing if I use the same endpoint and pass a single request key instead of a list of them. For example here's a list of request keys from chain 0:

["InhUsF-zHMF7tygkkh7jrm1Xns2GpnUvPjlq014MRKU",
    "1zirlzrAQi4Zlzew5t8LF1jTtkom6YZS9qT-K9IEzHI",
    "Y5y2vaI-Fwd-XGgWnUYgUSSgUBC5A_CwJQlUWioob6c",
    "uO8BGneKvtk-xCSECn5trsS7cO4YlDQhs4GBCDN_P08",
    "BiTXUV56wcCJNUJSdmtJHQsyFsMTNKbD2phaloaWK9Q",
    "S64pHyPTw98z3icozlmMeqMCiUzgXaZ9jWTrERgEsaM",
    "y3Loj83E3fNndRTTTwow_4Rqd6v0IsvaNjE-2WoiEwA",
    "D1pfnRODkhQ9q9tmoTl5m7qSM_TYkpp5SC8UVe3j02k",
    "i1KbgndGUxHR76DaPC02_Up5O-WWR0PJdw5-KloFaXM",
    "NY3DvKdQVRT_Yz-3j76Qfofp8BIm6kgUQrZIbK5czWY",
    "HLJseaI1KwaDLT1J9b8Nggfek1YEQcuPl4EoNvIMBI4",
    "Cq4eZajyo0MeGfhz_2TpFx3KsqJF4BtGdhSKHkHOmHI",
    "MdYI2HrYztPbpnAN5BXCT4IRw10XqcIU1qAPLC0l9Eo",
    "6vv0rPLrasYpC-iQQzrgIGcvcN-bTCNvJNBjeLN6EL8"]

I'm getting results only for these:

["BiTXUV56wcCJNUJSdmtJHQsyFsMTNKbD2phaloaWK9Q",
    "6vv0rPLrasYpC-iQQzrgIGcvcN-bTCNvJNBjeLN6EL8",
    "Y5y2vaI-Fwd-XGgWnUYgUSSgUBC5A_CwJQlUWioob6c",
    "y3Loj83E3fNndRTTTwow_4Rqd6v0IsvaNjE-2WoiEwA",
    "S64pHyPTw98z3icozlmMeqMCiUzgXaZ9jWTrERgEsaM",
    "InhUsF-zHMF7tygkkh7jrm1Xns2GpnUvPjlq014MRKU",
    "HLJseaI1KwaDLT1J9b8Nggfek1YEQcuPl4EoNvIMBI4",
    "uO8BGneKvtk-xCSECn5trsS7cO4YlDQhs4GBCDN_P08"] 

I suspect this is a regression. Tested on 2.19, 2.20, same issue on both versions.

ghost commented 1 year ago

Could you please provide the full HTTP request/response and queries? maybe curl log?

trendzetter commented 1 year ago

curl -X POST https://api.chainweb.com/chainweb/0.0/mainnet01/chain/0/pact/api/v1/poll -H "Content-Type: application/json" -d '@data.log' > api.chainweb.com.txt data.log Outputs result for only 21 of the 41 requests. Just adding this because I validated the test he send on discord. The API doc for /poll mentions the response will contain "The command results for some of the requested request keys." (source: https://api.chainweb.com/openapi/pact.html#tag/endpoint-poll/paths/~1poll/post) but this is kinda strange and raised questions if this is really intended by design or something unexpected/ some change.

raduciobanu22 commented 1 year ago

curl -X POST https://api.chainweb.com/chainweb/0.0/mainnet01/chain/0/pact/api/v1/poll -H "Content-Type: application/json" -d '@data.log' > api.chainweb.com.txt data.log Outputs result for only 21 of the 41 requests. Just adding this because I validated the test he send on discord. The API doc for /poll mentions the response will contain "The command results for some of the requested request keys." (source: https://api.chainweb.com/openapi/pact.html#tag/endpoint-poll/paths/~1poll/post) but this is kinda strange and raised questions if this is really intended by design or something unexpected/ some change.

Thanks George!

daplcor commented 1 year ago

Do we have any update on this? Are any other examples needed?

edmundnoble commented 1 year ago

We're looking into this for the next release. Thanks for the repro @trendzetter !

thoughtpolice commented 1 year ago

1775 will fixed this when it's merged, and it should make the next release.