perf: sync protocol and core hardening updates
This commit is contained in:
parent
152fed3b87
commit
4390ebf5a9
283 changed files with 29231 additions and 2295 deletions
19
deploy/migrations/0063_channel_update_retention.down.sql
Normal file
19
deploy/migrations/0063_channel_update_retention.down.sql
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue