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

Dev #80

Merged
merged 13 commits into from
Dec 13, 2024
Merged

Dev #80

merged 13 commits into from
Dec 13, 2024

Conversation

onmax
Copy link
Member

@onmax onmax commented Dec 10, 2024

  • Update to the documentation
  • New package for static policy

@onmax onmax requested a review from Albermonte December 10, 2024 19:26
Copy link

cloudflare-workers-and-pages bot commented Dec 10, 2024

Deploying validators-api-testnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: e18e42b
Status: ✅  Deploy successful!
Preview URL: https://46549eff.validators-api-testnet.pages.dev

View logs

Copy link

cloudflare-workers-and-pages bot commented Dec 10, 2024

Deploying validators-api-mainnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: e18e42b
Status: ✅  Deploy successful!
Preview URL: https://ad69bb3e.validators-api-mainnet.pages.dev
Branch Preview URL: https://dev.validators-api-mainnet.pages.dev

View logs

Copy link
Member

@Albermonte Albermonte left a comment

Choose a reason for hiding this comment

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

When running in local I get this error:


 ERROR  [worker reload] [worker init] Unexpected number                                                                                                                                                                  2:33:45 PM

  at compileSourceTextModule (node:internal/modules/esm/utils:340:16)
  at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
  at #translate (node:internal/modules/esm/loader:433:12)
  at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27)

@onmax
Copy link
Member Author

onmax commented Dec 10, 2024

Skill issues

Copy link

pkg-pr-new bot commented Dec 13, 2024

Open in Stackblitz

npm i https://pkg.pr.new/nimiq/validators-api/nimiq-albatross-policy@80
npm i https://pkg.pr.new/nimiq/validators-api/nimiq-rewards-calculator@80
npm i https://pkg.pr.new/nimiq/validators-api/nimiq-validators-trustscore@80
npm i https://pkg.pr.new/nimiq/validators-api/nimiq-supply-calculator@80

commit: 0e6d9ad

@onmax
Copy link
Member Author

onmax commented Dec 13, 2024

There was an issue with the following statement:

export const PROOF_OF_WORK_EMISSION_SPEED = powi(2, 22)

Somehow, the bundler decided to convert 22 to a constant with the same name...

Since it is a constant, it didn't make sense to have a function call everytime so I have replace it with:

export const PROOF_OF_WORK_EMISSION_SPEED = 4_194_304 // same as powi(2, 22)

With that, nuxi build works again.

The problem now is nuxi dev. Which keeps showing the same error...

I will keep checking

@onmax
Copy link
Member Author

onmax commented Dec 13, 2024

ok found it:

f996d6b (#80)

@onmax onmax requested a review from Albermonte December 13, 2024 10:37
Copy link
Member

@Albermonte Albermonte left a comment

Choose a reason for hiding this comment

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

LGTM

@onmax onmax merged commit cfefd7a into main Dec 13, 2024
7 checks passed
@ines-toupeira ines-toupeira deleted the dev branch December 13, 2024 18:02
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.

3 participants