Open muthusleuths opened 1 year ago
@rafaelcr I think another issue here is also the fact that the extended/v1/status
returns a status of ready
which is misleading given the underlying issue seen. Please refer to the screenshot above. Is the status endpoint the right way to get a full healthcheck for the API ? If so, perhaps this needs to be addressed as well.
One more data point here. If I run the exact same images (Stacks Blockchain RC4 and API v7) in testnet it works as expected. See screenshots below:
The root cause was due to blockchain node config missing event_observer block. A better error message on the /extended/v1/status
to indicate no events are being received would help identify the root cause better.
Thanks for flagging this @muthudotbtc , we are looking into this and will have an update this week.
The cause for the TypeError: Cannot read properties of undefined (reading 'count')
error is that when no blocks are received, the materialized view that calculates this property does not get refreshed (thus producing this error). The API should catch this situation and return an alternative count if that is the case.
As far as the /extended/v1/status
improvements that were suggested, we would need to establish a maximum wait time in between node messages so we can alter the status from ready
to something else if this time has passed. We already do something like this in our metrics and alerts but we could reflect this on the API.
Describe the bug While running a Stacks 2.1 Radon blockchain node alongside Stacks API v7 it throws the below error when /extended/v1/block endpoint is called during genesis sync
To Reproduce Steps to reproduce the behavior: