Skip to content

Commit

Permalink
bundle: add cranks, plumbing to crank tip programs; rework pack bundle
Browse files Browse the repository at this point in the history
plumbing
  • Loading branch information
ptaffet-jump committed Feb 21, 2025
1 parent 07d9bb3 commit 3d0a107
Show file tree
Hide file tree
Showing 27 changed files with 1,562 additions and 242 deletions.
2 changes: 1 addition & 1 deletion agave
1 change: 1 addition & 0 deletions book/api/metrics-generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@
| poh_​begin_​leader_​delay_​seconds | `histogram` | Delay between when we become leader in a slot and when we receive the bank. |
| poh_​first_​microblock_​delay_​seconds | `histogram` | Delay between when we become leader in a slot and when we receive the first microblock. |
| poh_​slot_​done_​delay_​seconds | `histogram` | Delay between when we become leader in a slot and when we finish the slot. |
| poh_​bundle_​initialize_​delay_​seconds | `histogram` | Delay in starting the slot caused by loading the information needed to generate the bundle crank transactions |

## Shred Tile
| Metric | Type | Description |
Expand Down
1 change: 1 addition & 0 deletions plugin/bundle/test-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ thiserror = "1.0.64"
bs58 = "0.5.1"
futures-util = "0.3.31"
env_logger = "0.11.5"
base64="0.22.1"

[build-dependencies]
tonic-build = "0.12.2"
Expand Down
15 changes: 4 additions & 11 deletions plugin/bundle/test-server/src/bin/bundlesvr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use log::info;
use prost_types::Timestamp;
use tonic::{transport::Server, Request, Response, Status};
use futures_util::stream::Stream;
use base64::prelude::*;

use bundle_test_server::proto::block_engine::block_engine_validator_server::{BlockEngineValidator, BlockEngineValidatorServer};
use bundle_test_server::proto::block_engine::{SubscribePacketsRequest, SubscribePacketsResponse, SubscribeBundlesRequest, SubscribeBundlesResponse, BlockBuilderFeeInfoRequest, BlockBuilderFeeInfoResponse};
Expand Down Expand Up @@ -63,23 +64,15 @@ impl BlockEngineValidator for BlockEngineValidatorService {
packets: vec![
Packet {
meta: None,
data: vec![0; 1232],
data: BASE64_STANDARD.decode(b"AplgYeL7lZ//2fZyq0hgs57Pqevr2XhcDslxchP9MCwSL1T53TQquo1Q8YjXW87hsLOZUrGf9rJSNOZxkjkzuQkqX7ELf9NRH4IduEUMCdNk+4eQKaeNPD0qxwjMnThpPy4W5twMcpqsIwBUn8nBin9zDiGIw45q9+cAIRnxQcIFAgEFCmK1c3bBvURtMIVYcRrqWeDmpFe3rMTamh3isH57X+VPJoNzHmgKQDMBH7YdnfpZnoZziXznBbYn0l84zte8nzqeV4BovTKBuUW4r+kDb0rcqF1E1a3dEQrWAap98xF9WXtE2rBhEteCr6t2wb2dkwc3bua8xiAAl5CvmaQjcZf1u2Zrh2RnqnIAyiqCAgVGWHAqq0RQXvouEI3tZUSNWDAGp9UXGSxWjuCKhF9z0peIzwNcMUWyGrNE2AYuqUAAAAmQEHCdkn/s4XyQQwWBqtUGKmQGpVL+cpvyQlwCxD/PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpW0bsAXCA/sc0H8S3yQY1dU5OrWgtx5+nJyXamTjQ7tAEBwMCBQEEBAAAAAgACQOAw8kBAAAAAAgABQIQJwAACQQDBgQACgymPaYcAgAAAAY=").unwrap(),
},
Packet {
meta: None,
data: vec![0; 1232],
data: BASE64_STANDARD.decode(b"AijKJ5H5jDNza6wwLLB5pFCMLaHBAJ1P5spx4QkBg0vdKsnfEmdf+fgI7sJgcp68OONRxp1Tuwrpkc5Q8BTuDQWZAsNYQnvXD4n4RPImcMrus0SUBMbQrX+t7fUlMU/SBscsCPjQRAoVlTWlc5/8MA0cg89W0dSlonX8UJXbMwUAAgEFCiA0jtjBgydimHmbOX9EM63N1d6wTAAyO4LyrIAh6nJiJoNzHmgKQDMBH7YdnfpZnoZziXznBbYn0l84zte8nzqfQneRHfpJJef849c/Ti3mq0yjQHCFQZPzdPEb644M0I9vSd8BuAJ2fFMkc1ynhn6lJ9DMAkzNWj21LlOVQI7veaXsBCiWbSSY43Sr0fBad1SBWBG56mAt1QkTqxVpiacGp9UXGSxWjuCKhF9z0peIzwNcMUWyGrNE2AYuqUAAAM4BDmCv7bInF71jGS9UFFo/llozu4LSxwKess4eIIJkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpW0bsAXCA/sc0H8S3yQY1dU5OrWgtx5+nJyXamTjQ7tAEBwMCBQEEBAAAAAgACQOAw8kBAAAAAAgABQIQJwAACQQDBgQACgwAZc0dAAAAAAY=").unwrap(),
},
Packet {
meta: None,
data: vec![0; 1232],
},
Packet {
meta: None,
data: vec![0; 1232],
},
Packet {
meta: None,
data: vec![0; 1232],
data: BASE64_STANDARD.decode(b"ApbANVN5DAFCeUVlGFMJiDoblInErsUb3SXvH/zedTvI3N/2VQXbiD7YBCMMM7z70CHDAtwUN6QyDXTfX9f50AeLiJsJFALf+yx+y8VCmkIHrydT0xO2AktOUAPAwSEUrLO9vx2w34zTQH7825CP0KJq0P0qbh8s5ZnqMRCWomQGAgEFCq0GX6spT4f2ZZTU4jmnw1c4N5Rh8PnkcZSKcTZtN125JoNzHmgKQDMBH7YdnfpZnoZziXznBbYn0l84zte8nzo9Qv0uUDVQ5kxt1XdzjHfKkFC6suwka3+AymtKrvnB+QfuvVvIlFZT5CJZqW9OOIKqfTbS7kzxgNWErlC5OF1WeaXsBCiWbSSY43Sr0fBad1SBWBG56mAt1QkTqxVpiacGp9UXGSxWjuCKhF9z0peIzwNcMUWyGrNE2AYuqUAAAM4BDmCv7bInF71jGS9UFFo/llozu4LSxwKess4eIIJkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpW0bsAXCA/sc0H8S3yQY1dU5OrWgtx5+nJyXamTjQ7tAEBwMCBQEEBAAAAAgACQOAw8kBAAAAAAgABQIQJwAACQQDBgQACgwpYx0gAAAAAAY=").unwrap(),
},
],
})
Expand Down
4 changes: 4 additions & 0 deletions src/app/fdctl/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ struct fdctl_config {
int enabled;
char url[ 256 ];
char tls_domain_name[ 256 ];
char tip_distribution_program_addr[ FD_BASE58_ENCODED_32_SZ ];
char tip_payment_program_addr[ FD_BASE58_ENCODED_32_SZ ];
char tip_distribution_authority[ FD_BASE58_ENCODED_32_SZ ];
uint commission_bps;
} bundle;

