我是靠谱客的博主 漂亮镜子,最近开发中收集的这篇文章主要介绍DarkFi代码解析1. 引言,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

1. 引言

前序博客有:

  • DarkFi:Layer 1 for 隐私合约

本地开发调试流程为:gatewayd->cashierd->darkfid->drk

目前代码中采用的为bellman:Groth16算法。暂未迁移至Halo2算法。
目前支持的网络有比特币、Solana、以太坊。

  • 1)启动gatewayd
$ gatewayd -c ~/.config/darkfi/gatewayd.toml -v
2021-12-07 16:08:17,957 DEBUG [GATEWAY DAEMON] Run 8 executor threads
2021-12-07 16:08:17,970 DEBUG [REP PROTOCOL API] GATEWAY DAEMON SERVICE: Bound To tcp://127.0.0.1:3333
2021-12-07 16:08:17,970 DEBUG [REP PROTOCOL API] GATEWAY DAEMON SERVICE: Running
2021-12-07 16:08:17,971 DEBUG [PUBLISHER API] GATEWAY DAEMON SERVICE : Bound To tcp://127.0.0.1:4444
2021-12-07 16:09:58,786 DEBUG [GATEWAY DAEMON] Received getlastindex msg
2021-12-07 16:09:58,786 DEBUG [SLABSTORE] Get last index as bytes
2021-12-07 16:10:24,535 DEBUG [GATEWAY DAEMON] Received getlastindex msg
2021-12-07 16:10:24,535 DEBUG [SLABSTORE] Get last index as bytes
  • 2)启动cashierd
$ cashierd -v -c ~/.config/darkfi/cashierd.toml
2021-12-07 16:09:54,286 DEBUG [CASHIER DAEMON] Run 8 executor threads
2021-12-07 16:09:54,287 DEBUG [CASHIER DAEMON] Initialize
2021-12-07 16:09:54,287 DEBUG [CASHIERDB] new() Constructor called
2021-12-07 16:09:54,287 DEBUG [WALLETDB] new() Constructor called
2021-12-07 16:09:55,793 DEBUG [WALLETDB] Initialize...
2021-12-07 16:09:55,796 DEBUG [WALLETDB] OPENED CONNECTION AT PATH "/Users/lanyu/.config/darkfi/localdata/cashier_client_wallet.db"
2021-12-07 16:09:56,024 DEBUG [WALLETDB] Returning keypairs...
2021-12-07 16:09:56,250 DEBUG [WALLETDB] Returning keypairs...
2021-12-07 16:09:56,478 INFO [CLIENT] Main Keypair: HB5D4vUS1EmH9ZxLeYWEFuU9MV1ig6P6BCg4uFhkiTun
2021-12-07 16:09:56,478 DEBUG [CLIENT] Creating GatewayClient
2021-12-07 16:09:56,481 DEBUG [CASHIERDB] Opened connection at path "/Users/lanyu/.config/darkfi/localdata/cashier_wallet.db"
2021-12-07 16:09:56,709 DEBUG [CASHIER DAEMON] Add sol network
2021-12-07 16:09:56,709 DEBUG [CASHIERDB] Get main keys
2021-12-07 16:09:56,930 DEBUG [zyd solana main_keypair:] 9HZSUimy5UVPTTgJ9bnS7c4xjiNdNkvPjMKtgzghsEqw
2021-12-07 16:09:56,930 INFO [SOL BRIDGE] Main SOL wallet pubkey: 9HZSUimy5UVPTTgJ9bnS7c4xjiNdNkvPjMKtgzghsEqw
2021-12-07 16:09:56,930 DEBUG [BRIDGE] Add new client
2021-12-07 16:09:56,930 DEBUG [CASHIER DAEMON] Add btc network
2021-12-07 16:09:56,930 DEBUG [CASHIERDB] Get main keys
2021-12-07 16:09:57,164 DEBUG [electrum_client::raw_client] new_ssl socket_addrs.domain():Some("electrum.blockstream.info") validate_domain:true timeout:None
2021-12-07 16:09:57,450 DEBUG [rustls::client::hs] No cached session for DNSNameRef("electrum.blockstream.info")
2021-12-07 16:09:57,451 DEBUG [rustls::client::hs] Not resuming any session
2021-12-07 16:09:57,452 DEBUG [electrum_client::raw_client] new_ssl socket_addrs.domain():Some("electrum.blockstream.info") validate_domain:true timeout:None
2021-12-07 16:09:57,754 DEBUG [rustls::client::hs] No cached session for DNSNameRef("electrum.blockstream.info")
2021-12-07 16:09:57,754 DEBUG [rustls::client::hs] Not resuming any session
2021-12-07 16:09:58,073 DEBUG [rustls::client::hs] Using ciphersuite TLS13_AES_256_GCM_SHA384
2021-12-07 16:09:58,074 DEBUG [rustls::client::tls13] Not resuming
2021-12-07 16:09:58,074 DEBUG [rustls::client::tls13] TLS1.3 encrypted extensions: []
2021-12-07 16:09:58,074 DEBUG [rustls::client::hs] ALPN protocol is None
2021-12-07 16:09:58,074 DEBUG [rustls::client::tls13] Server cert is [Certificate(b"0x82x0580x82x04 xa0x03x02x01x02x02x12x03vxa6!Oxedxc2x01x06?xd0xa5x10ex91=yx9d0rx06t*x86Hx86xf7rx01x01x0bx05021x0b0tx06x03Ux04x06x13x02US1x160x14x06x03Ux04nx13rLet's Encrypt1x0b0tx06x03Ux04x03x13x02R30x1ex17r211129133547Zx17r220227133546Z0$1"0 x06x03Ux04x03x13x19electrum.blockstream.info0x82x01"0rx06t*x86Hx86xf7rx01x01x01x05x03x82x01x0f0x82x01nx02x82x01x01xc8xd1xae<x03txa6xcc,@x84xa5xdc'xb62xf2x9fRxd8r[xc52xfdx13xc4,}x98t$xe1x14xdcxf7x85tlxea}Bxbc;fs()xf7Uxd3j5x0fOxbdx1cyx1ex10x05Ux93x04}c4>^x13xddxf5xebxc2xdcx17*w|xb2ixab|xf6x94x0cx92xa5x88xxafPxf1xc2x0fx8bx99xcexd0xb5r%xc7xb6xd8rcxa5%xc4hx07xefx13xcax0f#xacxdfx0cxc0xb2xaaxb2xf3x98xf2x95-R1xe2ZBj(rxe1Ix0fKx88!x19xbc^xa4wx17xe6qRxb2x84x96x19xc6x8c_x1fxc5x8b&9x16x94xd2xe12xxf803}Evx90YG;x93Oxf4^x92x99xf1x9fx19x11x1f@d$x7fxc6xa8xe8x9cOx18#Dxb6xeby<*7x03vxfdxbex16xbbxbbxcc/xe5x05xf6cx18x11-xa6_Hxb0bx8exc6xb2xcex15px96x9d0"xf3xe8V@gx89rxdexc0xe8nxeeIJx85x02x03x01x01xa3x82x02T0x82x02P0x0ex06x03Ux1dx0fx01x01xffx04x04x03x02x05xa00x1dx06x03Ux1d%x04x160x14x06x08+x06x01x05x05x07x03x01x06x08+x06x01x05x05x07x03x020x0cx06x03Ux1dx13x01x01xffx04x0200x1dx06x03Ux1dx0ex04x16x04x14x8bn3X<xaex8bxbfx9d"xe6xbexdfxdciy,x19S=0x1fx06x03Ux1d#x04x180x16x80x14x14.xb3x17xb7XVxcbxaePt@xe6x1fxafx9dx8bx14xc2xc60Ux06x08+x06x01x05x05x07x01x01x04I0G0!x06x08+x06x01x05x05x070x01x86x15http://r3.o.lencr.org0"x06x08+x06x01x05x05x070x02x86x16http://r3.i.lencr.org/0$x06x03Ux1dx11x04x1d0x1bx82x19electrum.blockstream.info0Lx06x03Ux1d x04E0C0x08x06x06gx81x0cx01x02x0107x06x0b+x06x01x04x01x82xdfx13x01x01x010(0&x06x08+x06x01x05x05x07x02x01x16x1ahttp://cps.letsencrypt.org0x82x01x04x06n+x06x01x04x01xd6yx02x04x02x04x81xf5x04x81xf2xf0vxdfxa5^xabhx82Ox1flxadxeexb8_N>Zxeaxcdxa2x12xa4j^x8e;x12xc0 D\*sx01}lx1fx91-x04x03G0Ex02 Txf5xd0x16x9ax0exc38}xb4xe0xecxebx11xc3x95x1ctxd0Hxe9x86x02Gx8e=xaaxd8xa3xebxd1Ax02!xf1x1cx80x9ahxd2'xc4Ex04x03xd1x0e/x95xcexa2x1ax9f`^*tx0fx0fx9cx97x9fx8exc1x92x16vFxa5Uxebuxfax91 0xb5xa2x89ixf4xf3}x11,AtxbexfdIxb8x85xabxf2xfcpxfemGx01}lx1fx91Ux04x03G0Ex02!x82|xe0xda=xefxa6@Dxe1uxaaxadx1fxb5Tx91txd9jxee1xe5x89lxa4ixb5xefx98vxeax02 $x8rx12Wxa2o,x95axc6Maxa7xffx1ex9fxedxe0x9exbdxxeaVYx12x11xecx1eHk0rx06t*x86Hx86xf7rx01x01x0bx05x03x82x01x01x91x9axbdxf4x15xacxa1/Rx0fE?x9ffxdfx05x1fx8ay;xd5<:x90x96xa2xb6NNx1cxb8ux82=x90xddx08Rx14xb5-xe5xefx08xe0/YxceCtKx8fx1airFxd4xe1x91x0f8xa3xbax04-5xefx07x9axa3>xd4xf6ccxaax08xf0Ux82xd9xefxa5x849xde;xdcCxc6x145x8bcxbcx14x80xf0xedxd2exe93xe8xe1xb8qxcfOxbcxbdx044|xb6>`xb8x1dxb29xeaxf1xfbx9bx02x88xd4xb9xe4H$[BWxa2xf4+]jxd7xebxad0]!xd2xe7x01rOx81+xcdxd7xf0xe8xc4uUYxfdxe0&WhGx03xa1)&xe7-xd5x16xa3@x8fx9e~x97xa1x10xb0!xa1x95xb8Rx17xc0xa5Ax01xd11xd9Tx16_xfbx1bax0bxb0x06Tx94Lxb3xefoxc1x9bx92ixc7Hxf1xa8xe2)x1aKxb5x87QxfdOxf9!Vc/x84x96xb5nr{x92x13xf2xdd{x80x1fxf4x10Nxf6xc9dyx1d|"), Certificate(b"0x82x05x160x82x02xfexa0x03x02x01x02x02x11x91+x08Jxcfx0cx18xa7Sxf6xd6.%xa7_Z0rx06t*x86Hx86xf7rx01x01x0bx050O1x0b0tx06x03Ux04x06x13x02US1)0'x06x03Ux04nx13 Internet Security Research Group1x150x13x06x03Ux04x03x13x0cISRG Root X10x1ex17r200904000000Zx17r250915160000Z021x0b0tx06x03Ux04x06x13x02US1x160x14x06x03Ux04nx13rLet's Encrypt1x0b0tx06x03Ux04x03x13x02R30x82x01"0rx06t*x86Hx86xf7rx01x01x01x05x03x82x01x0f0x82x01nx02x82x01x01xbbx02x15(xccxf6xa0x94xd3x0fx12xecx8dUx92xc3xf8x82xf1x99xa6zBx88xa7]&xaaxb5+xb9xc5Lxb1xafx8ekxf9uxc8xa3xd7x0fGx94x14U5Wx8cx9exa8xa29x19xf5x82<Bxa9Nnxf5;xc3.xdbx8dxc0xb0\xf3Y8xe7xedxcfixf0Zx0bx1bxbexc0x94$%x87xfa7qxb3x13xe7x1cxacxe1x9bxefxdbxe4;EREx96xa9xc1Sxce4xc8Rxeexb5xaexedx8fxde`pxe2xa5Txabxb6mx0ex97xa5@4k+xd3xbcfxebf4|xfakx8bx8fW)x99xf80x17]xbaroxfbx81xc5xadxd2x86X=x17xc7xe7txbbxf1+xf7x86xdcxc1xdaq]xd4Fxe3xccxad%xc1x88xbc`gufxb3xf1x18xf7xa2\xe6Sxff:x88xb6Gxa5xffx13x18xeax98tw?x9dSxf9xcfx01xe5xf5xa6px17x14xafcxa4xffx99xb3x93x9dxdcSxa7x06xfeHx85x1dxa1ixae%uxbbx13xccRx03xf5xedQxa1x8bxdbx15x02x03x01x01xa3x82x01x080x82x01x040x0ex06x03Ux1dx0fx01x01xffx04x04x03x02x01x860x1dx06x03Ux1d%x04x160x14x06x08+x06x01x05x05x07x03x02x06x08+x06x01x05x05x07x03x010x12x06x03Ux1dx13x01x01xffx04x080x06x01x01xffx02x010x1dx06x03Ux1dx0ex04x16x04x14x14.xb3x17xb7XVxcbxaePt@xe6x1fxafx9dx8bx14xc2xc60x1fx06x03Ux1d#x04x180x16x80x14yxb4Yxe6{xb6xe5xe4x01sx80x08x88xc8x1aXxf6xe9x9bn02x06x08+x06x01x05x05x07x01x01x04&0$0"x06x08+x06x01x05x05x070x02x86x16http://x1.i.lencr.org/0'x06x03Ux1dx1fx04 0x1e0x1cxa0x1axa0x18x86x16http://x1.c.lencr.org/0"x06x03Ux1d x04x1b0x190x08x06x06gx81x0cx01x02x010rx06x0b+x06x01x04x01x82xdfx13x01x01x010rx06t*x86Hx86xf7rx01x01x0bx05x03x82x02x01x85xcaNG>xa3xf7x85Dx85xbcxd5gxxb2x98cxaduMx1ex96=3erT-x81xa0xeaxc3xedxf8 xbf_xccxb7pxb7n;xf6^x94xdexe4 x9fxa6xefx8bxb2x03xe7xa2xb5x16<x91xcexb4xed9x02xe7|%x8aGxe6en?Fxf4xd9xf0xcex94+xeeTxcex12xbcx8c'Kxb8xc1x98/xa2xafxcdqx91Jx08xb7xc8xb8#{x04-x08xf9x08W>x83xd9x043nG!xtx82'xc3*xc8x9bxb9xce\xf2dxc8xc0xbeyxc0Ox8emDx0c^x92xbb.xf7x8bx10xe1xe8x1dD)xdbY xedcxb9!xf8x12&x94x93Wxa0x1dex04xc1n"xaex10rCx97xa1x18x1f~xe0xe0x867xb5Zxb1xbd0xbfx87n+*xff!Nx1bx05xc3xf5x18x97xf0^xacxc3xa5xb8jxf0.xbc;3xb9xeeKxdexccxfcxe4xafx84x0bx86?xc0UC6xf6hxe16x17jx8ex99xd1xffxa5@xa74xb7xc0xd0c959unxf2xbavxc8x93x02xe9xa9Klx17xcex0cx02xd9xbdx81xfbx9fxb7hxd4x06exb3x82=wSxf8x8eyx03xadn1x07u*Cxd8Ux97rxc4)x0exf7xc4]Nxc8xaeFx840xd7xf2x85_x18xa1yxbbxe7^px8bx07xe1x86x93xc3xb9x8fxdcaq%*xafxdfxed%PRhx8bx92xdcxe5xd6xb5xe3xda}xd0x87lx84!1xaex82xf5xfbxb9xabxc8x89x17=xe1Lxe58x0exf6xbd+xbdx96x81x14xebxd5xdb= xa7~Yxd3xe2xf8Xxf9[xb8Hxcdxfe\Ox16)xfex1eU#xafxc8x11xb0x8dxea|x93x90x17/xfdxacxa2tGF?xf0xe9xb0xb7xff(Mh2xd6g^x1eixa3x93xb8xf5x9dx8b/x0bxd2RCxa6o2WeM2x81xdf8Sx85]~]f)xeaxb8xddxe4x95xb5xcdxb5Vx12Bxcdxc4Nxc6%8DPmxecxceUx18xfexe9Idxd4Nxcax97x9cxb4[xc0sxa8xabxb8Gxc2"), Certificate(b"0x82x05`0x82x04Hxa0x03x02x01x02x02x10@x01w!7xd4xe9Bxb8xeevxaa<dnxb70rx06t*x86Hx86xf7rx01x01x0bx050?1$0"x06x03Ux04nx13x1bDigital Signature Trust Co.1x170x15x06x03Ux04x03x13x0eDST Root CA X30x1ex17r210120191403Zx17r240930181403Z0O1x0b0tx06x03Ux04x06x13x02US1)0'x06x03Ux04nx13 Internet Security Research Group1x150x13x06x03Ux04x03x13x0cISRG Root X10x82x02"0rx06t*x86Hx86xf7rx01x01x01x05x03x82x02x0f0x82x02nx02x82x02x01xadxe8$sxf4x147xf3x9bx9e+W(x1cx87xbexdcxb7xdf8x90x8cn<xe6Wxa0xxf7uxc2xa2xfexf5jnxf6O(xdbxdehx86lDx93xb6xb1cxfdx14x12kxbfx1fxd2xea1x9b!~xd13<xbaHxf5xddyxdfxb3xb8xffx12xf1!x9aKxc1x8ax86qiJfflx8f~<pxbfxad)"x06xf3xe4xc0xe6x80xaexe2Kx8fxb7x99~x94x03x9fxd3Gx97|x99H#Sxe88xaeOnox83.xd1IWx8cx80txb6xda/xd08x8d{x03p!x1buxf20<xfax8fxaexddxdacxabxebx16Oxc2x8ex11K~xcfx0bxe8xffxb5w.xf4xb2{Jxe0Lx12%x0cpx8dx03)xa0xe1S$xecx13xd9xeex19xbfx10xb3Jx8c?x89xa3aQxdexacx87x07x94xf4cqxec.xe2o[x98x81xe1x89\4ylvxef;x90byxe6xdbxa4x9a/&xc5xd0x10xe1x0exdexd9x10x8ex16xfbxb7xf7xa8xf7xc7xe5x02x07x98x8f6x08x95xe7xe27x96r6ux9exfbx0erxb1x1dx9bxbcx03xf9Ix05xd8x81xddx05xb4*xd6Axe9xacx01vx95nx0fxd8xdfxd5xbdx12x1f5/(x17lxd2x98xc1xa8tdwnG7xbaxcexacY^hx9dx7frxd6x89xc5x06A)>Y>xdd&xf5$xc9x11xa7Zxa3L@x1fFxa1x99xb5xa7:Qnx86;x9e}rxa7x12x05xYxed>Qxx15x0bx03x8fx8dxd0/x05xb2>{Jx1cKsx05x12xfcxc6xeaxe0Px13|Cx93txb3xcatxe7x8ex1fx01x08xd00xd4[q6xb4x07xbaxc100\Hxb7x82;x98xa6}`x8axa2xa3)x82xccxbaxbdx83x04x1bxa2x83x03Axa1xd6x05xf1x1bxc2xb6xf0xa8|x86;Fxa8H*x88xdcvx9avxbfx1fjxa5=x19x8fxeb8xf3dxdexc8+rn(xffxf7xdbxe2x15Bxd4"xd0']xe1yxfex18xe7px88xadNxe6xd9x8b:xc6xdd'Qnxffxbcdxf53COx02x03x01x01xa3x82x01F0x82x01B0x0fx06x03Ux1dx13x01x01xffx04x050x03x01x01xff0x0ex06x03Ux1dx0fx01x01xffx04x04x03x02x01x060Kx06x08+x06x01x05x05x07x01x01x04?0=0;x06x08+x06x01x05x05x070x02x86/http://apps.identrust.com/roots/dstrootcax3.p7c0x1fx06x03Ux1d#x04x180x16x80x14xc4xa7xb1xa4{,qxfaxdbxe1Kx90uxffxc4x15`x85x89x100Tx06x03Ux1d x04M0K0x08x06x06gx81x0cx01x02x010?x06x0b+x06x01x04x01x82xdfx13x01x01x01000.x06x08+x06x01x05x05x07x02x01x16"http://cps.root-x1.letsencrypt.org0<x06x03Ux1dx1fx0450301xa0/xa0-x86+http://crl.identrust.com/DSTROOTCAX3CRL.crl0x1dx06x03Ux1dx0ex04x16x04x14yxb4Yxe6{xb6xe5xe4x01sx80x08x88xc8x1aXxf6xe9x9bn0rx06t*x86Hx86xf7rx01x01x0bx05x03x82x01x01nslx96nxffx0eRxd0xaexddx8cxe7Zx06xad/xa8xe3x8fxbfxc9nx03x15Pxc2xe5lBxbbox9bxf4xb4Oxc2Dx88x08uxccxebx07x9bx14bnxxdexec'xba9\xf5xa2xa1nVx94px10Sxb1xbbxe4xafxd0xa2xc3+x01xd4x96xf4xc5 53xf9xd8a6xe0qx8dxb4xb8xb5xaax82Ex95xc0xf2xa9#(xe7xd6xa1xcbgx08xdaxa0C,xaax1bx93x1fxc9xdexf5xabi]x13xf5[x86X"xcaMUxe4pgmxc2Wxc5F9Axcfx8aXx83Xmx99xfeWxe86x0exf0x0e#xaaxfdx88x97xd0xe3\x0ex94Ixb5xb5x175xd2.xbfNx85xefx18xe0x85x92xebx06;l)#t`xdcEx02Lx12x18;xe9xfbx0exdexdcDxf8Xx98xaexeaxbdEExa1x88]fxcaxfex10xe9ox82xc8x11Brxfbxe9xecxe3x86xdex9dx10xe38xfaxa4}xb1xd8xe8Ix82x84x06x9b+xe8kOx01x0c8w.xf9xddxe79")]
2021-12-07 16:09:58,781 DEBUG [rustls::client::tls13] Ticket saved
2021-12-07 16:09:58,781 DEBUG [rustls::client::tls13] Ticket saved
2021-12-07 16:09:58,782 DEBUG [BRIDGE] Add new client
2021-12-07 16:09:58,786 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Connected To 127.0.0.1:3333
2021-12-07 16:09:58,786 DEBUG [GATEWAY CLIENT] Start Syncing
2021-12-07 16:09:58,786 DEBUG [SLABSTORE] Get last index
2021-12-07 16:09:58,786 DEBUG [GATEWAY CLIENT] Get last index
2021-12-07 16:09:58,786 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Sent Request { command: 2 }
2021-12-07 16:09:58,789 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Received Reply { error: false }
2021-12-07 16:09:58,789 DEBUG [GATEWAY CLIENT] End Syncing
2021-12-07 16:09:58,789 DEBUG [CLIENT] Start subscriber for cashier
2021-12-07 16:09:58,789 DEBUG [GATEWAY CLIENT] Start subscriber
2021-12-07 16:09:58,789 DEBUG [SUBSCRIBER API] GATEWAY CLIENT SERVICE : Connected To tcp://127.0.0.1:4444
2021-12-07 16:09:58,790 DEBUG [GATEWAY CLIENT] Start subscribe loop
2021-12-07 16:09:58,790 DEBUG [BRIDGE] Start listening to new notification
2021-12-07 16:09:58,790 DEBUG [RPC SERVER] Listening on tcp://127.0.0.1:9000
2021-12-07 16:15:21,187 DEBUG [RPC SERVER] Accepted connection
2021-12-07 16:15:21,187 DEBUG [RPC] --> {"jsonrpc":"2.0","method":"features","params":[],"id":3899465964}
2021-12-07 16:15:21,188 DEBUG [RPC] <-- {"jsonrpc":"2.0","result":{"hosts":{"dns_addr":"testnet.cashier.dark.fi","onion_addr":null,"tcp_port":9000,"tls_port":null},"networks":[{"solana":{"chain":"devnet"}},{"bitcoin":{"chain":"testnet"}},{"ethereum":{"chain":"ropsten"}}],"protocol_version":"1.0","public_key":"HB5D4vUS1EmH9ZxLeYWEFuU9MV1ig6P6BCg4uFhkiTun","server_version":"0.0.1"},"id":3899465964}
2021-12-07 16:15:21,188 DEBUG [RPC SERVER] Closed connection
2021-12-07 16:15:21,400 DEBUG [RPC SERVER] Accepted connection
2021-12-07 16:15:21,400 DEBUG [RPC] --> {"jsonrpc":"2.0","method":"deposit","params":["Solana","So11111111111111111111111111111111111111112","2w8kspfnEFXLBKc5cxxiSXk19w7sNC3LAuDbKfm5yjcw"],"id":3151434940}
2021-12-07 16:15:21,400 DEBUG [CASHIER DAEMON] RECEIVED DEPOSIT REQUEST
2021-12-07 16:15:21,401 DEBUG [CASHIERDB] Check for existing dkey
2021-12-07 16:15:21,610 DEBUG [BRIDGE] Start new subscription
2021-12-07 16:15:21,610 DEBUG [BRIDGE] Listen for new subscription
2021-12-07 16:15:21,618 DEBUG [reqwest::connect] starting new connection: https://api.devnet.solana.com/
2021-12-07 16:15:21,814 DEBUG [rustls::client::hs] No cached session for DNSNameRef("api.devnet.solana.com")
2021-12-07 16:15:21,814 DEBUG [rustls::client::hs] Not resuming any session
2021-12-07 16:15:21,898 DEBUG [rustls::client::hs] Using ciphersuite TLS13_CHACHA20_POLY1305_SHA256
2021-12-07 16:15:21,898 DEBUG [rustls::client::tls13] Not resuming
2021-12-07 16:15:21,899 DEBUG [rustls::client::tls13] TLS1.3 encrypted extensions: [ServerNameAck]
2021-12-07 16:15:21,899 DEBUG [rustls::client::hs] ALPN protocol is None
2021-12-07 16:15:21,986 DEBUG [rustls::client::tls13] Ticket saved
2021-12-07 16:15:21,986 DEBUG [rustls::client::tls13] Ticket saved
2021-12-07 16:15:22,076 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:15:22,177 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:15:22,266 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:15:22,268 DEBUG [SOL BRIDGE] handle_subscribe_request()
2021-12-07 16:15:22,268 DEBUG [SOL BRIDGE] Got subscribe request for native SOL
2021-12-07 16:15:22,268 DEBUG [SOL BRIDGE] Main wallet: 67mvvLxNH2VUT7vmNswgjYDQty9ZjgjTgPvwynU5h9UX
2021-12-07 16:15:22,269 DEBUG [reqwest::connect] starting new connection: https://api.devnet.solana.com/
2021-12-07 16:15:22,269 DEBUG [RPC] <-- {"jsonrpc":"2.0","result":"67mvvLxNH2VUT7vmNswgjYDQty9ZjgjTgPvwynU5h9UX","id":3151434940}
2021-12-07 16:15:22,270 DEBUG [RPC SERVER] Closed connection
2021-12-07 16:15:22,351 DEBUG [rustls::client::hs] No cached session for DNSNameRef("api.devnet.solana.com")
2021-12-07 16:15:22,351 DEBUG [rustls::client::hs] Not resuming any session
2021-12-07 16:15:22,432 DEBUG [rustls::client::hs] Using ciphersuite TLS13_CHACHA20_POLY1305_SHA256
2021-12-07 16:15:22,433 DEBUG [rustls::client::tls13] Not resuming
2021-12-07 16:15:22,433 DEBUG [rustls::client::tls13] TLS1.3 encrypted extensions: [ServerNameAck]
2021-12-07 16:15:22,433 DEBUG [rustls::client::hs] ALPN protocol is None
2021-12-07 16:15:22,516 DEBUG [rustls::client::tls13] Ticket saved
2021-12-07 16:15:22,516 DEBUG [rustls::client::tls13] Ticket saved
2021-12-07 16:15:22,595 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:15:22,677 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:15:23,196 DEBUG [tungstenite::handshake::client] Client handshake done.
2021-12-07 16:15:23,196 DEBUG [SOLANA RPC] --> {"jsonrpc":"2.0","method":"accountSubscribe","params":["67mvvLxNH2VUT7vmNswgjYDQty9ZjgjTgPvwynU5h9UX",{"commitment":"finalized","encoding":"jsonParsed"}],"id":3410193246}
2021-12-07 16:15:23,281 DEBUG [SOLANA RPC] <-- {"jsonrpc":"2.0","result":6503120,"id":3410193246}
2021-12-07 16:15:47,778 DEBUG [rustls::session] Sending warning alert CloseNotify
  • 3)启动darkfid
$ darkfid -c ~/.config/darkfi/darkfid.toml --cashier HB5D4vUS1EmH9ZxLeYWEFuU9MV1ig6P6BCg4uFhkiTun -v
2021-12-07 16:10:20,571 DEBUG [DARKFI DAEMON] Run 8 executor threads
2021-12-07 16:10:20,572 DEBUG [WALLETDB] new() Constructor called
2021-12-07 16:10:22,007 DEBUG [WALLETDB] Initialize...
2021-12-07 16:10:22,011 DEBUG [WALLETDB] OPENED CONNECTION AT PATH "/Users/lanyu/.config/darkfi/localdata/darkfid_wallet.db"
2021-12-07 16:10:22,225 DEBUG [WALLETDB] Returning keypairs...
2021-12-07 16:10:22,436 DEBUG [WALLETDB] Returning keypairs...
2021-12-07 16:10:22,647 INFO [CLIENT] Main Keypair: 2w8kspfnEFXLBKc5cxxiSXk19w7sNC3LAuDbKfm5yjcw
2021-12-07 16:10:22,647 DEBUG [CLIENT] Creating GatewayClient
2021-12-07 16:10:24,535 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Connected To 127.0.0.1:3333
2021-12-07 16:10:24,535 DEBUG [GATEWAY CLIENT] Start Syncing
2021-12-07 16:10:24,535 DEBUG [SLABSTORE] Get last index
2021-12-07 16:10:24,535 DEBUG [GATEWAY CLIENT] Get last index
2021-12-07 16:10:24,535 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Sent Request { command: 2 }
2021-12-07 16:10:24,535 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Received Reply { error: false }
2021-12-07 16:10:24,535 DEBUG [GATEWAY CLIENT] End Syncing
2021-12-07 16:10:24,535 DEBUG [CLIENT] Start subscriber
2021-12-07 16:10:24,535 DEBUG [GATEWAY CLIENT] Start subscriber
2021-12-07 16:10:24,536 DEBUG [SUBSCRIBER API] GATEWAY CLIENT SERVICE : Connected To tcp://127.0.0.1:4444
2021-12-07 16:10:24,536 DEBUG [GATEWAY CLIENT] Start subscribe loop
2021-12-07 16:10:24,536 DEBUG [RPC SERVER] Listening on tcp://127.0.0.1:8000
2021-12-07 16:15:20,970 DEBUG [RPC SERVER] Accepted connection
2021-12-07 16:15:20,971 DEBUG [RPC] --> {"jsonrpc":"2.0","method":"features","params":[],"id":1658827261}
2021-12-07 16:15:20,971 DEBUG [WALLETDB] Get own coins
2021-12-07 16:15:21,185 DEBUG [CLIENT STATE] Check if nullifier exists
2021-12-07 16:15:21,189 DEBUG [RPC] <-- {"jsonrpc":"2.0","result":{"hosts":{"dns_addr":"testnet.cashier.dark.fi","onion_addr":null,"tcp_port":9000,"tls_port":null},"networks":[{"solana":{"chain":"devnet"}},{"bitcoin":{"chain":"testnet"}},{"ethereum":{"chain":"ropsten"}}],"protocol_version":"1.0","public_key":"HB5D4vUS1EmH9ZxLeYWEFuU9MV1ig6P6BCg4uFhkiTun","server_version":"0.0.1"},"id":3899465964}
2021-12-07 16:15:21,189 DEBUG [RPC SERVER] Closed connection
2021-12-07 16:15:21,190 DEBUG [RPC SERVER] Accepted connection
2021-12-07 16:15:21,190 DEBUG [RPC] --> {"jsonrpc":"2.0","method":"deposit","params":["solana","sol"],"id":3216847280}
2021-12-07 16:15:21,190 DEBUG [WALLETDB] Get own coins
2021-12-07 16:15:21,399 DEBUG [CLIENT STATE] Check if nullifier exists
2021-12-07 16:15:22,269 DEBUG [RPC] <-- {"jsonrpc":"2.0","result":"67mvvLxNH2VUT7vmNswgjYDQty9ZjgjTgPvwynU5h9UX","id":3151434940}
2021-12-07 16:15:22,270 DEBUG [RPC SERVER] Closed connection
2021-12-07 16:17:34,800 DEBUG [RPC SERVER] Accepted connection
2021-12-07 16:17:34,800 DEBUG [RPC] --> {"jsonrpc":"2.0","method":"get_key","params":[],"id":2576784627}
2021-12-07 16:17:34,800 DEBUG [WALLETDB] Get own coins
2021-12-07 16:17:35,012 DEBUG [CLIENT STATE] Check if nullifier exists
2021-12-07 16:17:35,012 DEBUG [RPC] <-- {"jsonrpc":"2.0","result":"2w8kspfnEFXLBKc5cxxiSXk19w7sNC3LAuDbKfm5yjcw","id":2576784627}
2021-12-07 16:17:35,013 DEBUG [RPC SERVER] Closed connection
2021-12-07 16:18:31,191 DEBUG [RPC SERVER] Accepted connection
2021-12-07 16:18:31,191 DEBUG [RPC] --> {"jsonrpc":"2.0","method":"get_balances","params":[],"id":1224718016}
2021-12-07 16:18:31,191 DEBUG [WALLETDB] Get own coins
2021-12-07 16:18:31,403 DEBUG [CLIENT STATE] Check if nullifier exists
2021-12-07 16:18:31,404 DEBUG [WALLETDB] Get token and balances...
2021-12-07 16:18:31,614 DEBUG [RPC] <-- {"jsonrpc":"2.0","result":{"SOL":["1","Solana"]},"id":1224718016}
2021-12-07 16:18:31,614 DEBUG [RPC SERVER] Closed connection
  • 4)启动drk,进行转账等操作。
$ drk -c ~/.config/darkfi/drk.toml deposit sol --network solana
Deposit your coins to the following address: "67mvvLxNH2VUT7vmNswgjYDQty9ZjgjTgPvwynU5h9UX"
$ drk -c ~/.config/darkfi/drk.toml wallet --address
Wallet address: "2w8kspfnEFXLBKc5cxxiSXk19w7sNC3LAuDbKfm5yjcw"
$ drk -c ~/.config/darkfi/drk.toml wallet --balances
+-------+--------+---------+
| token | amount | network |
+-------+--------+---------+
| SOL
| 1
| Solana
|
+-------+--------+---------+

进行存款操作:

$ solana airdrop 1 67mvvLxNH2VUT7vmNswgjYDQty9ZjgjTgPvwynU5h9UX
Requesting airdrop of 1 SOL
Signature: 4uT5bgBCAMr9KaT4eR82riD6zt2pMY6HMHRyX76MnZsxYyxnowh4XP56d85CaG6VPHUp15iN4nk2PcSqMxb2VXiS
1 SOL
$ drk -c ~/.config/darkfi/drk.toml wallet --balances
+-------+--------+---------+
| token | amount | network |
+-------+--------+---------+
| SOL
| 2
| Solana
|
+-------+--------+---------+

相应的darkfid日志为:

