
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
@projectsophon/hashing
Advanced tools
This package contains MiMC hashing utilities for use with Dark Forest. The MiMC algorithm is used for both finding planet hashes and calculating the perlin in-game. Among other things, these values are often needed for generating Snarks.
This package contains MiMC hashing utilities for use with Dark Forest. The MiMC algorithm is used for both finding planet hashes and calculating the perlin in-game. Among other things, these values are often needed for generating Snarks.
You can install this package using npm or
yarn by running:
npm install --save @projectsophon/hashing
yarn add @projectsophon/hashing
When using this in a plugin, you might want to load it with skypack
import * as hashing from 'http://cdn.skypack.dev/@projectsophon/hashing'
• Fraction: IFraction
• Const MAX_PERLIN_VALUE: 32
▸ getRandomGradientAt(point, scale, randFn): Vector
| Name | Type |
|---|---|
point | Vector |
scale | IFraction |
randFn | HashFn |
Vector
▸ mimcHash(key): (...inputs: number[]) => bigint
The primary function used to build any MiMC hashing algorithm for Dark Forest.
| Name | Type | Description |
|---|---|---|
key | number | The key for the MiMC algorithm. Will usually be PLANETHASH_KEY, SPACETYPE_KEY, or BIOMEBASE_KEY. |
fn
▸ (...inputs): bigint
| Name | Type |
|---|---|
...inputs | number[] |
bigint
▸ mimcSponge(inputs, nOutputs, rounds, key): bigint[]
| Name | Type |
|---|---|
inputs | bigint[] |
nOutputs | number |
rounds | number |
key | number |
bigint[]
▸ modPBigInt(x): bigint
Modulo a number with the LOCATION_ID_UB constant. If the result is < 0, the LOCATION_ID_UB will then be added.
| Name | Type | Description |
|---|---|---|
x | number | The number to modulo against LOCATION_ID_UB |
bigint
▸ modPBigIntNative(x): bigint
Modulo a BigInt with the LOCATION_ID_UB constant. If the result is < 0, the LOCATION_ID_UB will then be added.
| Name | Type | Description |
|---|---|---|
x | bigint | The number to modulo against LOCATION_ID_UB |
bigint
▸ perlin(coords, options): number
Calculates the perlin for a location, given the x,y pair and the PerlinConfig for the game.
| Name | Type | Description |
|---|---|---|
coords | IntegerVector | An object of the x,y coordinates for which perlin is being calculated. |
options | PerlinConfig | An object containing the configuration for the perlin algorithm. |
number
▸ rand(key): (...args: number[]) => number
| Name | Type |
|---|---|
key | number |
fn
▸ (...args): number
| Name | Type |
|---|---|
...args | number[] |
number
▸ seededRandom(seed): number
Generate a random number based on some seed. Useful for procedural generation.
| Name | Type | Description |
|---|---|---|
seed | number | The seed of the random number. |
number
FAQs
This package contains MiMC hashing utilities for use with Dark Forest. The MiMC algorithm is used for both finding planet hashes and calculating the perlin in-game. Among other things, these values are often needed for generating Snarks.
We found that @projectsophon/hashing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.