Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent payment amounts reported by yaXapi and yagna #43

Closed
tworec opened this issue Jan 27, 2021 · 0 comments
Closed

inconsistent payment amounts reported by yaXapi and yagna #43

tworec opened this issue Jan 27, 2021 · 0 comments
Assignees
Labels

Comments

@tworec
Copy link

tworec commented Jan 27, 2021

I've requested a blender example three times (two via yapapi and one via yajsapi).
Here's the requestor account https://rinkeby.zkscan.io/explorer/accounts/0x874d6a0f8c2359511ff1adc68453e8f22129186e

Pls look into blender-yapapi.log from second yapapi run. It contains invoice amounted for 0.05836067028861111 tGLM paid to 0xd95ed5e242b69faf4a535d9f1f978a739df37913 @ 2021-01-27 17:02:30, which has transaction amounted for GNT 0.00888890363...

Here is Provider (0xd95ed5e242b69faf4a535d9f1f978a739df37913) payment.db (renamed to .txt because GH refuses .db).
And here is Requestor (0x874d6a0f8c2359511ff1adc68453e8f22129186e) payment.db.

[2021-01-27 17:02:30,053 DEBUG ya_payment.rest] response body: b'{"invoiceId":"b52a8aed-b5ed-4bcd-bd4e-a5e9989cdafd","issuerId":"0xd95ed5e242b69faf4a535d9f1f978a739df37913","recipientId":"0x874d6a0f8c2359511ff1adc68453e8f22129186e","payeeAddr":"0xd95ed5e242b69faf4a535d9f1f978a739df37913","payerAddr":"0x874d6a0f8c2359511ff1adc68453e8f22129186e","paymentPlatform":"zksync-rinkeby-tglm","timestamp":"2021-01-27T16:02:29.050Z","agreementId":"16b82dd777a99aaf139f5f2a4d194d6175f827f5839f3e4abf4b7fa0a3c62eae","activityIds":["83b562b1b4e142e6af63dad5e19f1d21"],"amount":"0.05836067028861111","paymentDueDate":"2021-01-27T16:02:29.036870215Z","status":"RECEIVED"}'
[2021-01-27 17:02:30,054 DEBUG ya_payment.rest] request: {'method': 'POST', 'url': 'http://127.0.0.1:7465/payment-api/v1/invoices/b52a8aed-b5ed-4bcd-bd4e-a5e9989cdafd/accept', 'timeout': 300, 'headers': {'Accept': 'application/json', 'Content-Type': 'application/json', 'authorization': 'Bearer 4a3a3dcda41e4451a64748ea500b9f65', 'User-Agent': 'OpenAPI-Generator//python'}, 'data': '{"totalAmountAccepted": "0.05836067028861111", "allocationId": "8a716e80-1b9d-421d-959b-3c4524e0fed9"}'}
[2021-01-27 17:02:30,054 DEBUG yapapi.events] InvoiceReceived(agr_id='16b82dd777a99aaf139f5f2a4d194d6175f827f5839f3e4abf4b7fa0a3c62eae', inv_id='b52a8aed-b5ed-4bcd-bd4e-a5e9989cdafd', amount='0.05836067028861111')
[2021-01-27 17:02:30,145 DEBUG ya_payment.rest] response body: b'null'
[2021-01-27 17:02:30,146 DEBUG yapapi.rest.payment] Received invoice event: {'event_date': datetime.datetime(2021, 1, 27, 16, 2, 29, 150000, tzinfo=tzutc()),
 'invoice_id': '69a72936-add1-407b-978e-da893c0f0de3'}, type: <class 'yapapi.rest.configuration._InvoiceReceivedEventWithDate'>