2021-12-07 16:21:15,116 DEBUG [GATEWAY CLIENT] Received new slab
2021-12-07 16:21:15,116 DEBUG [SLABSTORE] Put slab
2021-12-07 16:21:15,116 DEBUG [SLABSTORE] Get last index
2021-12-07 16:21:15,116 DEBUG [CLIENT] Received new slab
2021-12-07 16:21:15,116 DEBUG [CLIENT] Build tx from slab and update the state
2021-12-07 16:21:15,121 DEBUG [STATE TRANSITION] iterate clear_inputs
2021-12-07 16:21:15,121 DEBUG [CLIENT STATE] Check if it is valid cashier public key
2021-12-07 16:21:15,121 DEBUG [STATE TRANSITION] iterate inputs
2021-12-07 16:21:15,121 DEBUG [STATE TRANSITION] Check the tx Verifies correctly
Verify: [7.579687ms]
2021-12-07 16:21:15,132 DEBUG [CLIENT STATE] Extend nullifiers
2021-12-07 16:21:15,132 DEBUG [CLIENT STATE] Update merkle tree and witness
2021-12-07 16:21:15,161 DEBUG [CLIENT STATE] Keep track of all merkle roots
2021-12-07 16:21:15,167 DEBUG [CLIENT STATE] Update witness
2021-12-07 16:21:15,417 DEBUG [WALLETDB] Updating witness
2021-12-07 16:21:15,634 DEBUG [CLIENT STATE] iterate over secret_keys to decrypt note
2021-12-07 16:21:15,634 DEBUG [WALLETDB] Put own coins
2021-12-07 16:21:15,845 DEBUG [CLIENT STATE] Received a coin: amount 100000000
2021-12-07 16:21:15,845 DEBUG [CLIENT STATE] Send a notification

