Skip to content

Conversation

bryzettler
Copy link
Contributor

@bryzettler bryzettler commented Sep 9, 2025

Atomic Data Publisher

  • New Rust service (utils/atomic-data-publisher/) that polls PostgreSQL for hotspot data changes and publishes them to Helium oracles via gRPC
  • Handles three types of atomic entity data:
    • Hotspot metadata changes (location, device info)
    • Entity ownership changes (NFT transfers)
    • Reward destination changes
  • Implements block height tracking with atomic_data_polling_state table
  • Configurable via TOML with prometheus metrics and proper error handling

Block Height Migration

  • Migrated from slot-based to block height tracking across services using getBlockHeight() instead of getSlot()
  • Updated substream services in both account-postgres-sink-service and asset-ownership-service

Database Schema Updates

  • Added last_block_height field to pg-sink and asset-ownership services
  • Enhanced plugin system with proper block height integration

Bug Fixes

  • Fixed REFRESH_ON_BOOT

@bryzettler bryzettler marked this pull request as ready for review September 18, 2025 20:24
Copy link
Contributor

@ChewingGlass ChewingGlass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleAccountWebhook should take lastBlockHeight as an arg, since the block height is associated with the piece of data being inserted, not with whatever block height is currently available on the rpc.

@ChewingGlass ChewingGlass self-requested a review September 24, 2025 18:11

let tasks: Vec<_> = batch
.iter()
.map(|change| {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a way to use rust streams with futures to make this a little cleaner, so you don't have to use spawns and joins

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.

3 participants