[2021-01-27 17:02:30,146 DEBUG ya_payment.rest] request: {'method': 'GET', 'url': 'http://127.0.0.1:7465/payment-api/v1/invoices/69a72936-add1-407b-978e-da893c0f0de3', 'timeout': 300, 'headers': {'Accept': 'application/json', 'authorization': 'Bearer 4a3a3dcda41e4451a64748ea500b9f65', 'User-Agent': 'OpenAPI-Generator//python', 'Content-Type': 'application/json'}}
[2021-01-27 17:02:30,146 DEBUG yapapi.events] PaymentAccepted(agr_id='16b82dd777a99aaf139f5f2a4d194d6175f827f5839f3e4abf4b7fa0a3c62eae', inv_id='b52a8aed-b5ed-4bcd-bd4e-a5e9989cdafd', amount='0.05836067028861111')

Logs from example runs

yapapi #1

dan:~/yapapi/examples/blender b0.5 (ab1bd99)$ yagna app-key create 2rec
4a3a3dcda41e4451a64748ea500b9f65
dan:~/yapapi/examples/blender b0.5 (ab1bd99)$ YAGNA_APPKEY=$(yagna app-key list --json | jq -r .values[0][1]) python blender.py --subnet-tag 2rec-ederenn
[2021-01-27 16:56:34,348 INFO yapapi.executor] Using log file `blender-yapapi.log`; in case of errors look for additional information there
yapapi version: 0.5.0a1
Using subnet: 2rec-ederenn, payment driver: zksync, and network: rinkeby
[2021-01-27 16:56:35,961 INFO yapapi.summary] Received proposals from 1 providers so far
[2021-01-27 16:56:36,007 INFO yapapi.summary] Received proposals from 2 providers so far
[2021-01-27 16:56:37,760 INFO yapapi.summary] Agreement proposed to provider 'friendly-error'
[2021-01-27 16:56:37,934 INFO yapapi.summary] Agreement confirmed by provider 'friendly-error'
[2021-01-27 16:56:38,951 INFO yapapi.summary] Task sent to provider 'friendly-error', task data: 0
[2021-01-27 16:56:39,944 INFO yapapi.summary] Agreement proposed to provider '2rec-v0.6a3@awokado'
[2021-01-27 16:56:40,070 INFO yapapi.summary] Agreement confirmed by provider '2rec-v0.6a3@awokado'
[2021-01-27 16:56:41,084 INFO yapapi.summary] Task sent to provider '2rec-v0.6a3@awokado', task data: 10
[2021-01-27 16:58:34,821 INFO yapapi.summary] Task computed by provider '2rec-v0.6a3@awokado', task data: 10
Task computed: Task(id=2, data=10), result: output_10.png, time: 0:01:53.831760
[2021-01-27 16:58:34,915 INFO yapapi.summary] Task sent to provider '2rec-v0.6a3@awokado', task data: 20
[2021-01-27 16:58:37,513 INFO yapapi.summary] Task computed by provider 'friendly-error', task data: 0
Task computed: Task(id=1, data=0), result: output_0.png, time: 0:01:58.659973
[2021-01-27 16:58:37,557 INFO yapapi.summary] Task computed by provider '2rec-v0.6a3@awokado', task data: 20
Task computed: Task(id=3, data=20), result: output_20.png, time: 0:00:02.735782
[2021-01-27 16:58:37,646 INFO yapapi.summary] Task sent to provider 'friendly-error', task data: 30
[2021-01-27 16:58:37,691 INFO yapapi.summary] Task sent to provider '2rec-v0.6a3@awokado', task data: 40
[2021-01-27 16:58:40,356 INFO yapapi.summary] Task computed by provider '2rec-v0.6a3@awokado', task data: 40
Task computed: Task(id=5, data=40), result: output_40.png, time: 0:00:02.799093
[2021-01-27 16:58:40,462 INFO yapapi.summary] Task sent to provider '2rec-v0.6a3@awokado', task data: 50
[2021-01-27 16:58:40,898 INFO yapapi.summary] Task computed by provider 'friendly-error', task data: 30
Task computed: Task(id=4, data=30), result: output_30.png, time: 0:00:03.385126
[2021-01-27 16:58:43,249 INFO yapapi.summary] Task computed by provider '2rec-v0.6a3@awokado', task data: 50
Task computed: Task(id=6, data=50), result: output_50.png, time: 0:00:02.893267
[2021-01-27 16:58:43,253 INFO yapapi.summary] Computation finished in 127.9s
[2021-01-27 16:58:43,254 INFO yapapi.summary] Negotiated 2 agreements with 2 providers
[2021-01-27 16:58:43,254 INFO yapapi.summary] Provider '2rec-v0.6a3@awokado' computed 4 tasks
[2021-01-27 16:58:43,254 INFO yapapi.summary] Provider 'friendly-error' computed 2 tasks
[2021-01-27 16:58:47,829 INFO yapapi.summary] Total cost: 0.19912471709361113
[2021-01-27 16:58:47,830 INFO yapapi.summary] Executor shut down, total time: 132.5s

