Skip to content

Conversation

@neekolas
Copy link
Contributor

@neekolas neekolas commented Feb 10, 2026

TL;DR

Added support for scheduled rate changes by introducing a --start-time parameter to the xmtpd-cli rates add command.

What changed?

  • Added a StartTime field to the AddRatesOpts struct in the CLI
  • Added a --start-time flag to the rates add command that accepts a Unix timestamp
  • If --start-time is omitted, it defaults to 2 hours from now
  • Added validation to ensure the start time is in the future but not more than a year ahead
  • Updated the contract ABI to support the new startTime parameter in the RatesUpdated event
  • Updated the blockchain package to handle the new startTime parameter
  • Updated the Docker image for the blockchain contracts to v2026.02.10-1

How to test?

  1. Use the CLI to add rates with a specific start time:
xmtpd-cli rates add --message-fee 1000000000000000000 --storage-fee 1000000000000000000 --congestion-fee 1000000000000000000 --target-rate 1000000000000000000 --start-time 1739188800
  1. Add rates without specifying a start time (will default to 2 hours from now):
xmtpd-cli rates add --message-fee 1000000000000000000 --storage-fee 1000000000000000000 --congestion-fee 1000000000000000000 --target-rate 1000000000000000000
  1. Verify the validation works by trying invalid start times (in the past or too far in the future)

Why make this change?

This change enables operators to schedule rate changes in advance, allowing for better planning and communication of fee adjustments. By supporting a start time parameter, the system can now transition between different rate structures at predetermined times without requiring manual intervention at the exact moment of change.

Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@neekolas neekolas force-pushed the 02-10-upgrade_to_new_rateregistry_contract branch from ab601db to ba87b5a Compare February 10, 2026 16:28
@neekolas neekolas force-pushed the 02-10-upgrade_to_new_rateregistry_contract branch from ba87b5a to 2e96157 Compare February 10, 2026 16:40
@neekolas neekolas marked this pull request as ready for review February 10, 2026 16:41
@neekolas neekolas requested a review from a team as a code owner February 10, 2026 16:41
@macroscopeapp
Copy link

macroscopeapp bot commented Feb 10, 2026

Add start-time scheduling to rates and require non-zero StartTime in blockchain.RatesAdmin.AddRates to upgrade to the new RateRegistry

Introduce a --start-time flag to the rates add CLI with a 2-hour default and validation (future and <1 year), plumb StartTime through to fees.Rates, and write RateRegistryRatesInEffectAfterKey in blockchain.RatesAdmin.AddRates; update ABI bindings and bump the dev chain image.

📍Where to Start

Start with the CLI handler addRatesHandler in rate_registry.go, then follow through to blockchain.RatesAdmin.AddRates in rate_registry_admin.go and the generated ABI in RateRegistry.go.


Macroscope summarized 2e96157.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant