Skip to content

Conversation

MitchTurner
Copy link
Member

Linked Issues/PRs

followup to feedback from #3100

Description

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

@MitchTurner MitchTurner changed the title Use Proto Types in storage isn't of bytes Use Proto Types in storage instead of bytes Oct 6, 2025
@MitchTurner MitchTurner changed the base branch from master to chore/integrate-block-aggregator October 6, 2025 18:06
message BlockResponse {
oneof payload {
Block literal = 1;
string remote = 2;
Copy link
Member

@mchristopher mchristopher Oct 7, 2025

Choose a reason for hiding this comment

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

I think remote should be an object so it's more flexible going forward. My initial thought it that it would look like this:

message RemoteBlockResponse {
  string path = 1;
  oneof config {
    RemoteBlockConfigS3 s3 = 2;
    RemoteBlockConfigHTTP http = 3;
  }
}

message RemoteBlockConfigS3 {
  string region = 1;
  string bucket = 2;
  bool requester_pays = 3;
  optional endpoint = 4;
}

message RemoteBlockConfigHTTP {
  string endpoint = 1;
  optional map<string, string> headers = 2;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool. Makes sense to me.

@MitchTurner MitchTurner marked this pull request as ready for review October 8, 2025 17:21
@MitchTurner MitchTurner requested review from a team, Dentosal, rymnc and xgreenx as code owners October 8, 2025 17:21
cursor[bot]

This comment was marked as outdated.

variant: Some(ProtoTransactionVariant::Script(proto_script)),
}
}
_ => ProtoTransaction { variant: None },
Copy link

Choose a reason for hiding this comment

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

Bug: Transaction Serialization Fails for Multiple Types

The proto_tx_from_tx function incompletely serializes transactions. Non-Script transaction types (Create, Mint, Upgrade, Upload, Blob) are serialized as empty ProtoTransaction messages, losing all their data. For Script transactions, inputs, outputs, and metadata fields are hardcoded to empty values, resulting in critical data loss. This leads to corrupted or unusable transaction data in the protobuf representation.

Additional Locations (1)

Fix in Cursor Fix in Web

// TODO: Do we need a way to unsubscribe or can we just see that the receiver is dropped?
NewBlockSubscription {
response: tokio::sync::mpsc::Sender<NewBlock>,
response: tokio::sync::mpsc::Sender<Block>,
Copy link

Choose a reason for hiding this comment

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

Bug: Generic Block Type Mismatch in Subscription

The NewBlockSubscription variant in BlockAggregatorQuery and the new_block_subscriptions field in the BlockAggregator struct now use a generic Block type. This creates a type mismatch, as the NewBlock struct (which wraps a ProtoBlock) appears to be the intended payload for new block notifications, but the Sender types now expect Blocks::Block directly.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

2 participants