相应的cashierd日志为:

2021-12-07 16:21:12,783 DEBUG [SOLANA RPC] Got WebSocket notification
2021-12-07 16:21:12,784 DEBUG [SOL BRIDGE] Removing subscription from list
2021-12-07 16:21:12,784 DEBUG [SOL BRIDGE] Received 1 SOL
2021-12-07 16:21:12,784 DEBUG [SOL BRIDGE] Sending 1 SOL to main wallet
2021-12-07 16:21:12,784 DEBUG [BRIDGE] End listening to new notification
2021-12-07 16:21:12,784 DEBUG [CASHIER DAEMON] Notification from birdge
2021-12-07 16:21:12,784 DEBUG [CLIENT] Start send 100000000
2021-12-07 16:21:12,784 DEBUG [CLIENT] Start build slab from tx
2021-12-07 16:21:12,785 DEBUG [reqwest::connect] starting new connection: https://api.devnet.solana.com/
2021-12-07 16:21:12,872 DEBUG [rustls::client::hs] Resuming session
2021-12-07 16:21:12,953 DEBUG [rustls::client::hs] Using ciphersuite TLS13_CHACHA20_POLY1305_SHA256
2021-12-07 16:21:12,954 DEBUG [rustls::client::tls13] Not resuming
2021-12-07 16:21:12,954 DEBUG [rustls::client::tls13] TLS1.3 encrypted extensions: [ServerNameAck]
2021-12-07 16:21:12,954 DEBUG [rustls::client::hs] ALPN protocol is None
2021-12-07 16:21:13,039 DEBUG [rustls::client::tls13] Ticket saved
2021-12-07 16:21:13,039 DEBUG [rustls::client::tls13] Ticket saved
2021-12-07 16:21:13,120 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:13,236 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:13,318 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:13,405 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:13,988 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:14,070 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:14,657 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:14,738 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
Prove: [2.310319916s]
2021-12-07 16:21:15,100 DEBUG [CLIENT] End build slab from tx
2021-12-07 16:21:15,100 DEBUG [STATE TRANSITION] iterate clear_inputs
2021-12-07 16:21:15,100 DEBUG [CLIENT STATE] Check if it is valid cashier public key
2021-12-07 16:21:15,100 DEBUG [STATE TRANSITION] iterate inputs
2021-12-07 16:21:15,100 DEBUG [STATE TRANSITION] Check the tx Verifies correctly
Verify: [11.096319ms]
2021-12-07 16:21:15,112 DEBUG [GATEWAY CLIENT] Put slab
2021-12-07 16:21:15,112 DEBUG [GATEWAY CLIENT] Start Syncing
2021-12-07 16:21:15,113 DEBUG [SLABSTORE] Get last index
2021-12-07 16:21:15,113 DEBUG [GATEWAY CLIENT] Get last index
2021-12-07 16:21:15,113 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Sent Request { command: 2 }
2021-12-07 16:21:15,113 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Received Reply { error: false }
2021-12-07 16:21:15,113 DEBUG [GATEWAY CLIENT] End Syncing
2021-12-07 16:21:15,113 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Sent Request { command: 0 }
2021-12-07 16:21:15,116 DEBUG [GATEWAY CLIENT] Received new slab
2021-12-07 16:21:15,116 DEBUG [SLABSTORE] Put slab
2021-12-07 16:21:15,116 DEBUG [SLABSTORE] Get last index
2021-12-07 16:21:15,116 DEBUG [CLIENT] Received new slab
2021-12-07 16:21:15,116 DEBUG [REQ PROTOCOL API] GATEWAY CLIENT SERVICE: Received Reply { error: false }
2021-12-07 16:21:15,116 DEBUG [CLIENT] End send 100000000
2021-12-07 16:21:15,116 DEBUG [BRIDGE] Start listening to new notification
2021-12-07 16:21:15,116 DEBUG [CASHIERDB] Get withdraw private keys
2021-12-07 16:21:15,327 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:15,333 DEBUG [CLIENT] Build tx from slab and update the state
2021-12-07 16:21:15,339 DEBUG [STATE TRANSITION] iterate clear_inputs
2021-12-07 16:21:15,339 DEBUG [CLIENT STATE] Check if it is valid cashier public key
2021-12-07 16:21:15,339 DEBUG [STATE TRANSITION] iterate inputs
2021-12-07 16:21:15,339 DEBUG [STATE TRANSITION] Check the tx Verifies correctly
Verify: [37.790808ms]
2021-12-07 16:21:15,380 DEBUG [CLIENT STATE] Extend nullifiers
2021-12-07 16:21:15,380 DEBUG [CLIENT STATE] Update merkle tree and witness
2021-12-07 16:21:15,409 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:15,413 DEBUG [CLIENT STATE] Keep track of all merkle roots
2021-12-07 16:21:15,419 DEBUG [CLIENT STATE] Update witness
2021-12-07 16:21:15,633 DEBUG [WALLETDB] Updating witness
2021-12-07 16:21:15,633 DEBUG [CLIENT STATE] iterate over secret_keys to decrypt note
2021-12-07 16:21:15,995 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:16,077 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:16,660 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:16,742 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:17,325 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:17,416 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:18,026 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:18,137 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:18,726 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:18,808 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:19,396 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:19,478 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:20,077 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:20,199 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:20,787 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:20,869 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:21,453 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:21,536 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:22,127 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:22,217 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:22,801 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:22,912 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:23,499 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:23,582 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:24,170 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:24,255 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:24,839 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:24,922 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:25,507 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:25,590 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:26,175 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:26,257 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:26,841 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:26,924 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:27,514 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:27,595 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:28,183 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:28,265 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:28,858 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:28,940 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:29,527 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:29,610 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:30,205 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:30,287 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:30,874 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:30,956 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:31,540 DEBUG [reqwest::async_impl::client] response '200 OK' for https://api.devnet.solana.com/
2021-12-07 16:21:31,540 DEBUG [SOL BRIDGE] Sent 1 SOL to main wallet: 2wVQHHAJVBDBxH5qf2XPd89FYCzPXu8EEqWuS6Gx3RqyQBDL46DBakRASpgDnEDGD7vSRWEdYTYaWc2xWY4CFzgi

