diff --git a/develop-docs/ingestion/relay/relay-best-practices.mdx b/develop-docs/ingestion/relay/relay-best-practices.mdx index d82005320dc33..fb88bcf228060 100644 --- a/develop-docs/ingestion/relay/relay-best-practices.mdx +++ b/develop-docs/ingestion/relay/relay-best-practices.mdx @@ -16,6 +16,18 @@ Make sure changes to the event protocol and APIs are forward-compatible. Relay s or truncate data it does not understand. It is a supported use-case to have customers running outdated Relays but up-to-date SDKs. +For example, `enum`s in the event protocol (or any other data type received from the SDK) need to have a catchall variant +such that customer relays running an older version can still forward the data: + +```rust +enum EventColor { + Red, + Green, + Blue, + /// Unknown color, for forward compatibility. + Unknown(String), +} +``` ## Feature Gate new Functionality