Skip to content
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

Initial version #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Initial version #3

wants to merge 5 commits into from

Conversation

mike-petrov
Copy link

closes #1

Signed-off-by: Mikhail Petrov [email protected]

@mike-petrov mike-petrov self-assigned this Jan 16, 2025
@mike-petrov
Copy link
Author

Screenshot 2025-01-16 at 20 39 26 Screenshot 2025-01-16 at 20 39 49 Screenshot 2025-01-16 at 20 41 31

@mike-petrov
Copy link
Author

mike-petrov commented Jan 16, 2025

@roman-khimov first working version above, now I'm doing streaming file downloads in the background with no memory load.

Signed-off-by: Mikhail Petrov <[email protected]>
Follows send.fs.neo.org mostly.

Signed-off-by: Mikhail Petrov <[email protected]>
@mike-petrov mike-petrov force-pushed the feature/1-initial_version branch 2 times, most recently from 44cafcd to 422263c Compare January 23, 2025 16:22
@mike-petrov
Copy link
Author

image image image

@mike-petrov mike-petrov force-pushed the feature/1-initial_version branch from ad9a26d to e5b9728 Compare January 23, 2025 16:41
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

Min/max do not read well, we need something like "the latest available block is XXX" dependent on the network.

Downloading the full set should be like opening up the page and hitting one button, that is 0 and the latest should be pre-filled (on network switch)

Browser limitations should be clearly explained, IIRC Firefox can't do this because it doesn't support appropriate API.

Some "About" can be useful as well explaining how it works similar to how send.fs.neo.org has it.

CHANGELOG.md Outdated Show resolved Hide resolved
src/Home.tsx Outdated Show resolved Hide resolved
@mike-petrov mike-petrov force-pushed the feature/1-initial_version branch from e408862 to 6693f0f Compare January 31, 2025 21:45
Follows send.fs.neo.org mostly.

Signed-off-by: Mikhail Petrov <[email protected]>
Signed-off-by: Mikhail Petrov <[email protected]>
@mike-petrov mike-petrov force-pushed the feature/1-initial_version branch from 6693f0f to 979cde4 Compare January 31, 2025 21:52
Copy link
Author

Choose a reason for hiding this comment

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

should be updated when we're done with the content.

>
<Heading weight="semibold" subtitle style={{ textAlign: 'center' }}>About Service</Heading>
<Content>
<p>Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging streaming techniques to efficiently fetch and store blockchain data without requiring additional backend processing.</p>
Copy link
Author

Choose a reason for hiding this comment

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

I tried to describe it well, but @roman-khimov do it better.

Copy link
Member

Choose a reason for hiding this comment

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

Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging streaming techniques to efficiently fetch and store blockchain data without requiring additional backend processing.

Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging standard NeoFS REST gateway APIs and in-browser streaming techniques to efficiently fetch and store blocks without requiring additional backend processing.

@mike-petrov
Copy link
Author

image image image

>
<Heading weight="semibold" subtitle style={{ textAlign: 'center' }}>About Service</Heading>
<Content>
<p>Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging streaming techniques to efficiently fetch and store blockchain data without requiring additional backend processing.</p>
Copy link
Member

Choose a reason for hiding this comment

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

Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging streaming techniques to efficiently fetch and store blockchain data without requiring additional backend processing.

Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging standard NeoFS REST gateway APIs and in-browser streaming techniques to efficiently fetch and store blocks without requiring additional backend processing.

<Heading weight="semibold" subtitle style={{ textAlign: 'center' }}>About Service</Heading>
<Content>
<p>Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging streaming techniques to efficiently fetch and store blockchain data without requiring additional backend processing.</p>
<p>The service supports four networks: mainnet, testnet, NeoFS mainnet, and NeoFS testnet. It interacts with the <a href="https://github.com/nspcc-dev/neofs-rest-gw/" target="_blank" rel="noopener noreferrer">NeoFS REST gateway</a> to retrieve blockchain data stored in NeoFS objects and assembles them into a structured archive format (.acc), optimized for chain data storage.</p>
Copy link
Member

