The context callbacks and nonce_function take non-const data pointers but the functions calling them take const pointers.
I think this is somewhat confusing, in particular for the user-exposed ecsda_sign() that takes a const pointer but also a nonce_function with a non-const pointer.
This has been introduced by https://github.com/bitcoin-core/secp256k1/pull/299/commits/05732c5a5f781d49972659d8f59e5262ff026ce8 but I don't really understand the benefits of this method.
cc @luke-jr