Sui.

Post

Share your knowledge.

HaGiang.
Jul 27, 2025
Expert Q&A

Local SUI fullnode returns error for dynamic field objects

I have set up a local full-node for my applications and the basic read APIs are working correctly, (getObject, getTransactionBlock, getOwnedObjects, etc.). However, when attempting to fetch dynamic field objects using suix_getDynamicFieldObject method, I consistently received the NotFound error, while the same request works fine against the 3rd party RPC endpoint.

Expected Behavior The suix_getDynamicFieldObject method should return the dynamic field object data, just like it does when querying third-party RPC endpoints.

Actual Behavior The local full-node returns a dynamicFieldNotFound error for the same object that exists and is retrievable via external RPCs.

Reproduction Steps

Making request to local fullnode (fails)
curl --location 'http://localhost:9000' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "suix_getDynamicFieldObject",
    "params": [
        "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8",
        {
            "type": "vector<u8>",
            "value": "price_info"
        }
    ]
}

Error response:

{"jsonrpc":"2.0","id":1,"result":{"error":{"code":"dynamicFieldNotFound","parent_object_id":"0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8"}}}
Making the same request to 3rd party endpoint (works)
curl --location 'https://sui-mainnet-ca-1.cosmostation.io' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "suix_getDynamicFieldObject",
    "params": [
        "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8",
        {
            "type": "vector<u8>",
            "value": "price_info"
        }
    ]
}'```
  • Sui
  • Architecture
0
5
Share
Comments
.

Answers

5
Paul.
Paul4340
Jul 31 2025, 11:57

It seems that you're encountering an issue with fetching dynamic field objects from your local full-node using the suix_getDynamicFieldObject method, which works correctly when querying third-party RPC endpoints.

Possible Causes & Solutions:

  1. State Syncing: The local full-node might not have fully synced the latest state or the specific dynamic field you're trying to query. In a local environment, the node may not have the latest data that is available on a third-party node.

    • Solution: Ensure your local full-node is fully synced with the network. You can check the sync status using the getNodeStatus or getEpochInfo methods from the node's RPC to ensure that it is up-to-date.
  2. Local Node Configuration: There may be differences in the configuration between your local full-node and the third-party endpoint. For example, certain optimizations or configurations in the third-party node might cause it to return data that your local node is not yet configured to fetch properly.

    • Solution: Verify that your local node is properly configured to handle dynamic fields and that all relevant indexes or features are enabled for the query. You may also want to compare the version of the full-node you are running to make sure it is up-to-date.
  3. Missing Dynamic Field Object: The dynamic field object you're querying may not exist at the time of the request in your local node, even though it does exist on the third-party endpoint. This could be due to a delay or inconsistency in local state updates.

    • Solution: Try refreshing or syncing your local node's state, and ensure that the object you are trying to query has been properly created. You can verify this by checking the object with other methods like getObject to confirm its existence in the local node.
  4. Node Cache or Data Lag: Your local full-node might be caching old or incomplete data, which could cause it to return dynamicFieldNotFound errors for objects that have been updated or created recently.

    • Solution: Restart your local full-node to clear the cache and force it to reload the state from the network. Additionally, check if there are any cache configurations that may affect dynamic field queries.
  5. Version Mismatch: There could be a version mismatch between your local node and the third-party RPC provider. Sometimes, different nodes on different networks or with different versions can exhibit different behaviors, especially regarding dynamic fields.

    • Solution: Ensure that you're running the latest stable version of the Sui full-node. You can check the node version and compare it to the latest release.

Debugging Steps:

  • Check Node Logs: Look for any errors or warnings related to dynamic fields or state syncing in the full-node logs.
  • Compare Responses: If possible, compare the exact responses (including headers and status) between the third-party RPC and your local node. Sometimes, the third-party RPC might be using a specific configuration or a newer feature.
  • Verify Object Existence: Double-check if the object you're querying exists in the local full-node using other methods like getObject and ensure it's the correct one.

Conclusion:

If the issue persists after trying these solutions, you may want to consider raising an issue with the Sui development community or checking the Sui GitHub repository for any known bugs or feature requests related to dynamic field queries.

6
Comments
.
Benjamin XDV.
Jul 29 2025, 13:50

