Orbs Network
  • Overview
    • What is Orbs?
    • Layer 3 Protocol
    • Running on EVM and TON
    • Enhanced Execution
    • L3 for Advanced Trading
    • Network Diagram
    • White Papers and Spec
  • Orbs Lambda
    • What is Orbs Lambda?
    • Network Diagram
    • Example Use Cases
    • Step by Step Overview
      • Development Requirements
      • Select Unique ID
      • Project Template
      • index.js Implementation
        • Execution Environment
        • Allowed Packages
        • Supported Networks
        • Execution Triggers
        • Sending Transactions
      • Testing Locally
      • Deploying to Production
      • Analyzing Execution
  • Orbs VM
    • What is Orbs VM?
    • Network Diagram
    • Example Use Cases
    • Step by Step Overview
      • Development Requirements
      • Select Unique ID
      • Docker Image Implementation
        • Execution Environment
        • Working Directory
        • Entry Point
        • Health Check
        • status.json
      • Testing Locally
      • Deploying to Production
      • Analyzing Execution
  • Powered by Orbs
    • Liquidity Hub
      • Integration Spec
    • Perpetual Hub
    • dTWAP Protocol
      • Integration Spec
      • Network Diagram
      • dTWAP Tutorial
      • FAQ
    • dLIMIT Protocol
      • Integration Spec
      • dLIMIT Tutorial
      • FAQ
  • Community Projects
    • Notification Protocol
      • Integrate a New Project
      • Network Diagram
    • TON Access
      • Network Diagram
    • TON Vote
Powered by GitBook
On this page
  • Memory
  • Persistent disk storage
  • CPU load
  • Standard output and logs
  • Throwing exceptions
  • Privacy and secrets
  1. Orbs Lambda
  2. Step by Step Overview
  3. index.js Implementation

Execution Environment

Previousindex.js ImplementationNextAllowed Packages

Last updated 4 months ago

Memory

A lambda function should not consume more than 100MB of RAM. Consuming too much memory will put the lambda at risk of termination and non execution.

A lambda may keep global variables in memory to maintain its internal state. Regard this memory as a nice-to-have cache only, meaning the lambda may be restarted from scratch without warning and lose all of its memory contents. An appropriate use of this cache is to initialize web3 for example.

Persistent disk storage

A lambda is not allowed to access the local filesystems and may not rely on the disk to store its persistent storage. If you require persistent storage, take a look at allowed packages that provide some of this functionality.

CPU load

Orbs Lambda is not designed for computationally intensive actions. Most lambdas are . If your business logic is CPU-bound, Orbs Lambda may not be the right solution for you. Lambdas that consume excessive CPU for long durations of time (over 10% of an average cloud core) are at risk of termination and non execution.

Standard output and logs

A lambda may output logs to standard output (stdout) with commands like console.log(). A recent extract of these logs is available for analysis by visiting the network .

Throwing exceptions

Exceptions thrown from within lambda code are logged in the output of the lambda. A recent list of exceptions is available for analysis by visiting the network .

Privacy and secrets

Much like smart contracts on-chain, Orbs Lambda is a decentralized protocol running on public and open infrastructure. This means that the source code of your function is open and all data retained by the lambda is publicly available to any community auditor. Do not store any private information or secrets that you would not otherwise store in a smart contract.

contract objects
I/O-bound
status page
status page