yapapi #2

dan:~/yapapi/examples/blender b0.5 (ab1bd99)$ YAGNA_APPKEY=$(yagna app-key list --json | jq -r .values[0][1]) python blender.py --subnet-tag 2rec-ederenn
[2021-01-27 17:01:59,989 INFO yapapi.executor] Using log file `blender-yapapi.log`; in case of errors look for additional information there
yapapi version: 0.5.0a1
Using subnet: 2rec-ederenn, payment driver: zksync, and network: rinkeby
[2021-01-27 17:02:01,124 INFO yapapi.summary] Received proposals from 1 providers so far
[2021-01-27 17:02:01,168 INFO yapapi.summary] Received proposals from 2 providers so far
[2021-01-27 17:02:02,908 INFO yapapi.summary] Agreement proposed to provider 'friendly-error'
[2021-01-27 17:02:03,076 INFO yapapi.summary] Agreement confirmed by provider 'friendly-error'
[2021-01-27 17:02:04,099 INFO yapapi.summary] Task sent to provider 'friendly-error', task data: 0
[2021-01-27 17:02:05,087 INFO yapapi.summary] Agreement proposed to provider '2rec-v0.6a3@awokado'
[2021-01-27 17:02:05,219 INFO yapapi.summary] Agreement confirmed by provider '2rec-v0.6a3@awokado'
[2021-01-27 17:02:06,196 INFO yapapi.summary] Task sent to provider '2rec-v0.6a3@awokado', task data: 10
[2021-01-27 17:02:12,091 INFO yapapi.summary] Task computed by provider 'friendly-error', task data: 0
Task computed: Task(id=1, data=0), result: output_0.png, time: 0:00:08.089881
[2021-01-27 17:02:12,189 INFO yapapi.summary] Task sent to provider 'friendly-error', task data: 20
[2021-01-27 17:02:12,825 INFO yapapi.summary] Task computed by provider '2rec-v0.6a3@awokado', task data: 10
Task computed: Task(id=2, data=10), result: output_10.png, time: 0:00:06.727637
[2021-01-27 17:02:12,927 INFO yapapi.summary] Task sent to provider '2rec-v0.6a3@awokado', task data: 30
[2021-01-27 17:02:15,464 INFO yapapi.summary] Task computed by provider 'friendly-error', task data: 20
Task computed: Task(id=3, data=20), result: output_20.png, time: 0:00:03.373779
[2021-01-27 17:02:15,556 INFO yapapi.summary] Task sent to provider 'friendly-error', task data: 40
[2021-01-27 17:02:15,648 INFO yapapi.summary] Task computed by provider '2rec-v0.6a3@awokado', task data: 30
Task computed: Task(id=4, data=30), result: output_30.png, time: 0:00:02.822308
[2021-01-27 17:02:15,837 INFO yapapi.summary] Task sent to provider '2rec-v0.6a3@awokado', task data: 50
[2021-01-27 17:02:18,544 INFO yapapi.summary] Task computed by provider '2rec-v0.6a3@awokado', task data: 50
Task computed: Task(id=6, data=50), result: output_50.png, time: 0:00:02.897004
[2021-01-27 17:02:18,902 INFO yapapi.summary] Task computed by provider 'friendly-error', task data: 40
Task computed: Task(id=5, data=40), result: output_40.png, time: 0:00:03.437631
[2021-01-27 17:02:18,904 INFO yapapi.summary] Computation finished in 18.2s
[2021-01-27 17:02:18,904 INFO yapapi.summary] Negotiated 2 agreements with 2 providers
[2021-01-27 17:02:18,904 INFO yapapi.summary] Provider 'friendly-error' computed 3 tasks
[2021-01-27 17:02:18,904 INFO yapapi.summary] Provider '2rec-v0.6a3@awokado' computed 3 tasks
[2021-01-27 17:02:30,249 INFO yapapi.summary] Total cost: 0.10196467530555556
[2021-01-27 17:02:30,249 INFO yapapi.summary] Executor shut down, total time: 29.5s