相应的gatewayd日志为:

2021-12-07 16:21:15,113 DEBUG [GATEWAY DAEMON] Received getlastindex msg
2021-12-07 16:21:15,113 DEBUG [SLABSTORE] Get last index as bytes
2021-12-07 16:21:15,113 DEBUG [GATEWAY DAEMON] Received putslab msg
2021-12-07 16:21:15,113 DEBUG [SLABSTORE] Put slab
2021-12-07 16:21:15,113 DEBUG [SLABSTORE] Get last index

以下操作存在错误:

$ drk -c ~/.config/darkfi/drk.toml transfer sol 2w8kspfnEFXLBKc5cxxiSXk19w7sNC3LAuDbKfm5yjcw 0.2 --network solana
Error: JsonRpcError(""Client failed: `Verify error: Invalid merkle root for input 0`"")
$ drk -c ~/.config/darkfi/drk.toml transfer sol 9GmLk7kkbxhsbLTYFMeg6FyuQJV9Na2GcJYFNrs3VLkv 0.2 --network solana
Error: JsonRpcError(""Client failed: `Verify error: Invalid merkle root for input 0`"")
$ drk -c ~/.config/darkfi/drk.toml wallet --balances+-------+--------+---------+
| token | amount | network |
+-------+--------+---------+
| SOL
| 2
| Solana
|
+-------+--------+---------+
$ drk -c ~/.config/darkfi/drk.toml withdraw sol G8qEyo81TTmVZ7vWagzBoLk98kBjqmgxc2xq7KyhkzYc 0.3 --network solana
Error: JsonRpcError(""Client failed: `Verify error: Invalid merkle root for input 0`"")

最后

以上就是漂亮镜子为你收集整理的DarkFi代码解析1. 引言的全部内容,希望文章能够帮你解决DarkFi代码解析1. 引言所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部