This repository is to be used with the GitHub Pages. Please visit https://alastria.github.io/
Any suggestion for improving the site must be sent to [email protected]
How to install a node in Alastria Red-T (Quorum technology) and tips to deploy and use it
Home Page: https://alastria.io/
License: Apache License 2.0
This repository is to be used with the GitHub Pages. Please visit https://alastria.github.io/
Any suggestion for improving the site must be sent to [email protected]
Solo una cosilla para los que ya tuvieran configurado el nodo y deseen mantener la configuración, hay un problema con la script init.sh y la opción backup, debido a que aunque recupera la configuración correctamente, en los distintos ficheros de nodos guarda el enode nuevo que se genera durante la inicialización, quedando un enode en geth distinto del que se añade en los ficheros permissioned-nodes_general.json, permissioned-nodes_validator.json y static-nodes.json.
En el caso de una instalación limpia desde 0, si tras inicializar un nodo validador con "./init.sh 192.168.99.52 validator myval01" (instalación interna para test), se procede a arrancarlo mediante "./start.sh clean", el nodo no se levanta y reporta el error:
ERROR[02-21|15:40:13] Cannot start mining without etherbase err="etherbase address must be explicitly specified"
Fatal: Failed to start mining: etherbase missing: etherbase address must be explicitly specified
Dado que el "init.sh" no crea ninguna cuenta, basta con hacerlo manualmente utilizando "geth account new", por ejemplo en mi caso:
[alastriaval01@alastria scripts]$ geth --datadir /home/alastriaval01/alastria/data account new
WARN [02-21|15:47:03] No etherbase set and no accounts found as default
Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase:
Repeat passphrase:
Address: {7ce4e63921c8e59ed458de1f0800ad3bf168c8da}
Tras ello el validador arranca sin problemas y se sincroniza con el resto de nodos
Bug sencillo, no borra todos los archivos necesarios para un inicio limpio.
Se implementan las historias de usuario:
Como gestor de la red Alastria quiero que se actualizen los ficheros de configuración del nodo para poder atender a las demandas de cambios en la red.
Como gestor de la red Alastria quiero que se reinicien los procesos geth y constellation-nodes para poder atender a las demandas de salidas de la red.
Como gestor de la red Alastria quiero que se lance una actualización según configuración CRON para poder actualizar el nodo o reiniciarlo.
Lines 7 to 11 in 6217d0a
Se realiza un test desde el nodo SantanderGW a IndraGW con el código:
a = eth.accounts[0]
web3.eth.defaultAccount = a;
// abi and bytecode generated from simplestorage.sol:
// > solcjs --bin --abi simplestorage.sol
var abi = [{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"initVal","type":"uint256"}],"payable":false,"type":"constructor"}];
var bytecode = "0x6060604052341561000f57600080fd5b604051602080610149833981016040528080519060200190919050505b806000819055505b505b610104806100456000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632a1afcd914605157806360fe47b11460775780636d4ce63c146097575b600080fd5b3415605b57600080fd5b606160bd565b6040518082815260200191505060405180910390f35b3415608157600080fd5b6095600480803590602001909190505060c3565b005b341560a157600080fd5b60a760ce565b6040518082815260200191505060405180910390f35b60005481565b806000819055505b50565b6000805490505b905600a165627a7a72305820d5851baab720bba574474de3d09dbeaabc674a15f4dd93b974908476542c23f00029";
var simpleContract = web3.eth.contract(abi);
var simple = simpleContract.new(42, {from:a, data: bytecode, gas: 0x47b760, privateFor: ["K7H2ULb9cq648JoGXH12UQ/Dj7Poe2GiDYHE+Glrz04="]}, function(e, contract) {
if (e) {
console.log("err creating contract", e);
} else {
if (!contract.address) {
console.log("Contract transaction send: TransactionHash: " + contract.transactionHash + " waiting to be mined...");
} else {
console.log("Contract mined! Address: " + contract.address);
console.log(contract);
}
}
});
Cuando se ejecuta desde la consola se genera la excepción 'EOF' y en la traza del nodo:
INFO [12-27|10:49:00|internal/ethapi/api.go:1154] sending private tx data=6060604052341561000f57600080fd5b6040516020806101
49833981016040528080519060200190919050505b806000819055505b505b610104806100456000396000f30060606040526000357c01000000000000000000000000000000000000000
00000000000000000900463ffffffff1680632a1afcd914605157806360fe47b11460775780636d4ce63c146097575b600080fd5b3415605b57600080fd5b606160bd565b604051808281
5260200191505060405180910390f35b3415608157600080fd5b6095600480803590602001909190505060c3565b005b341560a157600080fd5b60a760ce565b604051808281526020019
1505060405180910390f35b60005481565b806000819055505b50565b6000805490505b905600a165627a7a72305820d5851baab720bba574474de3d09dbeaabc674a15f4dd93b9749084
76542c23f00029000000000000000000000000000000000000000000000000000000000000002a privatefrom= privatefor="[K7H2ULb9cq648JoGXH12UQ/Dj7Poe2GiDYHE+Glrz04=
]"
ERROR[12-27|10:49:00|rpc/server.go:136] goroutine 3134 [running]:
github.com/ethereum/go-ethereum/rpc.(*Server).serveRequest.func1(0xc446749440, 0x1933620, 0xc44ee687d0)
/home/ubuntu/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/server.go:135 +0x12d
panic(0xef9460, 0xc420012090)
/usr/local/go/src/runtime/panic.go:458 +0x243
github.com/ethereum/go-ethereum/internal/ethapi.(*PublicTransactionPoolAPI).SendTransaction(0xc44679d200, 0x192e960, 0xc448aa1e40, 0x1694b5d0bb570d05
, 0x8091000d827d9849, 0xfe9077bc, 0x0, 0xc4408e5a60, 0x0, 0x0, ...)
/home/ubuntu/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/internal/ethapi/api.go:1155 +0x8ef
reflect.Value.call(0xc440ddde00, 0xc44f0161c8, 0x13, 0x103617e, 0x4, 0xc44390c060, 0x3, 0x4, 0x1, 0xf5dd40, ...)
/usr/local/go/src/reflect/value.go:434 +0x5c8
reflect.Value.Call(0xc440ddde00, 0xc44f0161c8, 0x13, 0xc44390c060, 0x3, 0x4, 0x1, 0x1, 0x11e1a05)
/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/ethereum/go-ethereum/rpc.(*Server).handle(0xc446749440, 0x192e960, 0xc448aa1e40, 0x1933620, 0xc44ee687d0, 0xc44390c000, 0xc44ee68840, 0x0,
0xebb6c0)
/home/ubuntu/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/server.go:311 +0x8ea
github.com/ethereum/go-ethereum/rpc.(*Server).exec(0xc446749440, 0x192e960, 0xc448aa1e40, 0x1933620, 0xc44ee687d0, 0xc44390c000)
/home/ubuntu/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/server.go:333 +0x1d9
github.com/ethereum/go-ethereum/rpc.(*Server).serveRequest(0xc446749440, 0x1933620, 0xc44ee687d0, 0xc4632efc01, 0x1, 0x0, 0x0)
/home/ubuntu/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/server.go:194 +0x414
github.com/ethereum/go-ethereum/rpc.(*Server).ServeSingleRequest(0xc446749440, 0x1933620, 0xc44ee687d0, 0x1)
/home/ubuntu/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/server.go:225 +0x4e
github.com/ethereum/go-ethereum/rpc.(*Server).ServeHTTP(0xc446749440, 0x192d3a0, 0xc4501cf930, 0xc4494682d0)
/home/ubuntu/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/http.go:161 +0x4f4
net/http.serverHandler.ServeHTTP(0xc440bf2080, 0x192d3a0, 0xc4501cf930, 0xc4494682d0)
/usr/local/go/src/net/http/server.go:2202 +0x7d
net/http.(*conn).serve(0xc431424980, 0x192e960, 0xc449053900)
/usr/local/go/src/net/http/server.go:1579 +0x4b7
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2293 +0x44d
Tenemos que definir y crear los requisitos para poder integrar IBFT en Alastria.
Recursos a tener en cuenta:
Se crea la rama feature/ibft para integrar los cambios necesarios e ir preparando el despliegue.
He encontrado un fallo con la sincronización del front y el back de Cakeshop al colocarlo detrás de nginx. El front abre un websocket con el front y parece que hay que colocar una configuración específica para actualizar el socket.
Solución websocket:
https://gist.github.com/michiel/1064640/deaf8b8c28b408db2b26a5cb0091b0fdfd1531a4
También hay un problema de soporte de CORS en la API al colocar el proxy nginx. Parece estar relacionado con el CORS enabled de Swagget:
https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/cors.md
Según se arranca la primera vez e intenta sincronizar con el resto de nodos validadores, genera este error:
NFO [01-03|10:31:26] Block synchronisation started
INFO [01-03|10:31:26] Mining aborted due to sync
INFO [01-03|10:31:26] Imported new chain segment blocks=192 txs=0 mgas=0.000 elapsed=167.428ms mgasps=0.000 number=192 hash=ec983b…d15db0
panic: runtime error: index out of range
goroutine 45 [running]:
panic(0xef9460, 0xc4200120e0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/ethereum/go-ethereum/core/types.NewTransactionsByPriceAndNonce(0x192e620, 0xc4223f1450, 0xc4224a3d10, 0x0)
/root/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/core/types/transaction.go:399 +0x475
github.com/ethereum/go-ethereum/miner.(*worker).commitNewWork(0xc42000e280)
/root/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/miner/worker.go:463 +0x97b
github.com/ethereum/go-ethereum/miner.(*worker).update(0xc42000e280)
/root/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/miner/worker.go:259 +0x232
created by github.com/ethereum/go-ethereum/miner.newWorker
/root/alastria-node/scripts/quorum/build/_workspace/src/github.com/ethereum/go-ethereum/miner/worker.go:158 +0x5ea
Se arranca de nuevo el nodo y sincroniza correctamente.
./monitor stop
, in an Ubuntu machine, tries to kill the running mdadm daemon, which has cwd /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog
.
mdadm is running as root, so a regular user can't kill it with signals, but some users run Alastria scripts as root.
alastria-node/scripts/start.sh
Line 55 in 6217d0a
Estamos siguiendo el procedimiento de instalación, sin mayores problemas.
Tipo: general
Nodo: samelan001
A la hora de rellenar la información de contacto, en DIRECTORY_REGULAR.md me falta el dato de enode, y no quiero hacer el PULL Request sin saber si ese dato lo rellenamos nosotros o se rellena después.
Gracias
alastria-node/scripts/start.sh
Line 69 in 6217d0a
Buscar qué herramientas y establecer las condiciones para evaluar el rendimiento de la test-net.
La ejecución de 'monitor.sh build' en un "CentOS Linux release 7.4.1708 (Core)" da el siguiente error:
can't load package: package github.com/alastria/monitor: no buildable Go source files in /root/alastria/workspace/src/github.com/alastria/monitor
Como workaround, editar el fichero 'scripts/monitor.sh' y comentar la línea:
mkdir -p "$GOPATH"/src/github.com/alastria/monitor
Una vez aplicado este cambio el monitor se descarga y construye correctamente.
Es posible que el fichero permissioned-nodes-regular.json esté inconsistente. Revisar que contiene todos los enodes de los validadores.
Las variables de entorno:
export GOROOT=/usr/local/go
export GOPATH=$HOME/alastria/workspace
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
no están disponibles, hay que realizar manualmente: source ~/.bashrc
Hi,
We are trying to install the alastria-node on a Ubuntu 16.04 64bit machine with 2 cpu cores, 4gb of ram and 30gb of disk space.
We followed the instructions in the readme, executing the bootstrap.sh
script. However, it looks like the leveldb installation fails:
...
Cloning into 'leveldb'...
remote: Counting objects: 1846, done.
remote: Total 1846 (delta 0), reused 0 (delta 0), pack-reused 1846
Receiving objects: 100% (1846/1846), 997.59 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1274/1274), done.
Checking connectivity... done.
mkdir out-shared
mkdir out-shared/db
mkdir out-shared/port
mkdir out-shared/table
mkdir out-shared/util
mkdir -p out-shared/helpers/memenv
g++ -I. -I./include -std=c++0x -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX=1 -DLEVELDB_ATOMIC_PRESENT -DHAVE_CRC32C=0 -DHAVE_SNAPPY=0 -O2 -DNDEBUG -DLEVELDB_SHARED_LIBRARY -DLEVELDB_COMPILE_LIBRARY -fPIC -fvisibility=hidden -c db/builder.cc -o out-shared/db/builder.o
In file included from ./port/port.h:14:0,
from ./db/filename.h:14,
from db/builder.cc:7:
./port/port_posix.h:50:36: error: ‘LEVELDB_IS_BIG_ENDIAN’ was not declared in this scope
static const bool kLittleEndian = !LEVELDB_IS_BIG_ENDIAN;
^
Makefile:425: recipe for target 'out-shared/db/builder.o' failed
make: *** [out-shared/db/builder.o] Error 1
En el fichero constellation.conf se añade ipwhitelist con lo mismo que othernodes.
Hay que modificar los ficheros start.sh y restart.sh.
https://blog.ethereum.org/2015/06/26/state-tree-pruning/
Información relacionada:
https://ethereum.stackexchange.com/questions/174/what-is-state-trie-pruning-and-how-does-it-work
https://ethereum.stackexchange.com/questions/4659/is-there-a-dynamic-pruning-in-geth-fast?rq=1
https://ethereum.stackexchange.com/questions/31658/is-the-size-of-the-ethereum-blockchain-a-problem-for-full-nodes-in-the-coming-mo
https://dev.to/5chdn/the-ethereum-blockchain-size-will-not-exceed-1tb-anytime-soon-58a
Se reduce al modificador de geth --syncmode:
Line 7 in 6217d0a
Debemos definir cómo integrar un anillo de claves para que cada uno de los accounts de quorum gestionados por CakeShop pueda desbloquearse automáticamente cada vez que se desee realizar una operación
El script "bootstrap.sh" obliga a que el directorio destino de la instalación esté ubicado bajo el $HOME del usuario que la ejecuta, generando error en caso contrario. Por ejemplo, no es posible instalar el nodo en "/opt".
Se debería poder utilizar mongodb como origen de datos de CakeShop.
Pare ello, hay que investigar cómo integrar Kundera con Hibernate y MongoDb.
Incluir en la Wiki de alastria-node los pasos a seguir para desplegar el Cakeshop de Alastria y un link a nuestro fork.
Como se ha cambiado la forma en que se inicializa la red, se procede a reiniciar la test-net con el nuevo procedimiento para evaluar su correcto funcionamiento.
El nodo validador del banco Sabadell no se ve como peer del validador de Indra ni del de Santander.
Una vez creada una identidad en el entorno de contratos de Uport, el token JWT se utiliza para el acceso de usuarios.
Reported by AOC
Al lanzar el init en modo backup no se deberían actualizar los permissioned-*.json del nodo porque se presupone que ya se añadió el nodo durante la primera inicialización.
Para evitar problemas de merges a la rama incorrecta se:
feature/ibft
.He comprobado que cuando se crea un nodo regular usando el script init.sh
, los ficheros que son modificados son:
../data/constellation-nodes.json
../data/permissioned-nodes_validator.json
Sin embargo, cuando se crea un nodo validador usando ese mismo script, son modificados los siguientes ficheros:
../data/permissioned-nodes_general.json
../data/permissioned-nodes_validator.json
../data/static-nodes.json
¿Están los nombres de los ficheros json invertidos en ese script?
Hi,
We are interested in joining the Alastria network and are currently playing a little bit with the Alastria setup and have some general technical questions.
When we run the start script (for a general node), in the beginning, we are connecting to several Constellation nodes, but no Geth nodes. So we assume, we have to get "on the list" of the permissioned nodes.
We found the following file of permissioned nodes here: https://github.com/alastria/alastria-node/blob/feature/ibft/data/permissioned-nodes_general.json
Furthermore, the documentation states that we would also need to issue a pull request and our contact information here: https://github.com/alastria/alastria-node/blob/feature/ibft/DIRECTORY_REGULAR.md
Our questions:
permissioned-nodes_general.json
distributed to the other network participants and who decides on this? How fast does that happen?Definir arquitectura y componentes a utilizar para realizar introspección del token y autorizar acceso al recurso a través de un token JWT generado con UPORT.
Tarea asociada #36
Only testing integration with Taiga.
This is a modification.
Hola, según tengo entendido para poder empezar a realizar transacciones en la red Alastria hay que notificar al administrador de la red la cuenta de mi nodo para que realice una transferencia y poder habilitar ese nodo, ¿como me pongo en contacto con ese administrador?
Muchas Gracias!
alastria-node/scripts/start.sh
Lines 55 to 59 in 6217d0a
Tras la configuración de un nodo en el que se importa la cuenta definida en el genesis.json (la única que inicialmente tiene "saldo"):
"alloc": {
"0x58b8527743f89389b754c63489262fdfc9ba9db6": {
"balance": "1000000000000000000000000000"
}
}
Si se arranca normalmente (start.sh) podemos consultar su "saldo":
Welcome to the Geth JavaScript console!
instance: Geth/mygen01/v1.7.2-stable-0905eda4/linux-amd64/go1.7.3
coinbase: 0x0b95902d6e755e8e5fb344fe41d4fac046a6a14e
at block: 0 (Thu, 01 Jan 1970 01:00:00 CET)
datadir: /home/alastriatest/alastria/data
modules: admin:1.0 debug:1.0 eth:1.0 istanbul:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
> web3.fromWei(eth.getBalance("0x58b8527743f89389b754c63489262fdfc9ba9db6"), "ether");
1000000000
Pero si por el contrario se arranca con la opción "clean" (start.sh clean) entonces el saldo desaparece y no es posible recuperarlo:
Welcome to the Geth JavaScript console!
instance: Geth/mygen01/v1.7.2-stable-0905eda4/linux-amd64/go1.7.3
coinbase: 0x58b8527743f89389b754c63489262fdfc9ba9db6
at block: 0 (Thu, 01 Jan 1970 01:00:00 CET)
datadir: /home/alastriatest/alastria/data
modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
> web3.fromWei(eth.getBalance("0x58b8527743f89389b754c63489262fdfc9ba9db6"), "ether");
0
El problema de no disponer de ninguna cuenta con saldo suficiente, es que en esa situación no podemos desplegar ningún Smart Contract.
alastria-node/scripts/start.sh
Lines 35 to 50 in 6217d0a
Se va a preparar un entorno con los contratos de UPORT desplegados y toda la infraestructura para que se pueda empezar a trabajar en identidad.
Se manejan dos alternativas:
I am using Python's web3 library to perform RPC operations over a regular node. Usually the operations are received and performed by the node immediately. However, in some cases I am receiving a Read time out
error out of blue, such as:
HTTPConnectionPool(host='13.81.61.232', port=22000): Read timed out. (read timeout=60) (<class 'requests.exceptions.ReadTimeout'>)
This is the Web3 connection I am using to the regular node:
self.web3 = Web3(RPCProvider(host=self.eth_info.host, port=self.eth_info.port, timeout=60))
Is someone facing this same problem, or is it just me? I don't know if the reason for this error is the Web3 library or the RPC port.
Al lanzar el script "init.sh auto general XXXXX" los ficheros ~/alastria/data/permissioned-nodes.json y ~/alastria/data/static-nodes.json no contienen el ENODE recien creado. El fichero constellation.conf si se actualiza adecuadamente.
alastria-node/scripts/start.sh
Lines 10 to 23 in 6217d0a
Establecer un nuevo conjunto de scripts para poder arrancar la red sin necesidad de reinicar todos los nodos cada vez que se añade un nuevo integrante a la test-net.
Rama asociada: feature/raft_DIRECTORY
Cuando voy a inicializar el nodo Constellation me dice esto:
Lock key pair node with password [none]:
¿Que hay que hacer?
Gracias!
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.