Repository navigation
Align the FastNFT model with objects rather than accounts, and abstract fastpay specific details - #3
Conversation
There was a problem hiding this comment.
Should this be <ObjectID, ObjectState>?
There was a problem hiding this comment.
Yeah. Step by step. I am making mini-changes and fixing the tests as I go. Its truly a process of evolution, which you will be able to observe as commits :)
huitseeker
left a comment
There was a problem hiding this comment.
Thanks for getting the ball rolling!
I've tried to leave comments that would hopefully not impair your ability to make rapid, fundamental changes, while at the same time helping manage the code base so that further readers can still wrap their head around it.
This PR moves the fastpay logic towards the fastX logic as discussed in the spec doc:
Mind including a link to said spec? There's a few I can think of.
Remove cross shard logic since this is specific to async recipient logic for fungible balances.
Could you expand on this one? In particular as I see you keeping shard IDs and probing for the master shard an object is on: what's left of the sharding concept as a whole once we remove X-shard TXes?
More generally, for tests you're mangling without removing: Is there a comment you could add here guiding the future reader as to what functionality the test is still checking, and what it should probe in the future?
There was a problem hiding this comment.
Are we losing the ability to report on pending TXes here?
There was a problem hiding this comment.
The .received_log structure was used to keep track of the asynchronous updates into the receiver account. Fastx does not have asynchronous updates, because we do not know how to generalize these to NFTs. So this structure does not exist any more, and therefore we cannot read from it.
There was a problem hiding this comment.
Do we want to add an issue to the list to add a hashpointer to (objectID, seqID - 1)?
There was a problem hiding this comment.
Actually I think we need to add a hash pointer to the transaction that 'consumed' (objectID, seqID - 1) and created (objectID, seqID). Is that right? (The hash graph goes Obj -> Tx -> Ob -> Tx ...)
There was a problem hiding this comment.
Yep, indeed! It would be lovely to see this laid out in the spec.
There was a problem hiding this comment.
Good idea, I spell this out now under a paragraph 'Authenticated Data Structures'
There was a problem hiding this comment.
It's a matter of comfort, but I find it much easier to move impl Foo for Bar and impl Foo blocks closer to the definition of struct Bar in the same file.
Alternatively, you could push AuthorityState management to another file
There was a problem hiding this comment.
I left them where Fastpay had them. I agree on smaller files in general, lets add a ticket to separate things out a bit.
259b1a0 to
11900a8
Compare
huitseeker
left a comment
There was a problem hiding this comment.
I took the liberty to rebase (to get CI signal) and fix the knucklehead stuff. I left a few comments, but this is pretty close to a mergeable state now!
| @@ -488,23 +492,26 @@ where | |||
| /// Send money to a FastPay or Primary recipient. | |||
| async fn transfer( | |||
There was a problem hiding this comment.
It would be really great to clean up the code comments in this function a bit. Those that remain would be improved by a description of the equivalent functionality that's left to provide in the FastNFT world.
There was a problem hiding this comment.
Good call again. I removed the code comments (they were forgotten) and added a couple of TODOs in the client trait about having to adapt it to fastnft.
| #[test] | ||
| fn test_bidirectional_transfer() { |
There was a problem hiding this comment.
One line of comment to outline the future functionality to be tested?
| } | ||
|
|
||
| /* | ||
| #[test] |
There was a problem hiding this comment.
Same here: a one-liner to outline what this should look like in the FastX world wouldn't go amiss.
There was a problem hiding this comment.
I re-enabled this test, and commented the 'sending back' part of it, with a TODO: FIX comment to fix the client and then test the sending back functionality.
| fn test_handle_redeem_transaction_negative_balance() { | ||
| let (mut contract_state, name, secret) = init_contract(); |
There was a problem hiding this comment.
IIUC, in the non-fungible world, this amounts to sending an object you don't have, wouldn't this basically test the same thing as bidirectional transfer (i.e. happened-before functionality) ?
There was a problem hiding this comment.
I added a comment to fix once we have more functionality.
| /* | ||
| #[test] | ||
| fn test_format() { | ||
| let status = std::process::Command::new("cargo") |
There was a problem hiding this comment.
FYI, this happens to work for me, albeit in a now-outdated format.
| self.port, | ||
| state, | ||
| self.buffer_size, | ||
| self.cross_shard_queue_size, |
There was a problem hiding this comment.
I think this makes the field in ClientServerBenchmark completely useless and removable now.
There was a problem hiding this comment.
Yeah, but I want to fix it when I fix the client to follow the fastnft protocol.
ee7b199 to
e589214
Compare
- Reenable client text with TODO on how to fix it when we have more fnft clients - Added todo on negative balance test - Added comments on format test - Make fmt happy
…lity [Object Ownership #3] Check object owner in authority
Port Solana move changes to Sui tree
# This is the 1st commit message: implement rules # This is the commit message MystenLabs#2: test squash commit # This is the commit message MystenLabs#3: Implement base for new rules add some rules Deref ref lint rules Update redundant_deref_ref.rs remove unused code re-impl add license
added trace: BeforeInstruction
## 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.*
## 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]>
## 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.*
This PR moves the fastpay logic towards the fastX logic as discussed in the spec doc (https://www.overleaf.com/7111272316rvsqhrmycmwn):
When accepted we will need to create the following tickets to continue the evolution:
We still have some way ahead, but this is the first step.