Skip to content

Added basic storage - #5

Closed
oxade wants to merge 3 commits into
mainfrom
basic-rocks-db-impl
Closed

oxade wants to merge 3 commits into
mainfrom
basic-rocks-db-impl

Conversation

@oxade

@oxade oxade commented Nov 22, 2021

Copy link
Copy Markdown
Contributor

No description provided.

@oxade
oxade requested a review from huitseeker November 22, 2021 23:27

@huitseeker huitseeker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So, this is basically importing all three APIs from the Narwhal DB PR. There's the Map based API (which you have here in traits.rs, the async API (here in lib.rs) and the batch API (here in rocksdb's mod.rs).

I would note a couple of things:

  • the async API does not take serialization into account (it works on Vec<u8> for both Key and Value), which has performance consequences. In Narwhal, they're an artefact of history,
  • the batch API may or may not make sense for FastNFT? it was really tailored to the batch updates in the update function of the Tusk consensus.
  • the Map API is sync, but does not have the same API as the async one,

I think the core question are:

  • what makes sense for FastNFT? Perhaps an async API built around the async processing channels, but layered over the calls exposed by the Map API,
  • what fully worked-out examples in FastNFT would help test that theory?

If you're interested in us sharing a DB-access API, I'm happy splitting that off in a crate and have that use its own repo?

Comment thread storage/src/lib.rs
Comment on lines +75 to +104
pub async fn write(&mut self, key: Key, value: Value) {
if let Err(e) = self.channel.send(StoreCommand::Write(key, value)).await {
panic!("Failed to send Write command to store: {}", e);
}
}

pub async fn read(&mut self, key: Key) -> StoreResult<Option<Value>> {
let (sender, receiver) = oneshot::channel();
if let Err(e) = self.channel.send(StoreCommand::Read(key, sender)).await {
panic!("Failed to send Read command to store: {}", e);
}
receiver
.await
.expect("Failed to receive reply to Read command from store")
}

pub async fn notify_read(&mut self, key: Key) -> StoreResult<Value> {
let (sender, receiver) = oneshot::channel();
if let Err(e) = self
.channel
.send(StoreCommand::NotifyRead(key, sender))
.await
{
panic!("Failed to send NotifyRead command to store: {}", e);
}
receiver
.await
.expect("Failed to receive reply to NotifyRead command from store")
}
} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The issue with the write / read / notify_read approach here is that it's not aligned with either of :

  • the Map API introduced in traits.rs, which is the HashMap API: insert, get, remove, contains_key and iterators.
  • the WriteBatch API which is specific to RocksDB and therefore introduced in the rocksdb mod.rs: insert_batch, delete_range, delete_batch.

It would be good to pick one API you know you need and have an async overlay for it, otherwise the risk is to commit a bunch of code here that may not make sense for the needs of FastNFT.

@huitseeker

huitseeker commented Dec 11, 2021 •

Copy link
Copy Markdown
Contributor

This probably deserves a revisit based on MystenLabs/narwhal#11 MystenLabs/narwhal#20

@oxade oxade closed this Dec 30, 2021
@oxade
oxade deleted the basic-rocks-db-impl branch January 22, 2022 23:06
xydas97 added a commit that referenced this pull request Jan 5, 2023
chargarlic added a commit that referenced this pull request Apr 13, 2026
Eliminates the need for &AuthenticatorState as a transaction input,
aligning with how zkLogin handles JWK verification. Instead of passing
AuthenticatorState through Move, the native reads JWKs from a cached
JwkMap extension populated at execution setup time from the backing
store.

Changes:
- Add JwkMap extension type (HashMap of (iss,kid) -> (n_b64,e_b64))
- Populate JwkMap from AuthenticatorState in execution context setup
- Simplify Move API: verify_gcp_attestation(token, kid, clock)
- Native reads JWK from extension, decodes base64url internally
- Revert transaction-checks: no longer need immutable AuthenticatorState
  access for user transactions
- Remove get_jwk_by_kid and JWK accessor functions from
  authenticator_state.move
- Add max_move_package_size bump to 110KB at v121 (genesis builder
  publishes framework via Command::Publish which enforces the limit)
- Update all snapshots and compiled framework

