-
Notifications
You must be signed in to change notification settings - Fork 97
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
client/asset/ltc: work with and require v0.21 #1536
Conversation
They're tagged up to rc7, but it looks like there are still some issues, and estimatesmartfee is busted. Also looks like everyone's testnet will need a manual -reindex. Weird. |
Yeah I cannot sync testnet with 0.21.2rc[anything]. 0.21.1 worked fine, but all the subsequent MWEB commits (added in a patch and through RCs!) killed it. Just gonna hover on this until binaries are released. |
I STILL cannot get it to sync on testnet.
Always stuck at that block, even though it pulls all headers. Fresh or upgrade, no dice. litecoin-project/litecoin#789 |
You need to |
So I had tried that on my issue. But also this is stuck like this with a full fresh resync. |
This is ridiculous, but the chain is split. 🙄 |
Well, the block serialization has changed, possibly the tx serialization too. This is irritating since we just released 0.4.3, and we're using getblock (raw, not verbose json). I'm starting to think we should use the verbose and inefficient versions of these RPCs and leave the deserialization to the node. Too late now though.
EDIT: It's both block and tx serializations, but the issue is mainly the txn serialization. The block seems to put the mweb pieces at the end, after the transactions (see litecoin-project/litecoin@9d1f530) where its presence is signaled by the The pkScript may also be unrecognized, as it can starts with |
e1a6935
to
7a16270
Compare
I've not tested the last commit, but it looks like a workable resolution, for now. |
The only testnet4 explorer that is on the "correct" chain is https://sochain.com/testnet/ltc |
0c71b21
to
cac2f85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working well on simnet.
This Litecoin upgrade is a mess. Simnet harness isn't upgrading. Getting a segfault. If I delete harnesschain.tar.gz, the nodes will start fine, but there are all kinds of connection errors with |
woof
Not that I read about. These are crazy hiccups for a patch release. I'll recreate the harnesschain tarball and see if I can address the harness failures. It was alright in March on 0.21.1 fwiw |
I did not delete anything and was fine... I have not been building any coins from source though, just using whatever binaries they put out. for litecoind https://litecoin.org/ |
Until litecoin's testnet mess is sorted out, I feel uneasy about making this change. https://litecointalk.io/t/ltc-testnet-and-mweb/53473 Also, it has been observed that there's a Will keep my eye on the situation. It obviously affects #1607 too. |
I'm having no trouble either, so I suspect it's the BDB version used in the build.
Maybe it's built with 5.3 for you @buck54321 |
Anyway, it's all working, including find maker's redemption after ghosting, which is the code that pulls and decodes blocks.
|
I do need to regenerate the harnesschain.tar.gz though to get the mweb bip9 softfork to activate... |
Will be merging this tomorrow if there are no more comments. It works correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and tests well. I've got a couple of requests for the live test, but otherwise ready.
@@ -20,5 +20,8 @@ export DELTA_WALLET_SEED="cNueSN7jzE9DEQsP8SgyonVvMSWyqk2xjTK3RPh2HAdWrR6zb8Y9" | |||
export DELTA_ADDRESS="QYUukoqupSC86DmWZLj3miArZFcy3eGC4i" | |||
# Signal that the node needs to restart after encrypting wallet | |||
export RESTART_AFTER_ENCRYPT="1" | |||
export EXTRA_ARGS="-blockfilterindex=1 -peerblockfilters=1 -rpcserialversion=2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-peerblockfilters=1
🎉
) | ||
|
||
type decoder struct { | ||
buf [8]byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice pattern
client, err := rpcclient.New(&rpcclient.ConnConfig{ | ||
HTTPPostMode: true, | ||
DisableTLS: true, | ||
Host: "127.0.0.1:19332", // testnet4 | ||
User: "user", // set me | ||
Pass: "pass", // set me | ||
}, nil) | ||
if err != nil { | ||
t.Fatalf("error creating RPC client: %v", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you do this like I'm doing ZCash?
dcrdex/client/asset/zec/regnet_test.go
Lines 53 to 69 in 15df5a5
cfg := struct { | |
RPCUser string `ini:"rpcuser"` | |
RPCPass string `ini:"rpcpassword"` | |
}{} | |
usr, _ := user.Current() | |
if err := config.ParseInto(filepath.Join(usr.HomeDir, ".zcash", "zcash.conf"), &cfg); err != nil { | |
t.Fatalf("config.Parse error: %v", err) | |
} | |
cl, err := rpcclient.New(&rpcclient.ConnConfig{ | |
HTTPPostMode: true, | |
DisableTLS: true, | |
Host: "localhost:18232", | |
User: cfg.RPCUser, | |
Pass: cfg.RPCPass, | |
}, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool that's much better than "set me"
|
||
// start 1000 blocks prior to mweb testnet blocks | ||
// 2215586 for mainnet, 2214584 for testnet4 | ||
for iBlk := int64(2214584); ; iBlk++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we limit this to -/+ 1000? It's an ever-growing test and it's already quite long.
t.Fatalf("Unmarshal (%d): %v", iBlk, err) | ||
} | ||
if iBlk%500 == 0 { | ||
t.Log(iBlk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will only be logged with verbose output. Maybe just go to stdout?
|
||
type Tx struct { | ||
*wire.MsgTx | ||
IsHogEx bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks god they shortened it to "HogEx". I don't know if I could take it seriously if it said Hogwarts Express everywhere.
This updates the client's supported Litecoin Core version to v0.21. In addition to bumping the version, this means: - getbalances is supported now - sendrawtransaction has the new syntax with maxfeerate not allowHighFee This also adds the missing switches on wallet Type to both ltc and bch.
On LTC regtest/regnet, the mweb soft fork is not active at genesis. It is necessary to mine to block 431, send to a mweb address in a "peg-in" transaction, and then mine the block so that the pegin and the required hogex may be created when mweb activates at 432. As of Bitcoin Core 0.21, the default "" wallet is not automatically created. https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.21.0.md#automatic-wallet-creation-removed This adds a CREATE_DEFAULT_WALLET variable to explicitly create this wallet if needed. The command also creates it encrypted to start.
The |
Trade test with v0.21.1: