hirosystems / chainhook

Extract transactions from Stacks and Bitcoin and build event driven re-org resistant indexers and databases.
GNU General Public License v3.0
143 stars 57 forks source link

File append predicates cannot handle result file names with special characters and fail without error message #355

Open timstackblock opened 1 year ago

timstackblock commented 1 year ago

I executed the predicate for Contract call and wanted to verify that it runs successfully and that it finds accurate data. I am searching the BNS contract and looking for name revoked because I can see that there is data present in the explorer for this query.

    "contract_identifier": "ST000000000000000000002AMW42H.bns",
    "method": "name-revoke"
  },

Contract call predicate has 464 occurrences but returns a blank results file.

SCREEN SHOT OF THE PREDICATE

Screen Shot 2023-07-27 at 10 48 34 AM

Screen shot of the data being found by chainhooks in terminal with 464 occurances

Screen Shot 2023-07-27 at 10 48 40 AM

Screen shot of the file append not working as the results file is BLANK

Screen Shot 2023-07-27 at 10 53 00 AM
timstackblock commented 1 year ago

This is an issue with the file name and not the predicate

timstackblock commented 1 year ago

@MicaiahReid per your message this is still a bug but not a P1 probably a P3, maybe some graceful error messaging that notifies the user of failing

The issue title above has been updated to reflect the conversation in slack, this is still a bug but not around a blank results file. The real issue is error handling when a user enters a file name that is not currently accepted. We should fail gracefully and notify the user of the failure or possibly make a change to the code to handle a wider variety of file names.