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

Inconsistent averageBlockTime Values Between Akash Console and Bid Engine Script #254

Open
88plug opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels
P2 repo/node Akash node repo issues

Comments

@88plug
Copy link

88plug commented Sep 18, 2024

Description of the Bug:
There is an inconsistency in the averageBlockTime used for calculating uAKT/block between Akash Console and the Bid Engine Script. The Akash Console uses 6.174, while the Bid Engine Script uses 6.117. This discrepancy leads to different pricing outcomes on the Akash Console and Akash CLI.

  • Akash Console

    • Location: apps/api/src/utils/constants.ts
    export const averageBlockTime = 6.174;
    export const averageDaysInMonth = 30.437;
    export const averageHoursInAMonth = averageDaysInMonth * 24;
    export const averageBlockCountInAMonth = (averageDaysInMonth * 24 * 60 * 60) / averageBlockTime;
    export const averageBlockCountInAnHour = (60 * 60) / averageBlockTime;
  • Akash Helm Charts

    • Location: helm-charts/charts/akash-provider/scripts/price_script_generic.sh
    # average block time: 6.117 seconds (based on the time diff between 8090658-8522658 heights [with 432000 blocks as a shift in between if considering block time is 6.0s "(60/6)*60*24*30"])
    # average number of days in a month: 30.437
    # (60/6.117)*24*60*30.437 = 429909 blocks per month

Expected Behavior:
Both Akash Console and the Bid Engine Script should use the same averageBlockTime value to ensure consistency in pricing calculations. The price displayed on the Akash Console should match the price on Akash CLI. The decision needs to be made which value will be used.

Impact:
While the discrepancy between 6.174 and 6.117 may appear minor, it significantly affects pricing consistency. As a result, users encounter different prices on the Akash Console and Akash CLI, leading to confusion and inaccurate cost estimations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 repo/node Akash node repo issues
Projects
None yet
Development

No branches or pull requests

3 participants