Quick Fix

  1. Enable indexing in your fullnode.yaml:

    authority-store:
      enable-indexing: true  # Critical for dynamic fields
    
  2. Restart node:

    sudo systemctl restart suid
    
  3. Verify sync:

    curl -s http://localhost:9184/metrics | grep "dynamic_field_index"
    

Why This Happens

  • Local nodes disable indexing by default (unlike third-party RPCs)
  • Dynamic fields require enable-indexing: true

Still Broken?

  1. Resync data:
    sui-node --reset-db --fullnode-config ~/.sui/fullnode.yaml
    
  2. Check logs:
    journalctl -u suid -f | grep "dynamic_field"
    
5
Comments
.
Alya.
Alya-14
Jul 31 2025, 14:26

Local SUI fullnode may not index dynamic fields by default — ensure indexer-store is enabled and fully synced. The suix_getDynamicFieldObject requires indexed data, not just object storage. Use sui-node with --enable-indexer or sync the indexer separately.

4
Comments
.
Bekky.
Bekky1762
Jul 30 2025, 12:40

Immediate Fix

  1. Enable Dynamic Field Indexing
    Add to your fullnode.yaml:

    authority-store:
      enable-indexing: true
      enable-dynamic-field-indexing: true  # Critical for dynamic fields
    
  2. Restart Node:

    sudo systemctl restart sui-node
    
  3. Verify Indexing Status:

    curl -s http://localhost:9184/metrics | grep "dynamic_field_index"
    

If Still Failing

  1. Reset and Resync:

    sui-node --reset-db --fullnode-config ~/.sui/fullnode.yaml
    
  2. Check Logs:

    journalctl -u sui-node -f | grep "dynamic_field"
    

Why This Works

  • Third-party RPCs run with full indexing enabled by default
  • Local nodes require explicit config for performance optimization
  • Dynamic fields need separate indexing from regular objects

Temporary Workaround

Query a public RPC while your node syncs:

curl -X POST https://fullnode.mainnet.sui.io -H "Content-Type: application/json" -d '{
  "jsonrpc":"2.0",
  "method":"suix_getDynamicFieldObject",
  "params":[
    "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8",
    {"type":"vector<u8>","value":"price_info"}
  ],
  "id":1
}'

Expected Sync Time

  • Initial indexing: ~1-2 hours (depending on hardware)
  • Subsequent queries: Instant

For production environments, ensure your node has:

  • 16+ GB RAM
  • SSD storage
  • Stable network connection
2
Comments
.
shamueely.
Jul 27 2025, 14:07

If you're getting a dynamicFieldNotFound error from your local Sui fullnode while the same call works fine against a 3rd party RPC, the issue most likely stems from your node’s pruning or data-fetching configuration, particularly around dynamic field storage. Unlike archive or full-history nodes hosted by RPC providers, a default local fullnode may not retain or fetch dynamic fields unless configured explicitly.

Dynamic fields are stored under their parent objects, but fetching them requires your node to:

  • Retain historical state sufficiently,
  • Include all child object reads from dynamic fields, which may not be captured by minimal configurations.

✅ Solution

You should update your local fullnode config to ensure dynamic fields are not pruned. Here's how:

1. Enable full checkpoint ingestion (archive behavior)

Update your fullnode config YAML to include:

state-archive-read-config:
  - ingestion-url: "https://checkpoints.mainnet.sui.io"
    concurrency: 5
    use-for-pruning-watermark: true

2. Disable aggressive pruning

Under authority-store-pruning-config, set:

num-epochs-to-retain: 18446744073709551615

This prevents the node from deleting dynamic field data that may still be needed.

3. Optional: Use a validator snapshot

To ensure full state history including dynamic fields, sync from a validator snapshot or configure your node to download archived state from reliable sources.

🔁 Restart your node after config change

Once you’ve updated the config file, fully restart your node to apply changes.


🧪 Verifying Post-Change

Re-run the same CURL request:

curl --location 'http://localhost:9000' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "suix_getDynamicFieldObject",
    "params": [
        "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8",
        {
            "type": "vector<u8>",
            "value": "price_info"
        }
    ]
}'

You should now receive the full dynamic field object as expected.


1
Comments
.

Do you know the answer?

Please log in and share it.