godmodegalactus / configure_mango Goto Github PK
View Code? Open in Web Editor NEWTypescript library with multiple functions to help configure new mango instance for a cluster
License: MIT License
Typescript library with multiple functions to help configure new mango instance for a cluster
License: MIT License
I'm trying to set up all the components to run mango_bench.
My understanding is that I need to do both: launch validator and setup/run mango using TS scripts:
./configure_local.sh
ts-node index.ts
ts-node keeper.ts
Yet the second step fails:
$ ts-node index.ts
/usr/local/lib/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
index.ts:3:23 - error TS2307: Cannot find module '@blockworks-foundation/mango-client' or its corresponding type declarations.
3 import { sleep } from "@blockworks-foundation/mango-client";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Object.require.extensions.<computed> [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) {
diagnosticCodes: [ 2307 ]
}
$ ts-node --version
v10.9.1
This issue is to report an interesting problem I've faced while running keeper.ts
vs testnet.
Atm, not for any action but if it will happen again -- might be good to check out.
keeper.ts
was running for several hours vs testnet and at some moment it has started receiving errors:
WebSocket is not open: readyState 0 (CONNECTING)
signatureSubscribe error for argument [
'2QrkqkgbCBRw8U7gEbmKWzbvrkyUvJMFmVhASEmJ5hmgaBv7ebhKyQEHxMTmVvCATp7oT9SbZvo1Rv2ziTkBx71U',
{ commitment: 'processed' }
] WebSocket is not open: readyState 0 (CONNECTING)
And sometime after that it crashed with the JS out of memory error:
<--- Last few GCs --->
[1786529:0x669b470] 1773885 ms: Mark-sweep 4049.1 (4136.0) -> 4037.7 (4140.2) MB, 3050.5 / 0.0 ms (average mu = 0.372, current mu = 0.021) allocation failure; scavenge might not succeed
[1786529:0x669b470] 1777845 ms: Mark-sweep 4053.7 (4140.2) -> 4042.3 (4144.7) MB, 3893.9 / 0.0 ms (average mu = 0.204, current mu = 0.017) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xbbf330 node::Abort() [node]
2: 0xad464e [node]
3: 0xda4320 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
4: 0xda46d6 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
5: 0xfa1b65 [node]
6: 0xfb44dd v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
7: 0xf8eaa7 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
8: 0xf8faa7 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
9: 0xf6f59a v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
10: 0x13746bf v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
11: 0x17fb2f9 [node]
[1] 1786529 abort (core dumped) ts-node keeper.ts
This commit breaks it: df84e94
Maybe it is problem of solana 1.15.2
Readme implies that the script will create the authority.json
, but following the instructions as written fails with:
~/dev/configure_mango$ yarn ts-node index.ts
yarn run v1.22.19
$ /home/apfitzge/dev/configure_mango/node_modules/.bin/ts-node index.ts
Connecting to cluster http://127.0.0.1:8899
caught an error : Error: ENOENT: no such file or directory, open 'authority.json'
Done in 2.06s.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.