Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
api [2018/11/14 23:47] Pablo Blanco Editado: Sincronización |
api [2019/07/31 20:44] (actual) YerkoBits sección "pruebas" |
||
---|---|---|---|
Línea 1: | Línea 1: | ||
- | **Running Bytecoin Services** | ||
- | ---- | + | Ejemplo: Una configuración correcta para la pool Prosus, sería... |
+ | ./prosus-daemon | ||
+ | ./ | ||
+ | | ||
+ | En el ejemplo, la wallet se comunica con el daemon mediante el puerto 16181. El daemon se comunica con otros daemon (otras casas) de forma libre (bind 0-0-0-0). La pool mina y envía pagos usando la wallet mediante el puerto 16191 | ||
- | **Bytecoin Developers Team edited this page on 11 Apr · 4 revisions** | + | Usando el archivo prosus-daemon junto con el prosus-wallet tienes un set de instrucciones JSON-RPC mucho más amplio que usando el archivo prosus-pay (que fue diseñado para experimentar botones de pago solamente) |
- | ---- | + | Como ejemplo aparte, los parámetros para iniciar el prosus-daemon para levantar un block-explorer, son... |
- | + | ./prosus-daemon | |
- | **Design notes** | + | |
---- | ---- | ||
+ | **Pruebas** | ||
+ | Puedes probar si funciona el JSON-RPC de **Prosus.Money**, | ||
+ | http:// | ||
- | Bytecoin is split into two separate services | + | ... o la consola (comando curl). |
+ | curl -s -u user:pass -X POST http://127.0.0.1: | ||
- | bytecoind service is responsible for P2P connections and consensus, it can assemble transactions into blocks, check transactions validity, synchronize and grow blockchain, but it cannot look inside transactions to see transfers between addresses, because this requires access to user secrets (wallet) to do so. | + | Si quieres conectar |
- | + | ./prosus-wallet | |
- | Here comes walletd that is designed to work with user wallet being run with a wallet file as a mandatory argument. After getting chain of blocks from bytecoind, walletd sifts through all transactions with wallet keys to see transfers from and to addresses stored in that wallet file. | + | |
- | + | ||
- | Though this separation is perfect, the most common case is running bytecoind and walletd on the same computer at the same time. That's why walletd has a local copy of bytecoind built-in. If you run walletd without '' | + | |
- | + | ||
- | You cannot have several bytecoinds running on the same machine, because bytecoind requires exclusive access to blockchain database stored in Bytecoin data folder. (kind-of exception is running one for mainnet and one for testnet, this works because there is separate Bytecoin data folder for testnet) | + | |
- | + | ||
- | In the meantime, you can have as many walletds running as you need, but the same wallet file (actually, wallet file with the same view key) cannot be open by more than one walletd. This is because walletd requires exclusive access to wallet cache database with a name derived from wallet file view key, stored in Bytecoin data folder. | + | |
- | + | ||
- | **Security notice**: If you operate large sums of money, you should always run bytecoind in separate process, so that potential attacks exploiting security vulnerabilities in p2p network code will not get access to address space where wallet keys are stored. | + | |
- | + | ||
- | **Note about secrets on command line**: walletd requires wallet password and HTTP basic authentication parameters to be used by JSON API. It expects them from the standard input (typed by user after launching), because secrets on a command line are security risk. So, if you wish to run walletd from script without user interaction, | + | |
- | + | ||
- | **On Linux and Mac OSX** | + | |
- | + | ||
- | '' | + | |
- | + | ||
- | **On Windows** | + | |
- | + | ||
- | '' | + | |
- | + | ||
- | **On Windows, if wallet password is empty, we need special syntax to echo empty line** | + | |
- | + | ||
- | '' | + | |
- | + | ||
- | **Handy examples** | + | |
---- | ---- | ||
- | **Running a single walletd with built-in bytecoind and default parameters**: | ||
- | |||
- | '' | ||
- | Running a single walletd with external bytecoind on the same machine (in beta you can only use 127.0.0.1 instead of localhost): | ||
- | |||
- | '' | ||
- | $ ./walletd --wallet-file=< | ||
- | Running a single walletd with external bytecoind on a different machine (if not using https, you can only use IP-address): | ||
- | |||
- | '' | ||
- | $ ./walletd --wallet-file=< | ||
- | Running two walletds with external bytecoind on the same machine: | ||
- | |||
- | '' | ||
- | $ ./walletd --wallet-file=< | ||
- | $ ./walletd --wallet-file=< | ||
- | |||
- | We had to specify different bind port for accessing second walletd, because port '' | ||
- | |||
- | We can check them both in GUI wallet, selecting " | ||
- | |||
- | **Running walletd with external bytecoind on a remote server via https (when using https, you can only use full DNS name)**: | ||
- | |||
- | '' | ||
- | |||
- | On your server, you should run bytecoind normally with Nginx HTTPS proxy (or amazon load balancer) configured with valid certificate ('' |