Native contracts complete - all tests passing
This commit is contained in:
parent
a63b3dcb70
commit
f006f1623c
286
TESTNET.md
286
TESTNET.md
|
|
@ -1,143 +1,143 @@
|
||||||
# Tutus Testnet Deployment Guide
|
# Tutus Testnet Deployment Guide
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This guide deploys two sovereign Tutus blockchain instances for testing:
|
This guide deploys two sovereign Tutus blockchain instances for testing:
|
||||||
|
|
||||||
| Instance | Magic | Validators | RPC Port | Purpose |
|
| Instance | Magic | Validators | RPC Port | Purpose |
|
||||||
|----------|-------|------------|----------|---------|
|
|----------|-------|------------|----------|---------|
|
||||||
| Alpha | 88890 | 3 | 10332 | Primary test chain |
|
| Alpha | 88890 | 3 | 10332 | Primary test chain |
|
||||||
| Beta | 88891 | 3 | 11332 | Bridge testing chain |
|
| Beta | 88891 | 3 | 11332 | Bridge testing chain |
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd tutus/chain
|
cd tutus/chain
|
||||||
|
|
||||||
# Build images (first time or after code changes)
|
# Build images (first time or after code changes)
|
||||||
docker-compose build
|
docker-compose build
|
||||||
|
|
||||||
# Start both instances (6 nodes total)
|
# Start both instances (6 nodes total)
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
# Check status
|
# Check status
|
||||||
docker-compose ps
|
docker-compose ps
|
||||||
|
|
||||||
# View logs
|
# View logs
|
||||||
docker-compose logs -f alpha_one
|
docker-compose logs -f alpha_one
|
||||||
docker-compose logs -f beta_one
|
docker-compose logs -f beta_one
|
||||||
|
|
||||||
# Stop all nodes
|
# Stop all nodes
|
||||||
docker-compose down
|
docker-compose down
|
||||||
|
|
||||||
# Stop and remove all data (fresh start)
|
# Stop and remove all data (fresh start)
|
||||||
docker-compose down -v
|
docker-compose down -v
|
||||||
```
|
```
|
||||||
|
|
||||||
## Starting Individual Instances
|
## Starting Individual Instances
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Alpha only (3 validators)
|
# Alpha only (3 validators)
|
||||||
docker-compose up -d alpha_one alpha_two alpha_three
|
docker-compose up -d alpha_one alpha_two alpha_three
|
||||||
|
|
||||||
# Beta only (3 validators)
|
# Beta only (3 validators)
|
||||||
docker-compose up -d beta_one beta_two beta_three
|
docker-compose up -d beta_one beta_two beta_three
|
||||||
```
|
```
|
||||||
|
|
||||||
## RPC Endpoints
|
## RPC Endpoints
|
||||||
|
|
||||||
### Instance Alpha
|
### Instance Alpha
|
||||||
| Node | RPC | P2P | Prometheus |
|
| Node | RPC | P2P | Prometheus |
|
||||||
|------|-----|-----|------------|
|
|------|-----|-----|------------|
|
||||||
| alpha_one | http://localhost:10332 | :10333 | :2112 |
|
| alpha_one | http://localhost:10332 | :10333 | :2112 |
|
||||||
| alpha_two | http://localhost:10342 | :10343 | :2122 |
|
| alpha_two | http://localhost:10342 | :10343 | :2122 |
|
||||||
| alpha_three | http://localhost:10352 | :10353 | :2132 |
|
| alpha_three | http://localhost:10352 | :10353 | :2132 |
|
||||||
|
|
||||||
### Instance Beta
|
### Instance Beta
|
||||||
| Node | RPC | P2P | Prometheus |
|
| Node | RPC | P2P | Prometheus |
|
||||||
|------|-----|-----|------------|
|
|------|-----|-----|------------|
|
||||||
| beta_one | http://localhost:11332 | :11333 | :2113 |
|
| beta_one | http://localhost:11332 | :11333 | :2113 |
|
||||||
| beta_two | http://localhost:11342 | :11343 | :2123 |
|
| beta_two | http://localhost:11342 | :11343 | :2123 |
|
||||||
| beta_three | http://localhost:11352 | :11353 | :2133 |
|
| beta_three | http://localhost:11352 | :11353 | :2133 |
|
||||||
|
|
||||||
## Verify Nodes Are Running
|
## Verify Nodes Are Running
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check Alpha block height
|
# Check Alpha block height
|
||||||
curl -s -X POST http://localhost:10332 \
|
curl -s -X POST http://localhost:10332 \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}'
|
-d '{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}'
|
||||||
|
|
||||||
# Check Beta block height
|
# Check Beta block height
|
||||||
curl -s -X POST http://localhost:11332 \
|
curl -s -X POST http://localhost:11332 \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}'
|
-d '{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}'
|
||||||
|
|
||||||
# Get native contracts
|
# Get native contracts
|
||||||
curl -s -X POST http://localhost:10332 \
|
curl -s -X POST http://localhost:10332 \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"jsonrpc":"2.0","method":"getnativecontracts","params":[],"id":1}' | jq '.result[].manifest.name'
|
-d '{"jsonrpc":"2.0","method":"getnativecontracts","params":[],"id":1}' | jq '.result[].manifest.name'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Validator Configuration
|
## Validator Configuration
|
||||||
|
|
||||||
### Instance Alpha Committee
|
### Instance Alpha Committee
|
||||||
Uses wallet1, wallet2, wallet3:
|
Uses wallet1, wallet2, wallet3:
|
||||||
- `02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2`
|
- `02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2`
|
||||||
- `02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e`
|
- `02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e`
|
||||||
- `03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699`
|
- `03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699`
|
||||||
|
|
||||||
### Instance Beta Committee
|
### Instance Beta Committee
|
||||||
Uses wallet2, wallet3, wallet4 (different committee):
|
Uses wallet2, wallet3, wallet4 (different committee):
|
||||||
- `02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e`
|
- `02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e`
|
||||||
- `03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699`
|
- `03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699`
|
||||||
- `02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62`
|
- `02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62`
|
||||||
|
|
||||||
## Consensus Requirements
|
## Consensus Requirements
|
||||||
|
|
||||||
With 3 validators (dBFT):
|
With 3 validators (dBFT):
|
||||||
- Block production: 2-of-3 validators required
|
- Block production: 2-of-3 validators required
|
||||||
- Network can tolerate 1 validator failure
|
- Network can tolerate 1 validator failure
|
||||||
|
|
||||||
## Testing Bridge Protocol
|
## Testing Bridge Protocol
|
||||||
|
|
||||||
Once both instances are running:
|
Once both instances are running:
|
||||||
|
|
||||||
1. Register a Vita on Alpha
|
1. Register a Vita on Alpha
|
||||||
2. Use Federation contract to register as visitor on Beta
|
2. Use Federation contract to register as visitor on Beta
|
||||||
3. Test Pons contract for cross-border verification
|
3. Test Pons contract for cross-border verification
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Nodes not producing blocks
|
### Nodes not producing blocks
|
||||||
```bash
|
```bash
|
||||||
# Check if all validators are connected
|
# Check if all validators are connected
|
||||||
docker-compose logs alpha_one | grep -i "connected"
|
docker-compose logs alpha_one | grep -i "connected"
|
||||||
|
|
||||||
# Restart with fresh data
|
# Restart with fresh data
|
||||||
docker-compose down -v
|
docker-compose down -v
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build fails
|
### Build fails
|
||||||
```bash
|
```bash
|
||||||
# Ensure Go 1.24+ is used in Dockerfile
|
# Ensure Go 1.24+ is used in Dockerfile
|
||||||
# Clean rebuild
|
# Clean rebuild
|
||||||
docker-compose build --no-cache
|
docker-compose build --no-cache
|
||||||
```
|
```
|
||||||
|
|
||||||
### Port conflicts
|
### Port conflicts
|
||||||
```bash
|
```bash
|
||||||
# Check what's using the ports
|
# Check what's using the ports
|
||||||
netstat -tlnp | grep -E "1033|1133"
|
netstat -tlnp | grep -E "1033|1133"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Native Contracts Available
|
## Native Contracts Available
|
||||||
|
|
||||||
Both instances include all Tutus native contracts:
|
Both instances include all Tutus native contracts:
|
||||||
- Vita (identity), Annos (lifespan), VTS (stablecoin)
|
- Vita (identity), Annos (lifespan), VTS (stablecoin)
|
||||||
- Scire (education), Salus (healthcare), Sese (life planning)
|
- Scire (education), Salus (healthcare), Sese (life planning)
|
||||||
- Eligere (voting), Lex (rights), Collocatio (investments)
|
- Eligere (voting), Lex (rights), Collocatio (investments)
|
||||||
- Tribute (anti-hoarding), Opus (AI workforce)
|
- Tribute (anti-hoarding), Opus (AI workforce)
|
||||||
- Federation, Pons, Palam (cross-chain)
|
- Federation, Pons, Palam (cross-chain)
|
||||||
- Tutus (governance), Lub (utility)
|
- Tutus (governance), Lub (utility)
|
||||||
|
|
|
||||||
0
cli/smartcontract/rpcbindings/nft-d/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/nft-d/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/nft-nd/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/nft-nd/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/notifications/rpcbindings/extended/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/notifications/rpcbindings/extended/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/notifications/rpcbindings/guessed/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/notifications/rpcbindings/guessed/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/notifications/rpcbindings/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/notifications/rpcbindings/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/royalty/rpcbindings/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/royalty/rpcbindings/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/royalty/rpcbindings/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/royalty/rpcbindings/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/structs/rpcbindings/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/structs/rpcbindings/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/structs/rpcbindings/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/structs/rpcbindings/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/types/rpcbindings/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/rpcbindings/types/rpcbindings/dynamic_hash/rpcbindings_test.go
Normal file → Executable file
0
cli/smartcontract/testdata/rpcbindings/notifications/notifications.go
vendored
Normal file → Executable file
0
cli/smartcontract/testdata/rpcbindings/notifications/notifications.go
vendored
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue