perf: sync protocol and core hardening updates

This commit is contained in:
A 2026-07-11 19:48:26 +08:00
parent 152fed3b87
commit 4390ebf5a9
283 changed files with 29231 additions and 2295 deletions

View file

@ -0,0 +1,19 @@
-- Once a retained floor advances, channel_update_events below it are physically gone. Dropping
-- the checkpoint would make an old client pts look like an ordinary empty difference and silently
-- lose the required channelDifferenceTooLong recovery boundary. Refuse that irreversible down.
DO $$
BEGIN
IF EXISTS (
SELECT 1
FROM public.channel_update_checkpoints
WHERE retained_through_pts > 0
) THEN
RAISE EXCEPTION
'cannot roll back channel update retention: retained floor has advanced'
USING ERRCODE = '55000';
END IF;
END
$$;
DROP INDEX IF EXISTS public.channel_update_events_retention_seek_idx;
DROP TABLE IF EXISTS public.channel_update_checkpoints;