Skip to content

bundle: show stale bundle tile in gui #5179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ genhtml/
target/
*.lcov
*.profraw
*.profdata
/report
flamegraph.html
perf.data
Expand Down
36 changes: 35 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ with this software. If not, see

=======================================================================

'src/flamenco/nanopb' is currently a copy of the Nanopb library at
'src/ballet/nanopb' is currently a copy of the Nanopb library at
https://jpa.kapsi.fi/nanopb/ (imported ca 2023-Nov).

Copyright (c) 2011 Petteri Aimonen <jpa at nanopb.mail.kapsi.fi>
Expand Down Expand Up @@ -466,3 +466,37 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

=======================================================================

The fd_h2 library (src/waltz/h2) includes a modified version of the
HPACK Huffman decoder from nghttp2 (circa 2025-Mar). Original sources:
- https://github.com/nghttp2/nghttp2/blob/master/lib/nghttp2_hd.h
- https://github.com/nghttp2/nghttp2/blob/master/lib/nghttp2_hd_huffman.h
- https://github.com/nghttp2/nghttp2/blob/master/lib/nghttp2_hd_huffman.c
- https://github.com/nghttp2/nghttp2/blob/master/lib/nghttp2_hd_huffman_data.c

/*
* nghttp2 - HTTP/2 C Library
*
* Copyright (c) 2013 Tatsuhiro Tsujikawa
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
10 changes: 10 additions & 0 deletions book/api/metrics-generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@
| bundle_&#8203;transaction_&#8203;received | `counter` | Total count of transactions received, including transactions within bundles |
| bundle_&#8203;packet_&#8203;received | `counter` | Total count of packets received |
| bundle_&#8203;bundle_&#8203;received | `counter` | Total count of bundles received |
| bundle_&#8203;errors_&#8203;protobuf | `counter` | Number of gRPC errors encountered (Protobuf decode/encode error) |
| bundle_&#8203;errors_&#8203;transport | `counter` | Number of gRPC errors encountered (Transport error) |
| bundle_&#8203;errors_&#8203;timeout | `counter` | Number of gRPC errors encountered (I/O timeout) |
| bundle_&#8203;errors_&#8203;no_&#8203;fee_&#8203;info | `counter` | Number of gRPC errors encountered (Bundle dropped due to missing fee info) |
| bundle_&#8203;errors_&#8203;ssl_&#8203;alloc | `counter` | Number of gRPC errors encountered (OpenSSL alloc fail) |
| bundle_&#8203;heap_&#8203;size | `gauge` | Workspace heap size |
| bundle_&#8203;heap_&#8203;free_&#8203;bytes | `gauge` | Approx free space in workspace |
| bundle_&#8203;shredstream_&#8203;heartbeats | `counter` | Number of ShredStream heartbeats successfully sent |
| bundle_&#8203;keepalives | `counter` | Number of HTTP/2 PINGs acknowledged by server |
| bundle_&#8203;connected | `gauge` | 1 if connected to the bundle server, 0 if not |

## Verify Tile
| Metric | Type | Description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name = "bundle-test-server"
version = "0.1.0"
edition = "2021"

[[bin]]
name = "bundlesvr"

[dependencies]
tonic = { version = "0.12.2", features = ["tls-roots", "tls", "tls-webpki-roots"] }
prost = "0.13.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ fn main() -> Result<(), std::io::Error> {
}

configure()
.build_client(true)
.build_server(false)
.build_client(false)
.build_server(true)
.type_attribute(
"TransactionErrorType",
"#[cfg_attr(test, derive(enum_iterator::Sequence))]",
Expand All @@ -34,5 +34,5 @@ fn main() -> Result<(), std::io::Error> {
"InstructionErrorType",
"#[cfg_attr(test, derive(enum_iterator::Sequence))]",
)
.compile_protos(&protos, &[proto_base_path])
.compile_protos(&protos, &[std::path::PathBuf::from("protos")])
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::iter;
use std::pin::Pin;

use bundle_test_server::proto::auth::{self, Token};
use bundle_test_server::proto::auth::auth_service_server::{AuthService, AuthServiceServer};
use bundle_test_server::proto::bundle::{Bundle, BundleUuid};
use bundle_test_server::proto::packet::{Packet, PacketBatch};
use crate::proto::auth::{self, Token};
use crate::proto::auth::auth_service_server::{AuthService, AuthServiceServer};
use crate::proto::bundle::{Bundle, BundleUuid};
use crate::proto::packet::{Packet, PacketBatch};
use chrono::{Duration, Utc};
use futures::{stream, StreamExt};
use log::info;
Expand All @@ -13,15 +13,36 @@ 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};
use crate::proto::block_engine::block_engine_validator_server::{BlockEngineValidator, BlockEngineValidatorServer};
use crate::proto::block_engine::{SubscribePacketsRequest, SubscribePacketsResponse, SubscribeBundlesRequest, SubscribeBundlesResponse, BlockBuilderFeeInfoRequest, BlockBuilderFeeInfoResponse};

#[derive(Debug, Default)]
pub struct BlockEngineValidatorService;

type PacketResponseStream = Pin<Box<dyn Stream<Item = Result<SubscribePacketsResponse, Status>> + Send>>;
type BundleResponseStream = Pin<Box<dyn Stream<Item = Result<SubscribeBundlesResponse, Status>> + Send>>;

pub mod proto {
pub mod auth {
tonic::include_proto!("auth");
}
pub mod block_engine {
tonic::include_proto!("block_engine");
}
pub mod bundle {
tonic::include_proto!("bundle");
}
pub mod packet {
tonic::include_proto!("packet");
}
pub mod relayer {
tonic::include_proto!("relayer");
}
pub mod shared {
tonic::include_proto!("shared");
}
}

#[tonic::async_trait]
impl BlockEngineValidator for BlockEngineValidatorService {
type SubscribePacketsStream = PacketResponseStream;
Expand Down Expand Up @@ -115,14 +136,14 @@ impl AuthService for Auth {
) -> Result<Response<auth::GenerateAuthTokensResponse>, Status> {
Ok(Response::new(auth::GenerateAuthTokensResponse {
access_token: Some(Token {
value: "".to_string(),
value: "token".to_string(),
expires_at_utc: Some(Timestamp {
seconds: (Utc::now() + Duration::seconds(60)).timestamp(),
nanos: 0,
}),
}),
refresh_token: Some(Token {
value: "".to_string(),
value: "token".to_string(),
expires_at_utc: Some(Timestamp {
seconds: (Utc::now() + Duration::seconds(60)).timestamp(),
nanos: 0,
Expand Down
33 changes: 0 additions & 33 deletions plugin/bundle/Cargo.toml

This file was deleted.

Loading
Loading