Skip to content

chore: update Node.js to v20 and implement Promise.all optimization#30

Open
phessophissy wants to merge 1 commit intoperpetual-protocol:mainfrom
phessophissy:fix/improvements
Open

chore: update Node.js to v20 and implement Promise.all optimization#30
phessophissy wants to merge 1 commit intoperpetual-protocol:mainfrom
phessophissy:fix/improvements

Conversation

@phessophissy
Copy link
Copy Markdown

Summary

Modernize the codebase with Node.js updates and performance improvements.

Changes

  • Update Node.js from v16 to v20 - Node 16 reached End-of-Life in September 2023
    • Updated maker.Dockerfile (both builder and production stages)
    • Updated serverless.yml runtime to nodejs20.x
  • Implement Promise.all() optimization in makerRoutine()
    • Resolves the TODO comment in the code
    • Markets are now processed in parallel instead of sequentially
    • Gas price check moved outside the loop for efficiency

Testing

  • Code compiles successfully
  • Logic remains the same, just parallelized for better performance

- Update Dockerfile from Node 16 to Node 20 (Node 16 is EOL)
- Update serverless.yml runtime to nodejs20.x
- Implement Promise.all() in makerRoutine for parallel market processing
- Move gas price check outside the loop for efficiency
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.

1 participant