hirosystems / ordhook

Build indexers, standards and protocols on top of Ordinals and Inscriptions (BRC20, etc).
Apache License 2.0
182 stars 54 forks source link

when a block replay POST fails sufficient times, ordhook skips it and sends the next block #339

Closed rafaelcr closed 1 month ago

rafaelcr commented 1 month ago

if there is an API error that prevents a block from being consumed from an ordhook POST message, ordhook reflects this in the logs

Trigger http://ordinals-api-blue.mainnet-ordinals-api.svc.cluster.local:3700/payload failed with status 500 Internal Server Error

however, after 60 retries, ordhook just continues to the next block creating a gap in the API index

Processing block #853122 through 00000001-0001-0001-0001-000000000001 predicate revealed 77 new inscriptions [72782086, 72782087, 72782088, 72782089, 72782090, 72782091, 72782092, 72782093, 72782094, 72782095, 72782096, 72782097, 72782098, 72782099, 72782100, 72782101, 72782102, 72782103, 72782104, 72782105, 72782106, 72782107, 72782108, 72782109, 72782110, 72782111, 72782112, 72782113, 72782114, 72782115, 72782116, 72782117, 72782118, 72782119, 72782120, 72782121, 72782122, 72782123, 72782124, 72782125, 72782126, 72782127, 72782128, 72782129, 72782130, 72782131, 72782132, 72782133, 72782134, 72782135, 72782136, 72782137, 72782138, 72782139, 72782140, 72782141, 72782142, 72782143, 72782144, 72782145, 72782146, 72782147, 72782148, 72782149, 72782150, 72782151, 72782152, 72782153, 72782154, 72782155, 72782156, 72782157, 72782158, 72782159, 72782160, 72782161, 72782162] and 4523 transfers

ordhook should cancel the predicate if this happens