Choose a reason for hiding this comment

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

s/optimized for chain data storage/that is compatible with both C# Neo node and NeoGo/

<Content>
<p>Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging streaming techniques to efficiently fetch and store blockchain data without requiring additional backend processing.</p>
<p>The service supports four networks: mainnet, testnet, NeoFS mainnet, and NeoFS testnet. It interacts with the <a href="https://github.com/nspcc-dev/neofs-rest-gw/" target="_blank" rel="noopener noreferrer">NeoFS REST gateway</a> to retrieve blockchain data stored in NeoFS objects and assembles them into a structured archive format (.acc), optimized for chain data storage.</p>
<p><a href="https://github.com/nspcc-dev/send-fs-neo-org" target="_blank" rel="noopener noreferrer">Frontend part</a> first determines the latest available block in the selected network. Blockchain data is stored in NeoFS objects, indexed in segments of 128,000 blocks. The service sequentially retrieves these index files, extracts block references, and downloads the corresponding data. The entire process runs in the browser, streaming blocks directly into an archive file, ensuring efficient storage and real-time access.</p>
Copy link
Member

Choose a reason for hiding this comment

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

determines the latest available block

How?

indexed in segments of 128,000 blocks

Indexes and objects are separate things, this should be described. In fact it's one object per one block, but index objects are needed to map indexes to OIDs.

<p>Archive.NeoFS is a web application that allows users to create blockchain archives of any span (from block 0 to the current block or a custom range) directly in the browser. It operates fully client-side, leveraging streaming techniques to efficiently fetch and store blockchain data without requiring additional backend processing.</p>
<p>The service supports four networks: mainnet, testnet, NeoFS mainnet, and NeoFS testnet. It interacts with the <a href="https://github.com/nspcc-dev/neofs-rest-gw/" target="_blank" rel="noopener noreferrer">NeoFS REST gateway</a> to retrieve blockchain data stored in NeoFS objects and assembles them into a structured archive format (.acc), optimized for chain data storage.</p>
<p><a href="https://github.com/nspcc-dev/send-fs-neo-org" target="_blank" rel="noopener noreferrer">Frontend part</a> first determines the latest available block in the selected network. Blockchain data is stored in NeoFS objects, indexed in segments of 128,000 blocks. The service sequentially retrieves these index files, extracts block references, and downloads the corresponding data. The entire process runs in the browser, streaming blocks directly into an archive file, ensuring efficient storage and real-time access.</p>
</Content>
Copy link
Member

Choose a reason for hiding this comment

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

Nothing is written about in-browser dynamics of it, it is important to mention specific streaming APIs (and tell why some browsers are not supported) and how they're leveraged.


await writableStream.close();
} catch (error: any) {
if (error.message.indexOf('showSaveFilePicker is not a function') !== -1) {
Copy link
Member

Choose a reason for hiding this comment

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

It should be possible to see about from a "bad" browser.


try {
const fileHandle = await window.showSaveFilePicker({
suggestedName: `chain_${formData.spanStart}.acc`,
Copy link
Member

Choose a reason for hiding this comment

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

IINM it's chain.X.acc, not chain_X.acc.

>
<Heading weight="semibold" subtitle style={{ textAlign: 'center' }}>Archive.NeoFS – Download Blockchain Data Snapshot</Heading>
<Content>
<p>Easily download an offline package of blockchain data up to a specific block height.</p>
Copy link
Member

Choose a reason for hiding this comment

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

s/blockchain data/blocks/

renderAs={Notification}
color={"gray"}
>
<Heading weight="semibold" subtitle style={{ textAlign: 'center' }}>Archive.NeoFS – Download Blockchain Data Snapshot</Heading>
Copy link
Member

Choose a reason for hiding this comment

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

It's not a blockchain data snapshot, this can be understood as "state snapshot". It is an offline synchronization package, block dump.

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.

Initial version
2 participants