Execution environment
Each Notebook instance runs in an isolated sandbox. Its CPU and memory limits come from the configuration at startup. Chaintable SDKs are preinstalled so the script can read tables, query chain state, and submit computations. Notebook resources support the driver script’s own work, such as preparing inputs and collecting results. Functions submitted to BlockX use separate compute resources; increasing Notebook CPU does not directly increase a function’s call budget. Notebook and Function SDK support may also differ. Write compute functions according to Execution environment and access boundaries.Instance lifecycle
At startup, the system checks account capacity and saves the code, arguments, and resource configuration for that instance. Standard output, error logs, and resource usage are available in the UI. The instance ends when the script returns normally, raises an unhandled exception, is stopped, reaches its deadline, or is terminated for exceeding its memory limit. Editing a Notebook does not change an already running instance. Start a new instance to use new code. Subsequent scheduled runs use the saved script. Foreground execution requires the page to remain active. After switching to the background, the script can continue after you leave the page, but it is still subject to its runtime limit. To create subsequent instances automatically, use a timed or Continuous schedule. See Schedule for configuration. Continuous creates a new instance after the previous one exits and starts the script from its entry point. Python variables, in-memory caches, and loop positions are not restored. Persist results and processing progress that must survive a restart. For configuration shared across runs, use account runtime variables.How driver scripts coordinate computation
Calling an ordinary Python function directly from the script executes it in the current instance. When you submit compute tasks through the BlockX SDK or a Pipeline, functions run in a separate compute environment while the Notebook waits for or collects task results. Compute functions should receive data through arguments and import their own dependencies. Notebook globals and existing client objects do not automatically become available to those functions. For example, a Pipeline processing block data follows these steps:- Determine the available range. The script reads progress from its sources and dependency tables, limiting computation to blocks whose data is ready.
- Find gaps in the target table. Historical backfills use the target table’s processed ranges to select unfinished blocks.
- Submit compute tasks. Tasks generate function inputs from source records. BlockX executes calls in parallel while the script waits for or collects task status.
- Write results and record progress. The result handler writes returned records to the target table, and BlockDB maintains its block coverage. Processed blocks with no matching records must also leave a progress record.
- Keep following new data. After filling gaps, continuous updates subscribe to subsequent changes and repeat the process.