Debug logs for this
blender-yapapi.log

yajsapi #2

dan:~/yajsapi/examples b0.3 (753e903)$ YAGNA_APPKEY=$(yagna app-key list --json | jq -r .values[0][1]) yarn js:blender -d --subnet-tag 2rec-ederenn
yarn run v1.22.10
$ node ./blender/blender.js -d --subnet-tag 2rec-ederenn
Using subnet: 2rec-ederenn
2021-01-27 17:09:49 [yajsapi] debug: Using image repository: _girepo._tcp.dev.golem.network -> http://yacn.dev.golem.network:8000.
2021-01-27 17:09:49 [yajsapi] debug: Creating allocation using payment platform zksync-rinkeby-tglm
2021-01-27 17:09:50 [yajsapi] info: GFTP Version:0.6.0-rc2 (635fac0e 2021-01-26 build #104)
2021-01-27 17:09:50 [yajsapi] debug: Scoring offer R-862c2ff4462377a6ed136f52aa8051ee0d831f3666c52615675a2611aa2c0869, parameters: [object Object]
2021-01-27 17:09:50 [yajsapi] debug: Scored offer R-862c2ff4462377a6ed136f52aa8051ee0d831f3666c52615675a2611aa2c0869, provider: 2rec-v0.6a3@awokado, strategy: LeastExpensiveLinearPayuMS, score: 90.09009009009009
2021-01-27 17:09:50 [yajsapi] debug: Scoring offer R-12958195626b2528a8259d9c0cde91bf3ade5acfd92c6a67f659e24948d3ec72, parameters: [object Object]
2021-01-27 17:09:50 [yajsapi] debug: Scored offer R-12958195626b2528a8259d9c0cde91bf3ade5acfd92c6a67f659e24948d3ec72, provider: friendly-error, strategy: LeastExpensiveLinearPayuMS, score: 90.09009009009009
2021-01-27 17:09:50 [yajsapi] debug: Scoring offer R-11639ad5b49fde8f958f616fa7f801bbb15208e22176f62bed2a81b235c51e0d, parameters: [object Object]
2021-01-27 17:09:50 [yajsapi] debug: Scored offer R-11639ad5b49fde8f958f616fa7f801bbb15208e22176f62bed2a81b235c51e0d, provider: 2rec-v0.6a3@awokado, strategy: LeastExpensiveLinearPayuMS, score: 90.09009009009009
2021-01-27 17:09:50 [yajsapi] debug: Scoring offer R-31e9641928830e74df2c82ca31749421df22b4a24e06e21292ff41b9603ea38b, parameters: [object Object]
2021-01-27 17:09:50 [yajsapi] debug: Scored offer R-31e9641928830e74df2c82ca31749421df22b4a24e06e21292ff41b9603ea38b, provider: friendly-error, strategy: LeastExpensiveLinearPayuMS, score: 90.09009009009009
2021-01-27 17:09:51 [yajsapi] info: Demand published on the market
2021-01-27 17:09:51 [yajsapi] info: Received proposals from 1 providers so far
2021-01-27 17:09:51 [yajsapi] info: Received proposals from 2 providers so far
2021-01-27 17:09:53 [yajsapi] info: Agreement proposed to provider '2rec-v0.6a3@awokado'
2021-01-27 17:09:53 [yajsapi] info: Agreement confirmed by provider '2rec-v0.6a3@awokado'
2021-01-27 17:09:53 [yajsapi] info: Task sent to provider '2rec-v0.6a3@awokado', task data: 50
┌─────────┬───────────────────────┬────────────────┬────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost        │
├─────────┼───────────────────────┼────────────────┼────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       0        │ '0 (no invoices?)' │
└─────────┴───────────────────────┴────────────────┴────────────────────┘
2021-01-27 17:09:55 [yajsapi] info: Agreement proposed to provider 'friendly-error'
2021-01-27 17:09:55 [yajsapi] info: Agreement confirmed by provider 'friendly-error'
2021-01-27 17:09:57 [yajsapi] info: Task sent to provider 'friendly-error', task data: 40
┌─────────┬───────────────────────┬────────────────┬────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost        │
├─────────┼───────────────────────┼────────────────┼────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       0        │ '0 (no invoices?)' │
│    1    │   'friendly-error'    │       0        │ '0 (no invoices?)' │
└─────────┴───────────────────────┴────────────────┴────────────────────┘
2021-01-27 17:10:01 [yajsapi] info: Task computed by provider '2rec-v0.6a3@awokado', task data: 50
2021-01-27 17:10:01 [yajsapi] debug: Prepared payment for agreement c49a265836549f2f3
2021-01-27 17:10:01 [yajsapi] debug: Queued payment for agreement c49a265836549f2f3
2021-01-27 17:10:01 [yajsapi] info: Task sent to provider '2rec-v0.6a3@awokado', task data: 30
┌─────────┬───────────────────────┬────────────────┬────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost        │
├─────────┼───────────────────────┼────────────────┼────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       1        │ '0 (no invoices?)' │
│    1    │   'friendly-error'    │       0        │ '0 (no invoices?)' │
└─────────┴───────────────────────┴────────────────┴────────────────────┘
result= output_50.png
result= output_30.png
result= output_40.png
2021-01-27 17:10:05 [yajsapi] info: Task computed by provider '2rec-v0.6a3@awokado', task data: 30
2021-01-27 17:10:05 [yajsapi] debug: Prepared payment for agreement c49a265836549f2f3
2021-01-27 17:10:05 [yajsapi] debug: Queued payment for agreement c49a265836549f2f3
2021-01-27 17:10:05 [yajsapi] info: Task sent to provider '2rec-v0.6a3@awokado', task data: 20
┌─────────┬───────────────────────┬────────────────┬────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost        │
├─────────┼───────────────────────┼────────────────┼────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       2        │ '0 (no invoices?)' │
│    1    │   'friendly-error'    │       0        │ '0 (no invoices?)' │
└─────────┴───────────────────────┴────────────────┴────────────────────┘
2021-01-27 17:10:05 [yajsapi] info: Task computed by provider 'friendly-error', task data: 40
2021-01-27 17:10:05 [yajsapi] debug: Prepared payment for agreement b36f995becf3cbd18
2021-01-27 17:10:05 [yajsapi] debug: Queued payment for agreement b36f995becf3cbd18
2021-01-27 17:10:05 [yajsapi] info: Task sent to provider 'friendly-error', task data: 10
┌─────────┬───────────────────────┬────────────────┬────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost        │
├─────────┼───────────────────────┼────────────────┼────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       2        │ '0 (no invoices?)' │
│    1    │   'friendly-error'    │       1        │ '0 (no invoices?)' │
└─────────┴───────────────────────┴────────────────┴────────────────────┘
2021-01-27 17:10:07 [yajsapi] info: Task computed by provider '2rec-v0.6a3@awokado', task data: 20
2021-01-27 17:10:07 [yajsapi] debug: Prepared payment for agreement c49a265836549f2f3
2021-01-27 17:10:07 [yajsapi] debug: Queued payment for agreement c49a265836549f2f3
2021-01-27 17:10:07 [yajsapi] info: Task sent to provider '2rec-v0.6a3@awokado', task data: 0
┌─────────┬───────────────────────┬────────────────┬────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost        │
├─────────┼───────────────────────┼────────────────┼────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       3        │ '0 (no invoices?)' │
│    1    │   'friendly-error'    │       1        │ '0 (no invoices?)' │
└─────────┴───────────────────────┴────────────────┴────────────────────┘
result= output_20.png
result= output_10.png
2021-01-27 17:10:09 [yajsapi] info: Task computed by provider 'friendly-error', task data: 10
2021-01-27 17:10:09 [yajsapi] debug: Prepared payment for agreement b36f995becf3cbd18
2021-01-27 17:10:09 [yajsapi] debug: Queued payment for agreement b36f995becf3cbd18
2021-01-27 17:10:10 [yajsapi] info: worker-1: no more frames to render
2021-01-27 17:10:10 [yajsapi] info: worker-0: no more frames to render
result= output_0.png
2021-01-27 17:10:11 [yajsapi] debug: terminateAgreement(b36f995becf3cbd18d719a3784fbd414bf03c5a7554242e941eb349a9d0414e8) returned successfully
2021-01-27 17:10:11 [yajsapi] debug: Scoring offer R-301cb82e9c55ea41d09f8c65c11430c3a6cdef8a5ff46df2d9c9f3a59ed584f1, parameters: [object Object]
2021-01-27 17:10:11 [yajsapi] debug: Scored offer R-301cb82e9c55ea41d09f8c65c11430c3a6cdef8a5ff46df2d9c9f3a59ed584f1, provider: friendly-error, strategy: LeastExpensiveLinearPayuMS, score: 90.09009009009009
2021-01-27 17:10:11 [yajsapi] debug: terminateAgreement(c49a265836549f2f303967acba8a953468453b312a79248b093e8f4128d4b9ec) returned successfully
2021-01-27 17:10:11 [yajsapi] debug: Received invoice event: {"invoiceId":"8d2782e2-cc74-43ee-88ff-532ce5e10367","eventDate":"2021-01-27T16:10:11.246Z","eventType":"InvoiceReceivedEvent"}, type: {}
2021-01-27 17:10:11 [yajsapi] info: Task computed by provider '2rec-v0.6a3@awokado', task data: 0
2021-01-27 17:10:11 [yajsapi] debug: Prepared payment for agreement c49a265836549f2f3
2021-01-27 17:10:11 [yajsapi] debug: Queued payment for agreement c49a265836549f2f3
2021-01-27 17:10:11 [yajsapi] debug: Prepared payment for agreement b36f995becf3cbd18
2021-01-27 17:10:11 [yajsapi] debug: Queued payment for agreement b36f995becf3cbd18
2021-01-27 17:10:11 [yajsapi] debug: Prepared payment for agreement c49a265836549f2f3
2021-01-27 17:10:11 [yajsapi] debug: Queued payment for agreement c49a265836549f2f3
2021-01-27 17:10:11 [yajsapi] info: Computation finished in 20.0s
2021-01-27 17:10:11 [yajsapi] info: Negotiated 2 agreements with 2 providers
2021-01-27 17:10:11 [yajsapi] info: Provider '2rec-v0.6a3@awokado' computed 4 tasks
2021-01-27 17:10:11 [yajsapi] info: Provider 'friendly-error' computed 2 tasks
┌─────────┬───────────────────────┬────────────────┬────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost        │
├─────────┼───────────────────────┼────────────────┼────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       4        │ '0 (no invoices?)' │
│    1    │   'friendly-error'    │       2        │ '0 (no invoices?)' │
└─────────┴───────────────────────┴────────────────┴────────────────────┘
2021-01-27 17:10:11 [yajsapi] debug: Received an invoice from friendly-error. Amount: 0.03221546358222222; (so far: 0.03221546358222222 from this provider).
┌─────────┬───────────────────────┬────────────────┬─────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost         │
├─────────┼───────────────────────┼────────────────┼─────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       4        │ '0 (no invoices?)'  │
│    1    │   'friendly-error'    │       2        │ 0.03221546358222222 │
└─────────┴───────────────────────┴────────────────┴─────────────────────┘
2021-01-27 17:10:11 [yajsapi] debug: Received invoice event: {"invoiceId":"cc4dbab5-ce5f-4e7f-8f07-02c008a23ccf","eventDate":"2021-01-27T16:10:11.247Z","eventType":"InvoiceReceivedEvent"}, type: {}
2021-01-27 17:10:13 [yajsapi] info: Accepted payment: 0.03221546358222222 for invoice 8d2782e2-cc74-43e
2021-01-27 17:10:13 [yajsapi] debug: Received an invoice from 2rec-v0.6a3@awokado. Amount: 0.07446391462138889; (so far: 0.07446391462138889 from this provider).
┌─────────┬───────────────────────┬────────────────┬─────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost         │
├─────────┼───────────────────────┼────────────────┼─────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       4        │ 0.07446391462138889 │
│    1    │   'friendly-error'    │       2        │ 0.03221546358222222 │
└─────────┴───────────────────────┴────────────────┴─────────────────────┘
2021-01-27 17:10:13 [yajsapi] info: Accepted payment: 0.07446391462138889 for invoice cc4dbab5-ce5f-4e7
┌─────────┬───────────────────────┬────────────────┬─────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost         │
├─────────┼───────────────────────┼────────────────┼─────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       4        │ 0.07446391462138889 │
│    1    │   'friendly-error'    │       2        │ 0.03221546358222222 │
└─────────┴───────────────────────┴────────────────┴─────────────────────┘
┌─────────┬───────────────────────┬────────────────┬─────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost         │
├─────────┼───────────────────────┼────────────────┼─────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       4        │ 0.07446391462138889 │
│    1    │   'friendly-error'    │       2        │ 0.03221546358222222 │
└─────────┴───────────────────────┴────────────────┴─────────────────────┘
2021-01-27 17:10:31 [yajsapi] info: Finished waiting for payments. Summary:
┌─────────┬───────────────────────┬────────────────┬─────────────────────┐
│ (index) │     Provider Name     │ Tasks Computed │        Cost         │
├─────────┼───────────────────────┼────────────────┼─────────────────────┤
│    0    │ '2rec-v0.6a3@awokado' │       4        │ 0.07446391462138889 │
│    1    │   'friendly-error'    │       2        │ 0.03221546358222222 │
└─────────┴───────────────────────┴────────────────┴─────────────────────┘
2021-01-27 17:10:31 [yajsapi] info: Total Cost: 0.10667937820361112
2021-01-27 17:10:32 [yajsapi] debug: GFTP server closed, code=null
✨  Done in 45.31s.

awokado:~$ yagna payment status
┌────────────────────┬──────────────────────┬────────────┬─────────────┬────────────────────────────┬────────────┐
│  platform          │  total amount        │  reserved  │  amount     │  incoming                  │  outgoing  │
├────────────────────┼──────────────────────┼────────────┼─────────────┼────────────────────────────┼────────────┤
│  driver: zksync    │  0.12140864314 tGLM  │  0 tGLM    │  accepted   │  0.25030663228861110 tGLM  │  0 tGLM    │
│  network: rinkeby  │                      │            │  confirmed  │  0.12140864311722220 tGLM  │  0 tGLM    │
│  token: tGLM       │                      │            │  requested  │  0.25030663228861110 tGLM  │  0 tGLM    │
└────────────────────┴──────────────────────┴────────────┴─────────────┴────────────────────────────┴────────────┘
awokado:~$ yagna payment status --json
{
  "amount": "0.12140864314",
  "driver": "zksync",
  "incoming": {
    "accepted": {
      "agreementsCount": 3,
      "totalAmount": "0.25030663228861110"
    },
    "confirmed": {
      "agreementsCount": 3,
      "totalAmount": "0.12140864311722220"
    },
    "requested": {
      "agreementsCount": 3,
      "totalAmount": "0.25030663228861110"
    }
  },
  "network": "rinkeby",
  "outgoing": {
    "accepted": {
      "agreementsCount": 0,
      "totalAmount": "0"
    },
    "confirmed": {
      "agreementsCount": 0,
      "totalAmount": "0"
    },
    "requested": {
      "agreementsCount": 0,
      "totalAmount": "0"
    }
  },
  "reserved": "0",
  "token": "tGLM"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants