I tried removing the logic that checks the signature completely, still costs the same N. I am guessing the cost mostly comes from promise_yield_resume(). I'm checking with Saketh from protocol who implemented the function.
Chatted with Protocol folks on Zulip So problem is near protocol level sets the cost of env::promise_yield_resume() per byte too high. It is confirmed to be a typo, and will be fixed in the next protocol release. I'm following up with them on the dates of next release.
I tried removing the logic that checks the signature completely, still costs the same N. I am guessing the cost mostly comes from promise_yield_resume(). I'm checking with Saketh from protocol who implemented the function.