struct {
Expand Down
29 changes: 29 additions & 0 deletions src/app/fdctl/config/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,35 @@ dynamic_port_range = "8900-9000"
# it is being accessed.
tls_domain_name = ""

# The tip distribution program is used to control the
# distribution of tips that transactions from bundles may pay.
# This should be set to the public key of the tip distribution
# program. Consult the block engine provider's documentation
# for the appropriate value of this field.
tip_distribution_program_addr = ""

# The tip payment program handles the regular collection of tips
# into the account configured by the tip distribution program.
# This should be set to the public key of the tip payment
# program. Consult the block engine provider's documentation
# for the appropriate value of this field.
tip_payment_program_addr = ""

# A validator may want to distribute tips from transactions to
# their stakers or to any other relevant parties. Authority is
# delegated to the public key provided in the
# tip_distribution_authority to determine the distribution by
# uploading a Merkle tree. This field should be set to the
# base58 public key.
tip_distribution_authority = ""

# The standard tip distribution mechanism distributes tips
# pro-rata to stakers with the validator optionally taking a
# portion as a fee. The commission set below, measured in basis
# points (100ths of a percent), determines the validator's
# portion.
commission_bps = 0

# The pack tile takes incoming transactions that have been verified
# by the verify tile and then deduplicated, and attempts to order
# them in an optimal way to generate the most fees per compute
Expand Down
4 changes: 4 additions & 0 deletions src/app/fdctl/config_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ fdctl_pod_to_cfg( config_t * config,
CFG_POP ( bool, tiles.bundle.enabled );
CFG_POP ( cstr, tiles.bundle.url );
CFG_POP ( cstr, tiles.bundle.tls_domain_name );
CFG_POP ( cstr, tiles.bundle.tip_distribution_program_addr );
CFG_POP ( cstr, tiles.bundle.tip_payment_program_addr );
CFG_POP ( cstr, tiles.bundle.tip_distribution_authority );
CFG_POP ( uint, tiles.bundle.commission_bps );

CFG_POP ( uint, tiles.pack.max_pending_transactions );
CFG_POP ( bool, tiles.pack.use_consumed_cus );
Expand Down
Loading

0 comments on commit 3d0a107

Please sign in to comment.