mirror of
https://github.com/Effect-TS/effect.git
synced 2026-12-04 03:35:36 +08:00
1.2 KiB
1.2 KiB
effect
| effect |
|---|
| patch |
Encrypted event log replication now encrypts entries in batches of up to 100 entries or about 256 KB of payload, one AES-GCM call per batch, and encrypted servers store and stream those batches. Each batch authenticates its store id and plaintext entry ids. This changes the encrypted protocol, APIs and server tables without migration: upgrade encrypted clients and servers together, and start encrypted servers on fresh storage because existing per-entry rows are not read.
Breaking changes
EncryptedEntryandEncryptedRemoteEntryare replaced byEncryptedBatchandEncryptedRemoteBatch, andWriteEntries.encryptedEntriesbecomesbatches.EventLogEncryption.encryptanddecrypttake the store id and work on batches, and thedecodeChangesoption ofEventLogRemote.makeWithreceives the store id.EventLogServerEncrypted.Storage.writeandchangesuse batches,PersistedEntryis removed, andSqlEventLogServerEncryptedno longer acceptsinsertBatchSize.
Event journals now keep the first copy of an entry that is repeated within one remote delivery, and SqlEventJournal advances an entry's remote sequence when it arrives again later, so nextRemoteSequence passes it.