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

[Bug] DEPENDENCY_LIMIT_REACHED when calling on-chain function #15661

Open
fgfm999 opened this issue Dec 30, 2024 · 1 comment
Open

[Bug] DEPENDENCY_LIMIT_REACHED when calling on-chain function #15661

fgfm999 opened this issue Dec 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@fgfm999
Copy link
Contributor

fgfm999 commented Dec 30, 2024

🐛 Bug

I'm not sure whether this is bug.

I'm encountering a DEPENDENCY_LIMIT_REACHED error when calling functions of an on-chain contract. This occurs in my DEX aggregator implementation, which naturally requires multiple dependencies due to its aggregation nature.

    info: V0(
        TransactionInfoV0 {
            gas_used: 190,
            status: MiscellaneousError(
                Some(
                    DEPENDENCY_LIMIT_REACHED,
                ),
            ),
            transaction_hash: HashValue(0xc88843a0ede3ac8701a667e9f20e81a8a586ce1e02c5e7a51eb36b638062d9c4),
            event_root_hash: HashValue(0x0000000000000000000000000000000000000000000000000000000000000000),
            state_change_hash: HashValue(0x0000000000000000000000000000000000000000000000000000000000000000),
            state_checkpoint_hash: None,
            state_cemetery_hash: None,
        },
    ),

To reproduce

  • The error doesn't occur on all paths
  • Specific failing example path: USDT -[Pontem]-> AMA -[Thala]-> APT

After reviewing the aptos-core code, I found that this error can be triggered by either:

  1. Exceeding the number of dependencies limit

  2. Exceeding the total dependency size in bytes

  3. What are the exact limit values for:

    • num_dependencies: NumModules
    • total_dependency_size: NumBytes
  4. How can I debug this issue? Specifically:

    • Is there a way to check the exact total_dependency_size for my transaction?
    • Are there tools or methods to analyze dependency usage?

Additional context

I've searched through the documentation but couldn't find detailed information about these limits and their implementation. Any detailed explanation or pointers to relevant documentation would be greatly appreciated.

@fgfm999 fgfm999 added the bug Something isn't working label Dec 30, 2024
@fgfm999 fgfm999 changed the title [Bug] [Bug] DEPENDENCY_LIMIT_REACHED when calling on-chain funciton Dec 30, 2024
@fgfm999 fgfm999 changed the title [Bug] DEPENDENCY_LIMIT_REACHED when calling on-chain funciton [Bug] DEPENDENCY_LIMIT_REACHED when calling on-chain function Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@fgfm999 and others