Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
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
5 changes: 5 additions & 0 deletions apps/nextra/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@ export default withBundleAnalyzer(
"/en/build/indexer/indexer-sdk/documentation/version-tracking",
permanent: true,
},
{
source: "/indexer/indexer-sdk/documentation/arcify-data",
destination: "/en/build/indexer/indexer-sdk/documentation/arcify-data",
permanent: true,
},
{
source: "/indexer/indexer-sdk/documentation/run-processor",
destination:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ export default {
"version-tracking": {
title: "Version Tracking",
},
"arcify-data": {
title: "Arcifying Data",
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

might not need a separate page for this

title: "Arcifying Step"
---

# Overview

The `ArcifyStep` is a utility step in the processing pipeline that transforms owned data into reference-counted `Arc` instances. This is particularly useful when the data needs to be shared across multiple components or threads without unnecessary cloning.

## Key Responsibilities

1. **Convert to `Arc`**: Converts a vector of owned items into a vector of `Arc`-wrapped items.
2. **Preserve Metadata**: Maintains the transaction context metadata during transformation.

## How It Works

- The `ArcifyStep` takes a `TransactionContext` containing a vector of owned items.
- Each item in the vector is wrapped in an `Arc` to enable efficient sharing.
- The metadata from the original context is preserved in the output.

## Example Usage

### Converting Data to `Arc`

```rust
let mut arcify_step = ArcifyStep::new();
let input_context = TransactionContext {
data: vec![1, 2, 3],
metadata: TransactionMetadata {
start_version: 0,
end_version: 0,
start_transaction_timestamp: None,
end_transaction_timestamp: None,
total_size_in_bytes: 0,
},
};

let result = arcify_step.process(input_context).await.unwrap().unwrap();
assert_eq!(*result.data[0], 1);
```

Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,4 @@ The SDK implements [several common steps](https://github.com/aptos-labs/aptos-in
3. `VersionTrackerStep` tracks the progress of the processor and checkpoints the processor's progress. Read more about it [here](./version-tracking.mdx).
4. `OrderByVersionStep` orders transaction contextx by their starting versions. It buffers ordered these contexts and releases them at every poll interval.
5. `WriteRateLimitStep` limits the number of bytes written to the database per second.
6. `ArcifyStep` converts transaction data to Arc Instances. Read more about it [here](./arcify-data.mdx).
Loading