Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
adea854
create new pr
MitchTurner Nov 12, 2025
0b1944f
Use ipv4 instead of ipv6 in tests
MitchTurner Nov 13, 2025
7f4533b
Make api optional
MitchTurner Nov 13, 2025
b016b3e
Add missing features for new db types including unique rollback impl
MitchTurner Nov 13, 2025
a2161d2
Remove unused marker
MitchTurner Nov 13, 2025
c032a1a
Improve policy conversion
MitchTurner Nov 13, 2025
b2ba2a2
Reduce size of policies vec if not used
MitchTurner Nov 13, 2025
107a46c
Use references in serializer adapter code
MitchTurner Nov 13, 2025
ae193fe
add fuel-core-protobuf after reverting old changes
MitchTurner Nov 14, 2025
ffd326a
Move functions to their own files
MitchTurner Nov 14, 2025
27f5bf1
remove build for proto types
MitchTurner Nov 14, 2025
8bb2b15
Cleanup block creation in tests
MitchTurner Nov 14, 2025
fd82db9
Fix stream in server response to be more streamlined (lol)
MitchTurner Nov 14, 2025
56ece62
Lint toml
MitchTurner Nov 14, 2025
7bcb4bd
Move proto server to task
MitchTurner Nov 14, 2025
70a6bcd
wip
MitchTurner Nov 15, 2025
179b863
Wip
MitchTurner Nov 17, 2025
6da16fd
Fix a bunch of feature compilation issues
MitchTurner Nov 17, 2025
7ec5dfb
fix clippy warnings
MitchTurner Nov 17, 2025
277f961
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 17, 2025
26c26e0
bump ci
MitchTurner Nov 17, 2025
1da2683
update commit for proto types
MitchTurner Nov 17, 2025
c108608
Fix compilation
MitchTurner Nov 17, 2025
fb5022f
Merge branch 'chore/add-remote-block-cache' into chore/pr-followup-ch…
MitchTurner Nov 17, 2025
f1782eb
Merge branch 'chore/add-remote-block-cache' into chore/pr-followup-ch…
MitchTurner Nov 17, 2025
157422b
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 17, 2025
87d7b4a
fix benches
MitchTurner Nov 17, 2025
8a4730b
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 17, 2025
680b82e
Use new proto types
MitchTurner Nov 17, 2025
08ca302
fix benches
MitchTurner Nov 17, 2025
da1407c
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 17, 2025
71384d2
lint toml
MitchTurner Nov 17, 2025
38d6478
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 17, 2025
22a5397
Merge branch 'chore/add-remote-block-cache' into chore/pr-followup-ch…
MitchTurner Nov 17, 2025
e9c9277
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 17, 2025
0cb9ec3
use published version to get past ci checks
MitchTurner Nov 17, 2025
5dd229b
Fix compilation
MitchTurner Nov 18, 2025
779a132
Add import
MitchTurner Nov 18, 2025
a4a7022
Add correct import
MitchTurner Nov 18, 2025
f518b92
patch for new changes
MitchTurner Nov 18, 2025
a70edd1
Merge remote-tracking branch 'origin' into chore/improve-s3-interaction
MitchTurner Nov 18, 2025
05bf007
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 18, 2025
fbeb8af
Update with new types and get tests passing
MitchTurner Nov 18, 2025
0e26a96
Lint, remove commented code
MitchTurner Nov 18, 2025
23aa95b
appease clippy-sama, hide import
MitchTurner Nov 18, 2025
8a194ab
Cleanup
MitchTurner Nov 18, 2025
ec56359
fmt
MitchTurner Nov 18, 2025
1366c94
remove comment
MitchTurner Nov 18, 2025
a6d8d98
Use env instead of explicit aws_region
MitchTurner Nov 18, 2025
a7588b2
Appease Clippy-sama
MitchTurner Nov 18, 2025
8ffa10b
Add gzip to remote blocks
MitchTurner Nov 18, 2025
59e5312
lint toml
MitchTurner Nov 19, 2025
8a6c96a
Appease Clippy-sama
MitchTurner Nov 19, 2025
39a59bc
Merge branch 'chore/add-remote-block-cache' into chore/pr-followup-ch…
MitchTurner Nov 19, 2025
4584aeb
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 19, 2025
077ec3a
Fix features on run
MitchTurner Nov 19, 2025
6e2a2ee
depend on crates version of protobufs
MitchTurner Nov 19, 2025
2b7d4a5
Fix the broken client construction
MitchTurner Nov 19, 2025
90148cf
Remove tracing
MitchTurner Nov 19, 2025
ec495ab
Merge branch 'chore/add-remote-block-cache' into chore/pr-followup-ch…
MitchTurner Nov 19, 2025
f82e90f
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 19, 2025
345304c
fix sync
MitchTurner Nov 19, 2025
92ed553
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 19, 2025
0240345
Appease Clippy-sama, remove unused code in importer
MitchTurner Nov 19, 2025
272b7c4
Merge branch 'chore/pr-followup-changes' into chore/improve-s3-intera…
MitchTurner Nov 19, 2025
4e7f768
Fix s3 configuration
MitchTurner Nov 19, 2025
f45fe65
Fix broken tests
MitchTurner Nov 19, 2025
282525f
Add receipts to block "serialization"
MitchTurner Nov 20, 2025
9c74f75
Add empty receipt prop strategy
MitchTurner Nov 20, 2025
b7978b1
Add round-trip tests for receipts
MitchTurner Nov 20, 2025
757f9d1
sort toml
MitchTurner Nov 20, 2025
4a611ba
fmt
MitchTurner Nov 20, 2025
eda64e6
remove extra semicolons
MitchTurner Nov 20, 2025
fde286c
point at branch of .github repo
MitchTurner Nov 21, 2025
e4e4c71
Use local version of action to avoid failing ci
MitchTurner Nov 21, 2025
f8a79b4
Add missing receipt variant
MitchTurner Nov 21, 2025
0032faa
Start implementing receipts
MitchTurner Nov 21, 2025
a805c22
Add new receipt adapter w/test
MitchTurner Nov 24, 2025
374e729
fmt
MitchTurner Nov 24, 2025
1edbf31
Include receipt checks in integ tests
MitchTurner Nov 24, 2025
412ac7d
Fix compilation
MitchTurner Nov 24, 2025
9cb159f
Use published proto library
MitchTurner Nov 24, 2025
9d4e7e1
wip add client
MitchTurner Nov 25, 2025
618f553
Merge branch 'chore/add-remote-block-cache' into cbore/add-proto-clie…
MitchTurner Nov 25, 2025
ebe1abf
Merge branch 'chore/add-remote-block-cache' into cbore/add-proto-clie…
MitchTurner Nov 25, 2025
29ee590
Merge branch 'chore/add-remote-block-cache' into cbore/add-proto-clie…
MitchTurner Nov 25, 2025
1009b15
Merge branch 'chore/add-remote-block-cache' into cbore/add-proto-clie…
MitchTurner Nov 26, 2025
9c69d14
Lint toml, update changlog
MitchTurner Nov 26, 2025
40798e7
Remove semicolons
MitchTurner Nov 26, 2025
efac86c
remove more semicolons
MitchTurner Nov 26, 2025
cb39767
Wip
MitchTurner Nov 26, 2025
8bf28c9
Merge branch 'chore/add-remote-block-cache' into cbore/add-proto-clie…
MitchTurner Nov 26, 2025
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 .changes/added/3157.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add protobuf and s3 bucket support to fuel client
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion bin/fuel-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
pub mod cli;
pub use fuel_core::service::FuelService;

