webevm 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -63
- package/dist/derived-trie.d.ts +38 -0
- package/dist/derived-trie.d.ts.map +1 -0
- package/dist/derived-trie.js +187 -0
- package/dist/derived-trie.js.map +1 -0
- package/dist/engine.d.ts +1 -2
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +2 -3
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +45 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +1083 -140
- package/dist/node.js.map +1 -1
- package/dist/revm-state-store.d.ts +5 -0
- package/dist/revm-state-store.d.ts.map +1 -1
- package/dist/revm-state-store.js +42 -13
- package/dist/revm-state-store.js.map +1 -1
- package/dist/revm.d.ts.map +1 -1
- package/dist/revm.js +5 -19
- package/dist/revm.js.map +1 -1
- package/dist/state-manager.d.ts +256 -18
- package/dist/state-manager.d.ts.map +1 -1
- package/dist/state-manager.js +429 -20
- package/dist/state-manager.js.map +1 -1
- package/dist/storage-keys.d.ts +8 -0
- package/dist/storage-keys.d.ts.map +1 -1
- package/dist/storage-keys.js +18 -2
- package/dist/storage-keys.js.map +1 -1
- package/dist/types.d.ts +150 -33
- package/dist/types.d.ts.map +1 -1
- package/dist/worker-client.d.ts.map +1 -1
- package/dist/worker-client.js +20 -12
- package/dist/worker-client.js.map +1 -1
- package/dist/worker-host.d.ts.map +1 -1
- package/dist/worker-host.js +17 -9
- package/dist/worker-host.js.map +1 -1
- package/dist/worker-rpc-error.d.ts +21 -0
- package/dist/worker-rpc-error.d.ts.map +1 -0
- package/dist/worker-rpc-error.js +121 -0
- package/dist/worker-rpc-error.js.map +1 -0
- package/package.json +3 -1
- package/src/derived-trie.ts +214 -0
- package/src/engine.ts +2 -3
- package/src/index.ts +2 -1
- package/src/node.ts +1293 -136
- package/src/revm-state-store.ts +47 -13
- package/src/revm.ts +11 -25
- package/src/state-manager.ts +515 -21
- package/src/storage-keys.ts +21 -2
- package/src/types.ts +152 -34
- package/src/worker-client.ts +22 -12
- package/src/worker-host.ts +17 -9
- package/src/worker-rpc-error.ts +139 -0
package/dist/node.d.ts
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
import { type ChangeSet } from './state-manager.js';
|
|
1
2
|
import { type NodeOptions, type SlimNode } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Switches the node's INTERNAL machinery on that no {@link NodeOptions} field
|
|
5
|
+
* exposes yet. NOT exported from `src/index.ts`: only this package's own tests
|
|
6
|
+
* and the next tasks reach it.
|
|
7
|
+
*/
|
|
8
|
+
export interface NodeInternals {
|
|
9
|
+
/**
|
|
10
|
+
* Record the per-block CHANGE SET (the open record of prior values; see the
|
|
11
|
+
* header of ./state-manager.ts). Off by default, and a node with it off
|
|
12
|
+
* records nothing and pays nothing. `stateHistory` turns it on (and RETAINS
|
|
13
|
+
* the records); `computeStateRoot: true` does too (the change set is the list of
|
|
14
|
+
* keys the derived trie rehashes, ./derived-trie.ts). This flag turns on
|
|
15
|
+
* recording alone, for the tests, through {@link createNodeWithInternals}.
|
|
16
|
+
*/
|
|
17
|
+
recordChangeSets?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What {@link changeSetsForTests} returns: the change set of the HEAD block
|
|
21
|
+
* (taken when it was mined) and the OPEN record (every write since), as live
|
|
22
|
+
* read-only references. `recording: false` and both `undefined` on a node that
|
|
23
|
+
* does not record.
|
|
24
|
+
*/
|
|
25
|
+
export interface ChangeSetProbe {
|
|
26
|
+
recording: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The block numbers whose change set the node RETAINS as a sealed undo record
|
|
29
|
+
* (`stateHistory`), oldest first. Empty on a node without history.
|
|
30
|
+
*/
|
|
31
|
+
sealedBlocks: readonly number[];
|
|
32
|
+
/** What the last MINED block changed, with each key's value at the end of the block before it. */
|
|
33
|
+
headBlock: ChangeSet | undefined;
|
|
34
|
+
/** Every write since the head was mined (cheats, a loaded baseline is cleared). */
|
|
35
|
+
open: ChangeSet | undefined;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* TEST-ONLY ACCESSOR for a node's change sets, named as such: it hands out the
|
|
39
|
+
* node's own record objects (read-only by contract) so a test can hold them
|
|
40
|
+
* against the state it reads through the public surface. Not part of
|
|
41
|
+
* `SlimNode` (the worker proxy's shape test would otherwise demand it cross a
|
|
42
|
+
* comlink boundary) and not exported from `src/index.ts`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function changeSetsForTests(node: SlimNode): ChangeSetProbe;
|
|
2
45
|
export declare function createNode(options?: NodeOptions): Promise<SlimNode>;
|
|
46
|
+
/** {@link createNode} with {@link NodeInternals}; internal, see there. */
|
|
47
|
+
export declare function createNodeWithInternals(options: NodeOptions, internals: NodeInternals): Promise<SlimNode>;
|
|
3
48
|
//# sourceMappingURL=node.d.ts.map
|
package/dist/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAwCA,OAAO,EAIN,KAAK,SAAS,EACd,MAAM,oBAAoB,CAAC;AAiD5B,OAAO,EAEN,KAAK,WAAW,EAIhB,KAAK,QAAQ,EAQb,MAAM,YAAY,CAAC;AAqTpB;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,kGAAkG;IAClG,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,mFAAmF;IACnF,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CAC5B;AAID;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,GAAG,cAAc,CAOjE;AA6DD,wBAAsB,UAAU,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAE7E;AAED,0EAA0E;AAC1E,wBAAsB,uBAAuB,CAC5C,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,GACtB,OAAO,CAAC,QAAQ,CAAC,CAwvFnB"}
|