About “transaction that is more than 86400 seconds old” issue.
We ran into an issue where notify_dfx() was not called successfully when we recharged cycles. When we try to call it again we get this error message:
Error from Canister ryjl3-tyaaa-aaaaa-aaaba-cai: Canister called ic0.trap with message: Panicked at 'Notification failed: "You cannot send a notification for a transaction that is more than 86400 seconds old
Now is there any way we can get back the ICP or can we call notify_dfx() again?
It should still be possible to notify the cycles minting canister directly by calling the notify_top_up endpoint. The input required in the NotifyTopUpArg are the block_index of the block on the ICP ledger that contains the payment, and the canister_id that is being topped up, both of which you hopefully have available!
Note also that notify and notify_dfx endpoints of the ledger are going to be eventually deprecated, so it is advisable to call directly the cmc canister to notify. In addition to the pointers @mathiasb gave you, you can also call notify (via the cmc canister) using dfx: dfx ledger | Internet Computer.