use fuel_core_block_aggregator_api as _;
use tikv_jemallocator as _; // Used only by the binary
3 changes: 3 additions & 0 deletions crates/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ subscriptions = [
"fuel-core-types/serde",
]
fault-proving = ["fuel-core-types/fault-proving"]
rpc = ["dep:fuel-core-protobuf", "dep:tonic"]

[dependencies]
anyhow = { workspace = true }
base64 = { version = "0.22.1", optional = true }
cynic = { workspace = true }
derive_more = { workspace = true }
eventsource-client = { version = "0.13.0", optional = true }
fuel-core-protobuf = { workspace = true, optional = true }
fuel-core-types = { workspace = true, features = ["alloc", "serde"] }
futures = { workspace = true, optional = true }
hex = { workspace = true }
Expand All @@ -46,6 +48,7 @@ serde_json = { version = "1.0", features = ["raw_value"] }
# We force the version because 4.1.0 update leap seconds that breaks our timestamps
tai64 = { version = "=4.0.0", features = ["serde"] }
thiserror = "1.0"
tonic = { workspace = true, optional = true }
tracing = "0.1"

[build-dependencies]
Expand Down
49 changes: 49 additions & 0 deletions crates/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,13 @@ use types::{
},
};

use fuel_core_protobuf::{
self,
block_aggregator_client::BlockAggregatorClient,
};
#[cfg(feature = "subscriptions")]
use std::pin::Pin;
use tonic::codegen::StdError;

pub mod pagination;
pub mod schema;
Expand Down Expand Up @@ -246,6 +251,10 @@ pub struct FuelClient {
transport: FailoverTransport,
require_height: ConsistencyPolicy,
chain_state_info: ChainStateInfo,
#[cfg(feature = "rpc")]
protobuf_client: Option<BlockAggregatorClient<tonic::transport::Channel>>,
#[cfg(feature = "rpc")]
s3_client: (),
}

impl FromStr for FuelClient {
Expand All @@ -268,6 +277,10 @@ impl FromStr for FuelClient {
height: Arc::new(Mutex::new(None)),
},
chain_state_info: Default::default(),
#[cfg(feature = "rpc")]
protobuf_client: None,
#[cfg(feature = "rpc")]
s3_client: (),
})
}
}
Expand Down Expand Up @@ -300,15 +313,51 @@ impl FuelClient {
Self::from_str(url.as_ref())
}

#[cfg(feature = "rpc")]
pub async fn new_with_rpc<D>(
graphql_url: impl AsRef<str>,
rpc_url: D,
) -> anyhow::Result<Self>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let mut client = Self::new(graphql_url)?;
let rpc_client = BlockAggregatorClient::connect(rpc_url)
.await
.context("Failed to connect to the Block Aggregator RPC")?;
client.protobuf_client = Some(rpc_client);
Ok(client)
}

pub fn with_urls(urls: Vec<Url>) -> anyhow::Result<Self> {
Ok(Self {
transport: FailoverTransport::new(urls)?,
require_height: ConsistencyPolicy::Auto {
height: Arc::new(Mutex::new(None)),
},
chain_state_info: Default::default(),
#[cfg(feature = "rpc")]
protobuf_client: None,
})
}

#[cfg(feature = "rpc")]
pub async fn with_urls_and_rpc<D>(
graph_ql_urls: Vec<Url>,
rpc_url: D,
) -> anyhow::Result<Self>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let mut client = Self::with_urls(graph_ql_urls)?;
let rpc_client = BlockAggregatorClient::connect(rpc_url)
.await
.context("Failed to connect to the Block Aggregator RPC")?;
client.protobuf_client = Some(rpc_client);
Ok(client)
}
}

impl FuelClient {
Expand Down
Loading