genlayer 0.4.0 → 0.5.1-beta.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/.env.example +71 -0
- package/CHANGELOG.md +14 -0
- package/dist/index.js +1372 -412
- package/docker-compose.yml +144 -0
- package/package.json +4 -2
- package/scripts/postinstall.js +18 -0
- package/src/commands/general/index.ts +0 -4
- package/src/commands/general/init.ts +6 -43
- package/src/commands/general/start.ts +3 -16
- package/src/lib/config/simulator.ts +5 -6
- package/src/lib/interfaces/ISimulatorService.ts +2 -8
- package/src/lib/services/simulator.ts +57 -90
- package/tests/actions/init.test.ts +25 -84
- package/tests/actions/start.test.ts +2 -17
- package/tests/commands/init.test.ts +0 -17
- package/tests/commands/up.test.ts +1 -13
- package/tests/services/simulator.test.ts +159 -65
- package/vitest.config.ts +1 -1
package/.env.example
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# PostgreSQL database credentials
|
|
2
|
+
DBNAME=genlayer_state
|
|
3
|
+
DBUSER=postgres
|
|
4
|
+
DBPASSWORD=postgres
|
|
5
|
+
DBPORT=5432
|
|
6
|
+
DBHOST='postgres'
|
|
7
|
+
|
|
8
|
+
# Logging Configuration
|
|
9
|
+
LOGCONFIG='dev' # dev/prod
|
|
10
|
+
FLASK_LOG_LEVEL='ERROR' # DEBUG/INFO/WARNING/ERROR/CRITICAL
|
|
11
|
+
DISABLE_INFO_LOGS_ENDPOINTS='["ping", "eth_getTransactionByHash","gen_getContractSchemaForCode","gen_getContractSchema"]'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# JSON-RPC server details
|
|
15
|
+
RPCPORT=4000
|
|
16
|
+
RPCDEBUGPORT=4678
|
|
17
|
+
RPCHOST='jsonrpc'
|
|
18
|
+
RPCPROTOCOL='http'
|
|
19
|
+
JSONRPC_REPLICAS='1' # number of JsonRPC container replicas to run, used to scale up for production
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# WebRequest Server Configuration
|
|
23
|
+
WEBREQUESTPORT=5000
|
|
24
|
+
WEBREQUESTSELENIUMPORT=5001
|
|
25
|
+
WEBREQUESTPROTOCOL='http'
|
|
26
|
+
WEBREQUESTHOST='webrequest'
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Ollama server details
|
|
30
|
+
OLAMAPROTOCOL='http'
|
|
31
|
+
OLAMAHOST='ollama'
|
|
32
|
+
OLAMAPORT='11434'
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Frontend details
|
|
36
|
+
FRONTEND_PORT=8080
|
|
37
|
+
FRONTEND_BUILD_TARGET=final
|
|
38
|
+
VITE_JSON_RPC_SERVER_URL='http://127.0.0.1:4000/api' # if VITE_PROXY_ENABLED = 'true' change to '/api'
|
|
39
|
+
VITE_WS_SERVER_URL= 'ws://127.0.0.1:4000' # if VITE_PROXY_ENABLED = 'true' change to '/'
|
|
40
|
+
VITE_PLAUSIBLE_DOMAIN='studio.genlayer.com'
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# GenVM Configuration
|
|
44
|
+
GENVM_BIN="/genvm/bin"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Vite Proxy Configuration (for local development)
|
|
48
|
+
VITE_PROXY_ENABLED='false'
|
|
49
|
+
VITE_PROXY_JSON_RPC_SERVER_URL='http://jsonrpc:4000'
|
|
50
|
+
VITE_PROXY_WS_SERVER_URL='ws://jsonrpc:4000'
|
|
51
|
+
VITE_IS_HOSTED='false'
|
|
52
|
+
|
|
53
|
+
# LLM Providers Configuration
|
|
54
|
+
# If you want to use OpenAI LLMs, add your key here
|
|
55
|
+
OPENAIKEY='<add_your_openai_api_key_here>'
|
|
56
|
+
|
|
57
|
+
# If you want to use Anthropic AI LLMs, add your key here
|
|
58
|
+
ANTHROPIC_API_KEY='<add_your_anthropic_api_key_here>'
|
|
59
|
+
|
|
60
|
+
# If you want to use Heurist AI LLMs, add your key here
|
|
61
|
+
HEURISTAIURL='https://llm-gateway.heurist.xyz'
|
|
62
|
+
HEURISTAIMODELSURL='https://raw.githubusercontent.com/heurist-network/heurist-models/main/models.json'
|
|
63
|
+
HEURISTAIAPIKEY='<add_your_heuristai_api_key_here>'
|
|
64
|
+
|
|
65
|
+
# Validator Configuration
|
|
66
|
+
# JSON array of initial validators to be created on startup.
|
|
67
|
+
# Example: VALIDATORS_CONFIG_JSON = '[{"stake": 100, "provider": "openai", "model": "gpt-4o", "amount": 2}, {"stake": 200, "provider": "anthropic", "model": "claude-3-haiku-20240307", "amount": 1}]'
|
|
68
|
+
VALIDATORS_CONFIG_JSON=''
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
VSCODEDEBUG="false"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## 0.5.1-beta.0 (2024-12-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* merging main and resolving conflicts ([df23e36](https://github.com/yeagerai/genlayer-cli/commit/df23e365c4f481a153ae8b39051500aaad5b8b0e))
|
|
9
|
+
|
|
10
|
+
## 0.5.0 (2024-12-03)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* chack cli version ([#143](https://github.com/yeagerai/genlayer-cli/issues/143)) ([00ada3b](https://github.com/yeagerai/genlayer-cli/commit/00ada3b01ab8f727dbeadc2da0b810dc4211b6c9))
|
|
16
|
+
|
|
3
17
|
## 0.4.0 (2024-11-22)
|
|
4
18
|
|
|
5
19
|
|