Addresses review comment #5 (AuthenticatorState immutable access
concern) by removing the need entirely.
jessiemongeon1 added a commit that referenced this pull request May 7, 2026
## Summary

Automated documentation fixes based on the weekly docs audit report.

### Fixed issues

- 🔴 **#1** [HIGH]: CLI: `send-funds` command missing from docs snippet
- 🔴 **#2** [HIGH]: Move CLI: `sui move new` generated `Move.toml` is
completely outdated
- 🔴 **#3** [HIGH]: Move CLI: Directory listing shows `Sources` (capital
S) instead of `sources`
- 🟡 **#20** [MEDIUM]: Move build output mentions `UPDATING GIT
DEPENDENCY`
- 🟡 **#21** [MEDIUM]: Move coverage: Claims debug build is required
- 🔴 **#4** [HIGH]: Exchange Integration: `sui_getEvents` API used with
wrong signature
- 🔴 **#5** [HIGH]: Exchange Integration: Variable name bug in curl
example
- 🔴 **#6** [HIGH]: Exchange Integration: Uses devnet URLs for production
guidance
- 🔴 **#9** [HIGH]: Duplicate exchange integration docs
- 🔴 **#10** [HIGH]: Exchange Integration: Rust SDK examples use
deprecated `SuiClientBuilder` with JSON-RPC
- 🟡 **#22** [MEDIUM]: Exchange Integration: `read_api().get_balance()`
pattern
- 🔴 **#7** [HIGH]: Validator CLI: Missing commands in docs
- 🔴 **#8** [HIGH]: Research Papers: Outdated consensus description
- 🟡 **#11** [MEDIUM]: GraphQL: Hardcoded version number `1.56.1`
- 🟡 **#12** [MEDIUM]: External Signers: Hardcoded minimum version
- 🟡 **#13** [MEDIUM]: Package Management: Hardcoded `toolchain-version =
"1.64.0"`
- 🟡 **#14** [MEDIUM]: Full Node Config: `enable-event-processing` in
template but not in NodeConfig
- 🟡 **#15** [MEDIUM]: Full Node Config: `rpc.enable-indexing` not
prominently documented
- 🟢 **#28** [LOW]: Full node setup: Genesis blob URLs use `curl -fLJO`
- 🟡 **#16** [MEDIUM]: Consensus: Performance numbers may be stale
- 🟡 **#17** [MEDIUM]: `client.mdx`: Dynamic field example shows
`SuiSystemStateInnerV2`
- 🟡 **#18** [MEDIUM]: Release Notes: Broken external URL
- 🟡 **#19** [MEDIUM]: DeepBook Margin SDK: Hardcoded fullnode URLs
- 🟢 **#25** [LOW]: Observability doc is marked as draft
- 🟢 **#26** [LOW]: Tokenized Asset docs reference `UPDATING GIT
DEPENDENCY`
- 🟢 **#27** [LOW]: Install from source: `--features tracing`
documentation

### Files changed

- `docs/content/snippets/console-output/sui-client-help.mdx`
- `docs/content/references/cli/move.mdx`
- `docs/content/operators/exchange-integration.mdx`
- `docs/content/references/exchange-integration-guide.mdx`
- `docs/content/references/cli/validator.mdx`
- `docs/content/references/research-papers.mdx`
- `docs/content/develop/accessing-data/using-events.mdx`
- `docs/content/develop/accessing-data/graphql/query-with-graphql.mdx`
- `docs/content/references/cli/external-signers.mdx`
- `docs/content/develop/manage-packages/move-package-management.mdx`
- `docs/content/operators/full-node/sui-full-node.mdx`
- `docs/content/develop/sui-architecture/consensus.mdx`
- `docs/content/references/cli/client.mdx`
- `docs/content/references/release-notes.mdx`
-
`docs/content/onchain-finance/deepbook-margin-sdk/deepbook-margin-sdk.mdx`
- `docs/content/operators/observability.mdx`
-
`docs/content/onchain-finance/tokenized-assets/deploy-tokenized-asset.mdx`
- `docs/content/getting-started/onboarding/install-source.mdx`

### Skipped (manual action needed)

- 🟢 **#23** [LOW]: `completion` subcommand not independently documented
- 🟢 **#24** [LOW]: `fire-drill` subcommand not documented

---

*This PR was automatically generated by the Docs Audit Fixer. Please
review the changes carefully before merging.*
jessiemongeon1 added a commit that referenced this pull request May 11, 2026
## Summary

Automated documentation fixes based on the weekly docs audit report.

### Fixed issues

- 🔴 **#1** [HIGH]: zkLogin Integration: Devnet hardcoded as the example
RPC URL
- 🟡 **#2** [MEDIUM]: Gasless Stablecoin Transfers: Eligible stablecoins
linked to a merged PR, not stable docs
- 🟡 **#3** [MEDIUM]: `references/cli.mdx`: Wrong capitalization in suiup
GitHub URL
- 🟡 **#4** [MEDIUM]: `references/cli.mdx`: `external-keys` command not
listed in CLI overview
- 🟡 **#5** [MEDIUM]: DeepBook Predict docs: pinned to feature branch
`predict-testnet-4-16` — will go stale
- 🟡 **#6** [MEDIUM]: Client CLI: Several newer commands have no examples
in `client.mdx`
- 🟡 **#7** [MEDIUM]: zkLogin demo: VITE_NETWORK=devnet in .env example
- 🟢 **#10** [LOW]: indexer `build.mdx`: "Recommended" pattern still
starts with 30-day-retention HTTPS endpoint
- 🟢 **#11** [LOW]: DeepBook Predict server URL not in main contract
information page
- 🟢 **#12** [LOW]: `references/sui-move.mdx` links to `move-summary`
snippet that may need updating

### Files changed

- `docs/content/sui-stack/zklogin-integration/index.mdx`
-
`docs/content/develop/transaction-payment/gasless-stablecoin-transfers.mdx`
- `docs/content/references/cli.mdx`
- `docs/content/onchain-finance/deepbook-predict/deepbook-predict.mdx`
- `docs/content/references/cli/client.mdx`
- `docs/content/sui-stack/zklogin-integration/zklogin-demo.mdx`
- `docs/content/develop/accessing-data/custom-indexer/build.mdx`
-
`docs/content/onchain-finance/deepbook-predict/contract-information.mdx`
- `docs/content/references/sui-move.mdx`

### Skipped (manual action needed)

- 🟢 **#8** [LOW]: `completion` subcommand still not documented
- 🟢 **#9** [LOW]: `fire-drill` subcommand still not documented

---

*This PR was automatically generated by the Docs Audit Fixer. Please
review the changes carefully before merging.*

---------

Co-authored-by: wlmyng <[email protected]>
jessiemongeon1 added a commit that referenced this pull request May 26, 2026
## Summary

Automated documentation fixes based on the weekly docs audit report.

### Fixed issues

- 🟡 **#4** [MEDIUM]: Custom indexer docs still make the 30-day HTTPS
checkpoint endpoint part of the canonical “recommended” startup command

### Files changed

- `docs/content/develop/accessing-data/custom-indexer/build.mdx`

### Skipped (manual action needed)

- 🟡 **#1** [MEDIUM]: Full node docs still point to the YAML template for
the “complete list” of `rpc` options, but the template does not contain
that list
- 🟡 **#2** [MEDIUM]: `client.mdx` still omits examples for several
commands that ship in `sui client --help`
- 🟡 **#3** [MEDIUM]: zkLogin demo still defaults to Devnet even though
the main zkLogin guide was corrected to Testnet
- 🟡 **#5** [MEDIUM]: DeepBook Predict docs still carry a stale freshness
marker and remain pinned to a dated Testnet branch
- 🟡 **#6** [MEDIUM]: New v2alpha ledger-history list APIs and their
required full-node knobs are effectively undocumented
- 🟢 **#7** [LOW]: `completion` still has no dedicated docs page
- 🟢 **#8** [LOW]: `fire-drill` still has no docs page or “internal-only”
note
- 🟢 **#9** [LOW]: `MystenLabs` GitHub URL casing is still inconsistent
in multiple docs

---

*This PR was automatically generated by the Docs Audit Fixer. Please
review the changes carefully before merging.*
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.

2 participants