quantadex / distributed_quanta_bridge Goto Github PK
View Code? Open in Web Editor NEWThe distributed version of the quanta bridge
The distributed version of the quanta bridge
For example this transaction:
https://live.blockcypher.com/btc-testnet/address/2Mvq9KJKPwV6cYi3Qc86ftxTHnbbGUtAqRW/
it happenned on 8f607281006738c3afdea065ffefe03d77a1b0922b360680a050f3f7d1af65cc
system shows: 58a52bc745280c9067c699fe3eebc10d1a659bd1226dad63885f7e6560d36804_1
Reduce costs of 3 test nodes to 1 test node.
Run ---
3x crosschain_eth, crosschain, crosschain_btc, crosschain_bch, crosschain_ltc
Share 1 set of
ltc, btc, bch
Introduce a variable in the config where we can restart the service to stop all withdrawal, but still enable deposits, and manual pending.
mode string
auto - current system where all withdrawals are automatically sent
manual - new status for withdrawal where we can manually audit and flag for consensus
I have implemented the new address generation. Read the code first.
Some edge cases you may notice:
Let's devise stress test that mimic live production environment to make sure it works properly.
There has been a number of incidents where deposits and withdrawals were delayed.... often due to : configuration, versioning issues, out of disk, code error (like SQL insert), and so forth.
How can we build features within /api/status returning
200 - OK
503 - Service Unavailable
504 - Service Degraded
What should we track?
What does it mean to be in degraded?
What does it mean to be unavailable?
type BlockchainStatus {
CurrentBlock int
TimeSinceLastBlock int // sec
DegradedThreshold int //
FailureThreshold int //
TotalAddresses int
AddressesCreated24H int
State: Normal | Degraded | Failure
}
type DepositStatus {
ConsensusRetries: N,
DegradedThreshold: N,
FailureThreshold: N
}
type WithdrawalStatus {
ConsensusRetries: N,
DegradedThreshold: N,
FailureThreshold: N
}
/api/status
{
"BuildTime": "",
"GitHash": "",
"ListenIP": "192.168.137.186",
"PublicKey": "QA6nkaBAz1vV6cb25vSHXJqHos1AeADzqRAXPvtASXMAhM3SbRFA",
"Version": "1.0",
"BTC": {
},
"BCH": {
}
"Deposit: {
}
"Withdrawal": {
},
TotalDegraded: N,
TotalFailures: N
}
Returns 504 code when in Degraded state, totalDegraded > 0
Returns 503 code when in Failure state, totalFailure > 0
Return 200 when both are 0
steps to reproduce:
result: crosschain table in node 1 is updated but not in node2
expect: both tables to update the value.
Notes: The addressconsensus is responsible for validating, and "persisting" on the database when this is agreed. not sure where is going wrong.
We should have assertion on these table changes to make sure this is working properly.
Run 3 nodes
Submit Transaction
Stop one node
Submit Transaction
Restart the node
2018/11/30 12:17:46 I [5000] Start new round 0x5018c9cedfcfbeb0ce71f65ab361d205bad3a179533320f7468cbd55bc078d7c ETH to=QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV amount=700000
Propose TX: ETH QDFLBGRMXEDTLI2LBYQTF7ZX4LPGOWIBN2UDQOZW6VH47LNEX5MEXBST 0.0700000 QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV
2018/11/30 12:17:47 I [cosi] Start new round leader=true nodes=3 threshold=3
2018/11/30 12:17:47 I [cosi] Got commitment 2/3
2018/11/30 12:17:47 I [cosi] Got commitment 3/3
2018/11/30 12:17:47 I [cosi] Got total of 3 commitments, moving forward
2018/11/30 12:17:47 I [5000] Sign msg wGGc8QAAAECWCuxCB7TutpkmUGqfKUA0ib4MH7g27vf+PADbamAEeM0G6ePVNn01DNZReto9dF/D0D5HP0FdzeEv7fqDHoYD
2018/11/30 12:17:47 I [cosi] Got signature 2/3
2018/11/30 12:17:47 I [cosi] Got signature 3/3
2018/11/30 12:17:47 I [5000] Great! Cosi successfully signed deposit
2018/11/30 12:17:47 E [5000] processSubmissions pending=1
2018/11/30 12:17:47 I [5000] Submit TX: 0x5018c9cedfcfbeb0ce71f65ab361d205bad3a179533320f7468cbd55bc078d7c signed=true AAAAAMqwmiy5BzWjSw4hMv834t5nWQFuqDg7NvVPz62kv1hLAAAAZAAPDxkAAAAuAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAQ2ngI+8T11/xdvUwln/vdfFmE79ZOmNe+f6ukF88UUYAAAABRVRIAAAAAADKsJosuQc1o0sOITL/N+LeZ1kBbqg4Ozb1T8+tpL9YSwAAAAAACq5gAAAAAAAAAAPAYZzxAAAAQJYK7EIHtO62mSZQap8pQDSJvgwfuDbu9/48ANtqYAR4zQbp49U2fTUM1lF62j10X8PQPkc/QV3N4S/t+oMehgOnC6puAAAAQCuERUFYwLFiVCTtyIJgTQ5lxcKkUQ9OogmGC+nI4ArnNGHhl1FuKcbVDWcSiQRj3gJZ8A0YmIVJ9JNHPKWMEQkWQn5KAAAAQHpU/EZxxuSt++Syi5IB3dNHs0t3N+FOVQhGSqTL57lhTPiIF2VxsvMRqpnHd9j/4NWhzGM51pn6ALAUwnzSQAk=
2018/11/30 12:17:48 D [5000] Coin2Quanta: No new block last=8226 top=8226
2018/11/30 12:17:48 I [5000] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
2018/11/30 12:17:48 I [5000] QuantaToCoin refunds []
2018/11/30 12:17:48 I [5000] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 12:17:50 I [5000] Successful tx submission 90bc6ce85b31eedcb6a96c9263cf31ac6655a5e8f45efa45753121230526a087,remove %!s(int=0)
Stopping Node1 (Leader node, Registry Node)
Node2 Log
2018/11/30 12:18:16 I [5001] Block 8228 Got deposits 1 [0xc0004c93b0]
2018/11/30 12:18:16 I [5001] set last block coin=ETH height=8228
2018/11/30 12:18:16 I [5001] QuantaToCoin refunds []
2018/11/30 12:18:16 I [5001] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 12:18:19 D [5001] Coin2Quanta: No new block last=8228 top=8228
2018/11/30 12:18:19 I [5001] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
2018/11/30 12:18:19 I [5001] QuantaToCoin refunds []
2018/11/30 12:18:19 I [5001] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 12:18:22 D [5001] Coin2Quanta: No new block last=8228 top=8228
Node3 Log
2018/11/30 12:18:16 I [5002] Block 8228 Got deposits 1 [0xc0003dbc00]
2018/11/30 12:18:16 I [5002] set last block coin=ETH height=8228
2018/11/30 12:18:16 I [5002] QuantaToCoin refunds []
2018/11/30 12:18:16 I [5002] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 12:18:19 D [5002] Coin2Quanta: No new block last=8228 top=8228
2018/11/30 12:18:19 I [5002] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
2018/11/30 12:18:19 I [5002] QuantaToCoin refunds []
2018/11/30 12:18:19 I [5002] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 12:18:22 D [5002] Coin2Quanta: No new block last=8228 top=8228
Restarted Node1
2018/11/30 12:18:51 I [registrar] Server will be started at :5100...
postgres://postgres:@localhost/crosschain_1
2018/11/30 12:18:51 I [5000] Initialize ledger
2018/11/30 12:18:51 I [registrar] Node 0.0.0.0:5000 added to registry
2018/11/30 12:18:51 I [5000] REST API started at :0...```
We need to check the # of confirmations before we issue assets. It must meet 3 general requirements:
https://testnet.litecore.io/block/1d098a4dfc4f45aa6b637394add9551c0ea6ac5c6c8a43a196cc515208ff4de6
https://www.blockchain.com/btc/orphaned-blocks
Introduce configurations: EthereumMinConfirm, BtcMinConfirm, LtcMinConfirm
State transitions:
-->[Pending]-->[Wait_for_Confirm]---->[Consensus]--->[Success]
Pending state is optional, and supported by BTC. Other chains go straight to wait for confirm
At wait_for_confirm, record blockhash for all ETH, LTC, and BTC
Every update API now needs to pass in 3 piece of unique information, Type, TX, BlockHash
At the begin of the block update:
BTC, LTC, BCH
find_and_confirms:
For all wait_for_confirm tx's
Lookup blocks with getBlock(blockhash)
confirm = top_block - block_number
if block_number == = -1
mark tx as "orphan"
else if confirms > min_block_confirm (configure for each blockchain)
mark tx as "consensus"
else
println("tx has x ", confirms)
func FindAndConfirm(tx db.Transaction, data GetBlockVerboseResult):
Lookup blocks with getBlock(blockhash)
confirm = top_block - block_number
if block_number == = -1
mark tx as "orphan"
else if confirms > min_block_confirm (configure for each blockchain)
mark tx as "consensus"
else
println("tx has x ", confirms)
func FindAllAndConfirm():
for tx in all confirm:
data = getBlock(tx.blockHash)
FindAndConfirm(tx, data)
ETH
For all wait_for_confirm tx's
latest <- Lookup blocks with getTransaction(txhash)
Get all tx for <deposit,txhash>
for all txs found in db:
if tx.blockhash == latest.blockhash
confirm = top_block - latest.block_number
if confirms > min_block_confirm (configure for each blockchain)
mark tx as "consensus"
else
println("tx has x ", confirms)
else:
// blockhash changed on the transaction, this one is now an orphan
println("blockhash is different for this tx=tx, it is now an orphan)
mark tx as "orphan"
truffle console --network mainnet
truffle(mainnet)> web3.eth.getTransaction(tx,(err,msg) => console.log(err,msg))
Deploying testnet will provide us a safe environment to perform integration testing with the existing setup and help us prepare for mainnet deployment
docker push quantalabs/litecoin-core:latest
A node was discovered to be in a stale broken state.
crosschain1_1 | 2019/04/01 20:31:15 E [cosi] Unable to validate transactions: %!(EXTRA string=connection is shut down)
crosschain1_1 | 2019/04/01 20:31:16 E [5000] Failed to get current top block
crosschain1_1 | 2019/04/01 20:31:19 E [5000] Failed to get current top block
crosschain1_1 | 2019/04/01 20:31:22 E [5000] Failed to get current top block
crosschain1_1 | 2019/04/01 20:31:22 I [cosi] Initialize cosi state.
crosschain1_1 | 2019/04/01 20:31:22 E [5000] Unable to decode quanta tx
crosschain1_1 | 2019/04/01 20:31:22 E [cosi] Unable to validate transactions: %!(EXTRA string=connection is shut down)
crosschain1_1 | 2019/04/01 20:31:25 E [5000] Failed to get current top block
crosschain1_1 | 2019/04/01 20:31:28 E [5000] Failed to get current top block
crosschain1_1 | 2019/04/01 20:31:29 I [cosi] Initialize cosi state.
crosschain1_1 | 2019/04/01 20:31:29 E [5000] Unable to decode quanta tx
crosschain1_1 | 2019/04/01 20:31:29 E [cosi] Unable to validate transactions: %!(EXTRA string=connection is shut down)
How can we prevent this? And we should think about how to monitor this.
2019/03/08 01:19:24 E [5000] Failed to get current top block
2019/03/08 01:19:27 E [5000] Failed to get current top block
2019/03/08 01:19:30 E [5000] Failed to get current top block
2019/03/08 01:19:32 E [5000] connection is shut down
2019/03/08 01:19:32 I [5000] Start new round 58a52bc745280c9067c699fe3eebc10d1a659bd1226dad63885f7e6560d36804_1 BTC to=quanta amount=1000 type =0
2019/03/08 01:19:32 E [5000] Failed to encode refund 1connection is shut down
2019/03/08 01:19:32 E [5000] failed to create asset, error = connection is shut down
2019/03/08 01:19:33 E [5000] Failed to get current top block
2019/03/08 01:19:36 E [5000] Failed to get current top block
2019/03/08 01:19:39 E [5000] Failed to get current top block
2019/03/08 01:19:42 E [5000] Failed to get current top block
2019/03/08 01:19:45 E [5000] Failed to get current top block
Thinking we should have confirmation with blocks.. the user would see, so it's clearer what's going on.
wait_for_confirm 1/4
wait_for_confirm 2/4
wait_for_confirm 3/4
success
You're going to need to filter wait_for_confirm as a prefix, similar to
https://dba.stackexchange.com/questions/149630/sql-find-records-that-are-prefixes-of-my-string
root@crosschain1:containers # docker-compose logs -f --tail 100 crosschain1
Attaching to containers_crosschain1_1
crosschain1_1 | 2019/04/20 00:16:35 I [registrar] Server will be started at :5100...
crosschain1_1 | Log level not parsed
crosschain1_1 | postgres://postgres:Welcome123@db/crosschain_1
crosschain1_1 | 2019/04/20 00:16:48 I [5000] Initialize ledger
crosschain1_1 | panic: -28: Rescanning...
crosschain1_1 |
crosschain1_1 | goroutine 1 [running]:
crosschain1_1 | main.initNode(0x1389, 0xc42051f4c0, 0xc, 0x1388, 0x1, 0xc42051f520, 0xd, 0xc420096fc0, 0x2e, 0xc420594810, ...)
crosschain1_1 | /opt/bitnami/apps/jenkins/jenkins_home/workspace/distributed_quanta_bridge/src/github.com/quantadex/distributed_quanta_bridge/node/trust_node.go:225 +0x1695
crosschain1_1 | main.bootstrapNode(0x1389, 0xc42051f4c0, 0xc, 0x1388, 0x1, 0xc42051f520, 0xd, 0xc420096fc0, 0x2e, 0xc420594810, ...)
crosschain1_1 | /opt/bitnami/apps/jenkins/jenkins_home/workspace/distributed_quanta_bridge/src/github.com/quantadex/distributed_quanta_bridge/node/trust_node.go:470 +0xbb
crosschain1_1 | main.main()
crosschain1_1 | /opt/bitnami/apps/jenkins/jenkins_home/workspace/distributed_quanta_bridge/src/github.com/quantadex/distributed_quanta_bridge/node/main.go:68 +0x522
containers_crosschain1_1 exited with code 2
add smart contract test
Once transaction has been submitted, we need to track block # it was submitted to.
On deposit, record the block number on QUANTA
on Withdrawal, record the block number on external blockchain
Add 1 more column called SubmitTxHash to store, the ethereum tx hash for withdrawal, and the "blocknum_tx" for the deposit.
crosschain1_1 | 2019/04/16 01:41:42 I [5000] Trying to reconnect to Quanta
crosschain1_1 | 2019/04/16 01:41:42 E [5000] websocket.Dial ws://mainnet-api.quantachain.io:8090: dial tcp 34.218.12.133:8090: connect: connection refused
crosschain1_1 | 2019/04/16 01:41:47 I [5000] Trying to reconnect to Quanta
crosschain1_1 | 2019/04/16 01:41:47 E [5000] websocket.Dial ws://mainnet-api.quantachain.io:8090: dial tcp 34.218.12.133:8090: connect: connection refused
crosschain1_1 | 2019/04/16 01:41:53 I [5000] Trying to reconnect to Quanta
crosschain1_1 | 2019/04/16 01:41:53 E [5000] websocket.Dial ws://mainnet-api.quantachain.io:8090: dial tcp 34.218.12.133:8090: connect: connection refused
crosschain1_1 | 2019/04/16 01:41:58 I [5000] Trying to reconnect to Quanta
crosschain1_1 | 2019/04/16 01:41:58 E [5000] websocket.Dial ws://mainnet-api.quantachain.io:8090: dial tcp 34.218.12.133:8090: connect: connection refused
crosschain1_1 | panic: runtime error: invalid memory address or nil pointer dereference
crosschain1_1 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xa10c6b]
crosschain1_1 |
crosschain1_1 | goroutine 1 [running]:
crosschain1_1 | github.com/quantadex/distributed_quanta_bridge/trust/quanta.(*QuantaGraphene).Reconnect.func1(0x8, 0xb6d801, 0xeed5c0, 0xc42043d500)
crosschain1_1 | /opt/bitnami/apps/jenkins/jenkins_home/workspace/distributed_quanta_bridge/src/github.com/quantadex/distributed_quanta_bridge/trust/quanta/quanta_graphene.go:76 +0xdb
crosschain1_1 | github.com/quantadex/distributed_quanta_bridge/vendor/gopkg.in/matryer/try%2ev1.Do(0xc420a91bf8, 0xc420c34b00, 0xc420358be0)
crosschain1_1 | /opt/bitnami/apps/jenkins/jenkins_home/workspace/distributed_quanta_bridge/src/github.com/quantadex/distributed_quanta_bridge/vendor/gopkg.in/matryer/try.v1/try.go:20 +0x39
crosschain1_1 | github.com/quantadex/distributed_quanta_bridge/trust/quanta.(*QuantaGraphene).Reconnect(0xc4202e5260)
crosschain1_1 | /opt/bitnami/apps/jenkins/jenkins_home/workspace/distributed_quanta_bridge/src/github.com/quantadex/distributed_quanta_bridge/trust/quanta/quanta_graphene.go:68 +0x41
I deposited 0.10 ETH in this TX below without enough gas,
https://ropsten.etherscan.io/tx/0xccb72f7ac948741dcac3ae28d492fbce72934850cda12aed429f60da83622772
Currently we don't check user's address.. This is not good because users can spam for accounts that don't exist, flooding our database.
Check the quanta address against Quanta graphene client.
You may introduce a flag to turn it off for stress testing so you can use any account you want.
Most users don't have metamask so they can't create an ethereum address, let's make it easier for them. This is the stats showing them click on disabled button.
Retain the old functionality of forwarding contract which is more secure, while supporting this new feature.
Using Bip32, we can generate many public private key pairs using a single secret using derivation path.
GenerateBip32Key(bip32secret, index)
cc6841e
Let's use the user's account ID 1.2.X (X = accountID) as the index.
We will generate this and add the public key to the generated address.
On receiving of the funds, we detect whether the address is smart contract by looking for an code.
https://ethereum.stackexchange.com/questions/28521/how-to-detect-if-an-address-is-a-contract
Then flush all the coins to the trust contract.
To flush from account, we have to look at the account balance, transfer the funds, signed with the key that we generated. The amount + fee should be precisely equal to the balance.
This is the javascript/webjs equivalent:
const privateKey = ""
const gas = web3.toWei("1", "gwei")
web3.eth.getBalance(acc, (err, balance) => {
console.log("balance", balance)
const amount = balance - gas
var raw = {
"from": acc,
"to": mainAcc,
"value": web3.toHex(amount),
"gas": web3.toHex(gas),
"chainId": 1
};
web3.eth.accounts.signTransaction(raw, (e,x)=>{}).then(signed=>{
console.log(raw, signed)
callback()
})
});
Use GenerateMultisig interface to generate the address
Use FlushCoin(forwarder string, address string) error to flush the coins (and detecting smart contract or not)
We need to let users know when the deposit has come in because it is an asynchronous behavior. Letting them know in timing manner, they can take action like trading, and build trust with the user.
We'll design it as a [ Source ] -->[Process]-> [Sink] model so it decouples with the crosschain itself.
http://faculty.babson.edu/dewire/Readings/dfddiag.htm
https://en.wikipedia.org/wiki/Webhook
https://robinhood.engineering/thorn-easy-webhooks-for-python-82a78e170bdb
https://stripe.com/docs/webhooks
https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_post
The source in this case is the rest api to get the history. /api/history
The process is the code that that tracks whether it needs to send the notifications.
The sink is the location where the data is being sent to. Email is the primary sink, but we need to support push notification as well if the user uses the app. Telegram might be a good alternative way the user as well.
call rest api at last_cursor
loop through data {
check if deposit/withdrawal was previously sent
if not sent {
send to each sink.
catch error properly so that this loop this not break.
throw exception if it's fatal such as connection failure to the sinks api.
mark the tx as sent. (type, tx, blockhash)
}
}
The application is stateless. States information such as cursor & history data must be stored in a remote database. We can use dynamodb or postgres for this purpose.
https://stripe.com/docs/webhooks/best-practices#events-and-retries
Refer to SES email credentials
Refer to Android push notification API.
Requires a push registration API.
This is to be run every 5 minutes as a job. Make this flexible so that it can be deployed on Lambda scheduled services.
Definitions:
RequestMsg {
url string
events []eventType
}
ResponseMsg {
id string
url string
events []eventType
links []linkDescription
}
eventType {
name string
description string
}
linkDescription {
href string
rel string
method string
}
events - Deposit.Pending
- Deposit.Wait_For_Confirmation
- Deposit.Confirmed
- Deposit.Failed
- Withdrawal.Added_To_Queue
- Withdrawal.In_Consensus
- Withdrawal.Submitted
- Withdrawal.Failed
- Withdrawal.Confirmed
webhooks {
id string
url string
events []eventType
links []linkDescription
}
Placeholder to consider designs to batch multiple withdrawals. Currently each bitcoin withdrawal waits for a block, which potentially backing up 1000's of blocks.
Deploying testnet will provide us a safe environment to perform integration testing with the existing setup and help us prepare for mainnet deployment
Bitcoin transaction can take a long time to process and we should let the user know that it's pending.
let's merge a pending record in the /api/history call by getting the Bitcoin pending tx from the listunspent with zero confirm and max zero confirm.
See skeleton code.
crosschain_ltc_1 | 2019/04/28 05:43:47 I [5000] Coin2Quanta: Got blocks [1622178]
crosschain_ltc_1 | events = [{"Tx":"42c328e8b7868bc211114bc5ecb65ce1dbd17454a6c02ef0f1ea0a5f7a4fbcf6","Type":0,"CoinName":"LTC","SenderAddr":"MBR7SYc1QCCm2X3KzUwmyMqR7UFaUQnm2x","QuantaAddr":"airdropuser-179760","Amount":71232200,"BlockID":1622178,"Signatures":null,"BlockHash":"7aa08ce741d54434b7fca03150d10981c712559bf367b488b9eefc6613f3216a"}]
crosschain_ltc_1 | events = [{"Tx":"42c328e8b7868bc211114bc5ecb65ce1dbd17454a6c02ef0f1ea0a5f7a4fbcf6","Type":0,"CoinName":"LTC","SenderAddr":"MBR7SYc1QCCm2X3KzUwmyMqR7UFaUQnm2x","QuantaAddr":"airdropuser-179760","Amount":71232,"BlockID":1622178,"Signatures":null,"BlockHash":"7aa08ce741d54434b7fca03150d10981c712559bf367b488b9eefc6613f3216a"}]
crosschain_ltc_1 | 2019/04/28 05:43:47 I [5000] Block 1622178 Got deposits 1 [0xc42048af80]
litecoind
crosschain_ltc_1 | 2019/04/28 05:18:34 I [5000] Coin2Quanta: Got blocks [1622168]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:18:55 I [5000] Coin2Quanta: Got blocks [1622169]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:19:34 I [5000] Coin2Quanta: Got blocks [1622170]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:20:07 I [5000] Coin2Quanta: Got blocks [1622171]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:21:16 I [5000] Coin2Quanta: Got blocks [1622172]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:24:02 I [5000] Coin2Quanta: Got blocks [1622173]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:24:35 I [5000] Coin2Quanta: Got blocks [1622174]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:27:59 I [5000] Coin2Quanta: Got blocks [1622175]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:32:32 I [5000] Coin2Quanta: Got blocks [1622176]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:39:50 I [5000] Coin2Quanta: Got blocks [1622177]
crosschain_ltc_1 | events = []
crosschain_ltc_1 | 2019/04/28 05:43:47 I [5000] Coin2Quanta: Got blocks [1622178]
other 2 nodes kept going just fine, and moved into consensus
in the configuration, we add a blacklist such as
Blacklist:
- airdropuser-60450
which is converted into the a list.
If a user withdraw from this account, we just error it out as "fatal".
Currently crosschain history appears to show history in different order on 3 nodes...
Perhaps sorting by created_date will keep in same order
2 addition commands on node that will exit as soon as it is executed , similar to "encrypt"
Currently some nodes was unable to generate the btc addresses that other nodes generated, while I can
./node sync_addresses btc
(works for BCH, and LTC as well)
This commands will loop through the crosschain addresses table for BTC, and call the
GenerateMultisig, which imports the addresses in.
Lower costs by sending remain to crosschain + reduce issues.
Send remain amount to “crosschain” address, which is generated by our CreateMultisigAddress.
Rebuilt the latest
dep ensure -update
cd node
go build
Steps to reproduce:
Result: First tx got funded, second failed
2018/11/28 14:46:47 I [5000] Submit TX: 0x32d25ff2df171f12d23c7d28c15a8de49ce89a70963777fcff1a888fcf9d65c4 signed=true AAAAAGn98QIq3omDyMTyKiSQstDq6j0Z6iBcyeADy7AzYzjJAAAAZAAPCxsAAAAHAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAtPLXJrAzpl8vQeC3aWnpevyKsW/74pC1OszLAbBW5OkAAAABRVRIAAAAAABp/fECKt6Jg8jE8iokkLLQ6uo9GeogXMngA8uwM2M4yQAAAAAADI2zAAAAAAAAAAOspXiTAAAAQIH7OYtlseFXmUbejzgXATD1r/UiHicKbXeCMukGZaqJIxFtIp2As5vVqnE5Teh1LUpE3n0ZsYaLvF0gEwVkYQI+haVNAAAAQIgdmAeo02+lgW2PGQxbnns53VPltqvGCQdb2cj0sx9iV73UCZdIW0X7YcWWAzlesxmlrwPqksJ0QaraPfduHAeCMai/AAAAQBeBVcH0o0UcUzPjpKldmJQvb48tmjDwJcka+tzJPiexWU8pk0WKX2/CxSpayt6dHvcBJcTJZEzAA7B/cDpzago=
2018/11/28 14:46:49 I [5000] Successful tx submission c0a878da60fa7c84aa8df24333a81c03bb542cbe557c49ed0d7f3413e0a5772b,remove %!s(int=0)
2018/11/28 14:46:49 I [5000] Submit TX: 0xa29f71f9d54e9e63c04495a8ac1c28b48ffd0756119ff4a76398d5d4290ff1a4 signed=true AAAAAGn98QIq3omDyMTyKiSQstDq6j0Z6iBcyeADy7AzYzjJAAAAZAAPCxsAAAAHAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAtPLXJrAzpl8vQeC3aWnpevyKsW/74pC1OszLAbBW5OkAAAABRVRIAAAAAABp/fECKt6Jg8jE8iokkLLQ6uo9GeogXMngA8uwM2M4yQAAAAAAvE15AAAAAAAAAAOspXiTAAAAQL+NdN9+mwaWHvEkdtZxdGwXbxC5FxZjJzEs+0GzvjuWX0ZpK6wra4fiMqNR5n3MyFJSjGIHVFeFQnOGfCfNkwqCMai/AAAAQNKtYdKvyIYYxPMj7Q3YFBOZNeHH26HOrg7yHWTZNNQ1zZHMBjq9poJzGsWAu8Onc3K0TOBC6O/IygfZwMb/hgE+haVNAAAAQBX2qn5/SP5IX9sWNtmrXmqswmFQYU/ZLHT1H+qRRvK/EslVXH1Vj/OD/Qi/VDEuHXUkB5vOM9XXFbbnoh+QRwI=
2018/11/28 14:46:49 E [5000] could not submit transaction Horizon error: "Transaction Failed". Check horizon.Error.Problem for more information.The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details. Descriptions of each code can be found at: https://www.stellar.org/developers/learn/concepts/list-of-operations.html
2018/11/28 14:46:49 E [5000] Op codes [] Tx codes
2018/11/28 14:46:50 I [5000] Submit TX: 0xa29f71f9d54e9e63c04495a8ac1c28b48ffd0756119ff4a76398d5d4290ff1a4 signed=true AAAAAGn98QIq3omDyMTyKiSQstDq6j0Z6iBcyeADy7AzYzjJAAAAZAAPCxsAAAAHAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAtPLXJrAzpl8vQeC3aWnpevyKsW/74pC1OszLAbBW5OkAAAABRVRIAAAAAABp/fECKt6Jg8jE8iokkLLQ6uo9GeogXMngA8uwM2M4yQAAAAAAvE15AAAAAAAAAAOspXiTAAAAQL+NdN9+mwaWHvEkdtZxdGwXbxC5FxZjJzEs+0GzvjuWX0ZpK6wra4fiMqNR5n3MyFJSjGIHVFeFQnOGfCfNkwqCMai/AAAAQNKtYdKvyIYYxPMj7Q3YFBOZNeHH26HOrg7yHWTZNNQ1zZHMBjq9poJzGsWAu8Onc3K0TOBC6O/IygfZwMb/hgE+haVNAAAAQBX2qn5/SP5IX9sWNtmrXmqswmFQYU/ZLHT1H+qRRvK/EslVXH1Vj/OD/Qi/VDEuHXUkB5vOM9XXFbbnoh+QRwI=
2018/11/28 14:46:50 E [5000] could not submit transaction Horizon error: "Transaction Failed". Check horizon.Error.Problem for more information.The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details. Descriptions of each code can be found at: https://www.stellar.org/developers/learn/concepts/list-of-operations.html
2018/11/28 14:46:50 E [5000] Op codes [] Tx codes
2018/11/28 14:46:50 D [5000] Coin2Quanta: No new block last=2728 top=2728
2018/11/28 14:46:50 I [5000] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
http://testnet-02.quantachain.io:8000/accounts/QBU734ICFLPITA6IYTZCUJEQWLIOV2R5DHVCAXGJ4AB4XMBTMM4MSB7P/payments?order=asc&limit=100&cursor=0
2018/11/28 14:46:50 I [5000] QuantaToCoin refunds []
2018/11/28 14:46:50 I [5000] Next cursor is = 0, numRefunds=0
2018/11/28 14:46:51 I [5000] Submit TX: 0xa29f71f9d54e9e63c04495a8ac1c28b48ffd0756119ff4a76398d5d4290ff1a4 signed=true AAAAAGn98QIq3omDyMTyKiSQstDq6j0Z6iBcyeADy7AzYzjJAAAAZAAPCxsAAAAHAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAtPLXJrAzpl8vQeC3aWnpevyKsW/74pC1OszLAbBW5OkAAAABRVRIAAAAAABp/fECKt6Jg8jE8iokkLLQ6uo9GeogXMngA8uwM2M4yQAAAAAAvE15AAAAAAAAAAOspXiTAAAAQL+NdN9+mwaWHvEkdtZxdGwXbxC5FxZjJzEs+0GzvjuWX0ZpK6wra4fiMqNR5n3MyFJSjGIHVFeFQnOGfCfNkwqCMai/AAAAQNKtYdKvyIYYxPMj7Q3YFBOZNeHH26HOrg7yHWTZNNQ1zZHMBjq9poJzGsWAu8Onc3K0TOBC6O/IygfZwMb/hgE+haVNAAAAQBX2qn5/SP5IX9sWNtmrXmqswmFQYU/ZLHT1H+qRRvK/EslVXH1Vj/OD/Qi/VDEuHXUkB5vOM9XXFbbnoh+QRwI=
Each coin will have a new configuration called:
BtcWithdrawMin: 0.00075
BtcWithdrawFee: 0.00025
BchWithdrawMin: 0.0015
BchWithdrawFee: 0.0005
EthWithdrawMin: 0.015
EthWithdrawFee: 0.005
LtcWithdrawFee: 0.0015
LtcWithdrawFee: 0.0005
If withdrawal amount is below the min, bounce it back with reason: too_small
When you're withdrawing:
Input -> output 1 - the user (amount minus fee)
output 2 - remaining amount
input = output1 + output2 (included withdraw fee) + tx fee
remaining amount contains the withdraw fee, implicitly.
Steps to reproduce:
web3.eth.sendTransaction({from:sender, to:receiver, value: web3.toWei(10, "ether")})
Result:
Node proposes negative number.
Approach:
WeiToStellar(tx.Value().Int64()),
Wei should be an input as BigInt
Ethereum_client.go:196
When user withdrawal to a bad address, mark the transaction as bad address.
Set the from address of the deposit as the issuer.
crosschain1_1 | Geting txid from trustaddr 0xF8306d5279193146F307dc1c170EA59e7b0C370A
crosschain1_1 | Last TX ID= 8
crosschain1_1 | 2019/03/25 18:34:55 I [5000] Start new round 194098_0 ETH to=0xf29449369cf92b0778fc9aadd27cea35ec1df760 amount=20
crosschain1_1 | 2019/03/25 18:34:55 I [cosi] Start new round leader=false nodes=3 threshold=3
crosschain1_1 | 2019/03/25 18:34:55 E [cosi] Only leader can propose signing
Run 3 nodes
Submit Transaction
Stop one node
Submit Transaction
Restart the node
2018/11/30 11:44:34 I [5000] Start new round 0x3fd5e39ebf4742e61bd9db018e2c663c01e629a661e15f8043e4a123e2dd7b58 ETH to=QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV amount=400000
Propose TX: ETH QDFLBGRMXEDTLI2LBYQTF7ZX4LPGOWIBN2UDQOZW6VH47LNEX5MEXBST 0.0400000 QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV
2018/11/30 11:44:34 I [5000] Got blocks [8071 8072]
2018/11/30 11:44:34 I [5000] ***** Start # of blocks=2 man.N=3,man.Q=3 ***
2018/11/30 11:44:34 I [5000] set last block coin=ETH height=8072
2018/11/30 11:44:34 I [5000] QuantaToCoin refunds []
2018/11/30 11:44:34 I [5000] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 11:44:34 I [cosi] Start new round leader=true nodes=3 threshold=3
2018/11/30 11:44:34 I [cosi] Got commitment 2/3
2018/11/30 11:44:34 I [cosi] Got commitment 3/3
2018/11/30 11:44:34 I [cosi] Got total of 3 commitments, moving forward
2018/11/30 11:44:34 I [5000] Sign msg wGGc8QAAAEBswnde3ksmBxQ1+utUxt3XmtPfAzDGNcrLJMYe2Ydzy0h6U5W2xjdswuNW8EY0XaLR34MUoejeSysazqupKKcL
2018/11/30 11:44:34 I [cosi] Got signature 2/3
2018/11/30 11:44:34 I [cosi] Got signature 3/3
2018/11/30 11:44:34 I [5000] Great! Cosi successfully signed deposit
2018/11/30 11:44:34 E [5000] processSubmissions pending=1
2018/11/30 11:44:34 I [5000] Submit TX: 0x3fd5e39ebf4742e61bd9db018e2c663c01e629a661e15f8043e4a123e2dd7b58 signed=true AAAAAMqwmiy5BzWjSw4hMv834t5nWQFuqDg7NvVPz62kv1hLAAAAZAAPDxkAAAAqAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAQ2ngI+8T11/xdvUwln/vdfFmE79ZOmNe+f6ukF88UUYAAAABRVRIAAAAAADKsJosuQc1o0sOITL/N+LeZ1kBbqg4Ozb1T8+tpL9YSwAAAAAABhqAAAAAAAAAAAPAYZzxAAAAQGzCd17eSyYHFDX661TG3dea098DMMY1ysskxh7Zh3PLSHpTlbbGN2zC41bwRjRdotHfgxSh6N5LKxrOq6kopwunC6puAAAAQBNZ9o3r+5Vl1ybLT+f2A3/ZlM3gYVy/7n6/pm6oxS6ZMeLHNV7+iWZbd81KUw+9N1rAoww9wM5c80OIYh4lggEWQn5KAAAAQIoErPsnbGmnjGcrK/WGIaBT6hBfdWku2iUJiFsJLmaY5XT8xdfj/BCs1K4Kg22SfVpVLcMBLwSg/TSy0a0KrAA=
2018/11/30 11:44:37 I [5000] Successful tx submission d2f553d2024c13239289fe201f58e36b8c6649e5ab90738d2467b7fd608bcec2,remove %!s(int=0)
Stopped node3(Leader Log)
2018/11/30 11:59:25 I [cosi] Start new round leader=true nodes=3 threshold=3
Error! Post http://0.0.0.0:5002/node/api/peer: dial tcp 0.0.0.0:5002: connect: connection refused
2018/11/30 11:59:25 I [cosi] Got commitment 2/3
2018/11/30 11:59:25 D [5000] Coin2Quanta: No new block last=8136 top=8136
2018/11/30 11:59:25 I [5000] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
2018/11/30 11:59:25 I [5000] QuantaToCoin refunds []
2018/11/30 11:59:25 I [5000] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 11:59:28 E [cosi] Timeout should not happen received 2/3
2018/11/30 11:59:28 E [cosi] Bailing out of leader prep round, not enough nodes
2018/11/30 11:59:28 E [5000] Unable to sign for refund
2018/11/30 11:59:28 D [5000] Coin2Quanta: No new block last=8136 top=8136
2018/11/30 11:59:28 I [5000] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
2018/11/30 11:59:28 I [5000] QuantaToCoin refunds []
2018/11/30 11:59:28 I [5000] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 11:59:29 I [5000] Start new round 0xc2cde8f9ae68a4ee1f07edb7b347155683709b0f9d469d136c815ae2e5f37571 ETH to=QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV amount=600000
Propose TX: ETH QDFLBGRMXEDTLI2LBYQTF7ZX4LPGOWIBN2UDQOZW6VH47LNEX5MEXBST 0.0600000 QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV
Restarted node3 (Leader Log)
2018/11/30 11:59:45 I [cosi] Start new round leader=true nodes=3 threshold=3
2018/11/30 11:59:45 I [cosi] Got commitment 2/3
2018/11/30 11:59:47 D [5000] Coin2Quanta: No new block last=8138 top=8138
2018/11/30 11:59:47 I [5000] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
2018/11/30 11:59:47 I [5000] QuantaToCoin refunds []
2018/11/30 11:59:47 I [5000] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 11:59:48 E [cosi] Timeout should not happen received 2/3
2018/11/30 11:59:48 E [cosi] Bailing out of leader prep round, not enough nodes
2018/11/30 11:59:48 E [5000] Unable to sign for refund
2018/11/30 11:59:49 I [5000] Start new round 0xc2cde8f9ae68a4ee1f07edb7b347155683709b0f9d469d136c815ae2e5f37571 ETH to=QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV amount=600000
Propose TX: ETH QDFLBGRMXEDTLI2LBYQTF7ZX4LPGOWIBN2UDQOZW6VH47LNEX5MEXBST 0.0600000 QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV
2018/11/30 11:59:49 I [cosi] Start new round leader=true nodes=3 threshold=3
2018/11/30 11:59:50 I [5000] Got blocks [8139 8140]
2018/11/30 11:59:50 I [5000] ***** Start # of blocks=2 man.N=3,man.Q=3 ***
2018/11/30 11:59:50 I [5000] set last block coin=ETH height=8140
2018/11/30 11:59:51 I [5000] QuantaToCoin refunds []
2018/11/30 11:59:51 I [5000] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 11:59:52 E [cosi] Timeout should not happen received 1/3
2018/11/30 11:59:52 E [cosi] Bailing out of leader prep round, not enough nodes
2018/11/30 11:59:52 E [5000] Unable to sign for refund
2018/11/30 11:59:53 I [5000] Start new round 0xc2cde8f9ae68a4ee1f07edb7b347155683709b0f9d469d136c815ae2e5f37571 ETH to=QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV amount=600000
Propose TX: ETH QDFLBGRMXEDTLI2LBYQTF7ZX4LPGOWIBN2UDQOZW6VH47LNEX5MEXBST 0.0600000 QBBWTYBD54J5OX7RO32TBFT75527CZQTX5MTUY267H7K5EC7HRIUNTDV
2018/11/30 11:59:53 I [cosi] Start new round leader=true nodes=3 threshold=3
2018/11/30 11:59:54 D [5000] Coin2Quanta: No new block last=8140 top=8140
2018/11/30 11:59:54 I [5000] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
2018/11/30 11:59:54 I [5000] QuantaToCoin refunds []
2018/11/30 11:59:54 I [5000] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 11:59:56 E [cosi] Timeout should not happen received 1/3
2018/11/30 11:59:56 E [cosi] Bailing out of leader prep round, not enough nodes
2018/11/30 11:59:56 E [5000] Unable to sign for refund
Node3 log when restarted
2018/11/30 11:59:39 I [5002] Initialize ledger
2018/11/30 11:59:39 I [5002] REST API started at :0...
2018/11/30 11:59:40 I [5002] Added to quorum
2018/11/30 11:59:40 I [5002] Trust initialized
2018/11/30 11:59:41 I [5002] Got blocks [8135 8136 8137 8138]
2018/11/30 11:59:41 I [5002] ***** Start # of blocks=4 man.N=3,man.Q=3 ***
2018/11/30 11:59:41 I [5002] Block 8135 Got deposits 1 [0xc0004b48c0]
2018/11/30 11:59:41 E [cosi] Unable to validate transactions: %!(EXTRA string=Unable to verify: 0xc2cde8f9ae68a4ee1f07edb7b347155683709b0f9d469d136c815ae2e5f37571 not found)
2018/11/30 11:59:42 I [5002] set last block coin=ETH height=8138
2018/11/30 11:59:42 I [5002] QuantaToCoin refunds []
2018/11/30 11:59:42 I [5002] Next cursor is = 4779830449016833, numRefunds=0
2018/11/30 11:59:45 D [5002] Coin2Quanta: No new block last=8138 top=8138
2018/11/30 11:59:45 I [5002] ***** Start # of blocks=0 man.N=3,man.Q=3 ***
2018/11/30 11:59:45 I [5002] QuantaToCoin refunds []
2018/11/30 11:59:45 I [5002] Next cursor is = 4779830449016833, numRefunds=0```
Full index takes enormous time to index in production and disk space... Can you investigate the tradeoff to not using it?
2019/06/21 02:11:27 I [5000] Quanta2Coin: Got blocks [8113470 8113471 8113472]
2019/06/21 13:57:25 I [cosi] Start new round leader=true nodes=3 threshold=3
2019/06/21 13:57:26 I [cosi] Got commitment 2/3
2019/06/21 13:57:27 I [cosi] Got commitment 3/3
2019/06/21 13:57:27 I [cosi] Got total of 3 commitments, moving forward
2019/06/21 13:57:27 I [cosi] Got signature 2/3
2019/06/21 13:57:27 I [cosi] Got signature 3/3
2019/06/21 13:57:27 I [5000] Cosi successfully agreed on address 32eBtnp9QwkxXx3VRJ5UZix4W483x1uu6G for airdropuser-35646
2019/06/21 13:57:27 I [5000] Updated the crosschain address for account : airdropuser-35646 to 32eBtnp9QwkxXx3VRJ5UZix4W483x1uu6G
Looks like it's caused when the quanta websocket goes down, and it hangs from attempting to connect with no apparent timeout , or retry.
Impact: All 3 nodes.
It takes about 20 minutes to read a whole block.
Let's do this...
in GetDeposit, retrieve listunspent first (which gets indexed by the bitcoin node when we add a multisig address), then create a map lookup table based on txid.
If any deposit can be found in txid, we process it. This saves a lot of time from getting "raw" transaction and everything else.
Currently pingdom is sending a few false alerts. Please look into the history responses and see how we can tune our configurations better to reduce these false alarms. Use my credentials from slack.
We need to warn users certain addresses can't be used to withdraw.
GET /api/address_to_quanta
returns array of addresses .
so /api/address_to_quanta/0x12321312312 -> ["alpha"]
type CrosschainAddress struct {
Address string
QuantaAddr string
TxHash string
Blockchain string
Shared bool
LastBlockNumber uint64 // new
Updated time.Time
}
On new transaction
Everytime we see a transaction, update the LastBlockNumber
Implementation
Configuration
MINIMUM_BLOCK_REUSE > (24*60*60*5)/14
greater than 5 days old.Add new address pool
GenerateMultisig*
Request&Commit
Since nodes could be different states, we should introduce a request and commit. MORE INFO later.
Exited mysteriously , no error:
4517d8024f49 crosschain:latest "/usr/bin/quanta-bri…" 22 hours ago Exited (137) 18 hours ago containers_crosschain1_run_483758a5f9a7
2019/07/17 01:37:30 I [5000] Quanta2Coin: Got blocks [10256825 10256826 10256827]
2019/07/17 01:37:33 I [5000] Quanta2Coin: Got blocks [10256828 10256829 10256830]
2019/07/17 01:37:36 I [5000] Quanta2Coin: Got blocks [10256831 10256832 10256833]
2019/07/17 01:37:39 I [5000] Quanta2Coin: Got blocks [10256834 10256835 10256836]
2019/07/17 01:37:42 I [5000] Quanta2Coin: Got blocks [10256837 10256838 10256839]
2019/07/17 01:37:45 I [5000] Quanta2Coin: Got blocks [10256840 10256841 10256842]
2019/07/17 01:37:48 I [5000] Quanta2Coin: Got blocks [10256843 10256844 10256845]
2019/07/17 01:37:51 I [5000] Quanta2Coin: Got blocks [10256846 10256847 10256848]
2019/07/17 01:37:54 I [5000] Quanta2Coin: Got blocks [10256849 10256850 10256851]
2019/07/17 01:37:57 I [5000] Quanta2Coin: Got blocks [10256852 10256853 10256854]
2019/07/17 01:38:00 I [5000] Quanta2Coin: Got blocks [10256855 10256856 10256857]
2019/07/17 01:38:03 I [5000] Quanta2Coin: Got blocks [10256858 10256859 10256860]
2019/07/17 01:38:06 I [5000] Quanta2Coin: Got blocks [10256861 10256862 10256863]
2019/07/17 01:38:09 I [5000] Quanta2Coin: Got blocks [10256864 10256865 10256866]
2019/07/17 01:38:12 I [5000] Quanta2Coin: Got blocks [10256867 10256868 10256869]
2019/07/17 01:38:15 I [5000] Quanta2Coin: Got blocks [10256870 10256871 10256872]
2019/07/17 01:38:18 I [5000] Quanta2Coin: Got blocks [10256873 10256874 10256875]
2019/07/17 01:38:21 I [5000] Quanta2Coin: Got blocks [10256876 10256877 10256878]
The use case here, is that we can take down any node independently of each other. Right now , if we take the registry node down, we have to restart all the other nodes to register.
It should be based on public key, and update the ip if the user has changed.
Use case 1:
Use case 2:
Use case 3:
expect manifest to update & broadcast & consensus work as normal
Bitcoin tx are stuck due to low fees. We need a better estimator.
Use this to get fees per byte in satoshi (8 decimal)
https://bitcoincore.org/en/doc/0.16.0/rpc/util/estimatesmartfee/
Then multiply this formula
totalBytes = 350 + (180 x input ) + (34 x output ) + 10
Example tx:
https://www.blockchain.com/btc/tx/a896ec7446be0618a50bc5940e0ee44cdae15bead7dc995709950b81a211a85b
2019/05/17 19:00:52 I [5201] Quanta2Coin: Got blocks [5168652 5168653 5168654]
2019/05/17 19:00:53 I [cosi] Initialize cosi state.
2019/05/17 19:00:54 E [cosi] Bailing out of follower commit round, not enough nodes 2/3
2019/05/17 19:00:54 I [cosi] stunnel Follower got prepare 3/3
2019/05/17 19:00:55 I [5201] Quanta2Coin: Got blocks [5168655 5168656 5168657]
2019/05/17 19:00:58 I [5201] Quanta2Coin: Got blocks [5168658 5168659 5168660]
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.