Rebase Wownero to Monero master #17
Closed
opened 6 years ago by wowario
·
7 comments
Loading…
Reference in new issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I've started to rebase on top of Monero Merge pull request #4927, however there are a few issues to sort out.
To switch over to the new version, we could deactivate the old bulletproofs in hard fork v11 and after a couple days, fork to v12 to activate new bulletproofs with fee per byte and then fork the next day to v13 to forbid borromean range proofs.Italo BP patched applied, requires review and further testing.2. Generation of genesis block - When bootstrapping from 0, the rebased version prompts the following error:3. Attempting to get cumulative difficulty - When starting rebased version from 0with a synced database, the following error is thrown:4. Migrating blockchain - In addition, there is this error:6. Inaccurate network stats - node does not display correct net hash and difficulty with commandsstatus
anddiff
7. Error::not_enough_money - error is thrown from new wallet with recently received txs. Error does not come up from wallet restored from seed.For point 1, it'll probably be quite a bit of work requiring a lot of care since the rebased version needs to verify both the old and the new BP types, whereas the upstream simply eliminated the old type, as it was only used in the testnet which was completely rolled back. Specifically, as in the upstream PR https://github.com/monero-project/monero/pull/4219, the old types
RCTTypeFullBulletproof
andRCTTypeSimpleBulletproof
have been dropped and replaced byRCTTypeBulletproof
, but Wownero will need to keepRCTTypeFullBulletproof
andRCTTypeSimpleBulletproof
in the code and adapt the verification rules in blockchain.cpp such that the old and the new types are correctly handled depending on the block height.This is of course doable technically, and I don't know exactly how tricky/easy the task will be. Just my two cents.
For points 2 & 3, I've seen one person reporting a similar issue when I was working on rebasing Aeon (https://www.reddit.com/r/Aeon/comments/7xdr56/stoffu_rebase_testing/du995wh), but I couldn't figure out the cause because that person stopped replying.
For point 4, the issue seems easier to fix by looking down the call chain. If the rebase point is a while back, the issue might be due to a wrong fix I've sent to Monero, see https://github.com/monero-project/monero/pull/4635.
EDIT: Yes, this seems to be the case.
Applied the patches from
6cebd00045
and1bc8afec25
to rebase.When bootstrapping a node from scratch, there is still a
MDB_NOTFOUND: No matching key/data
error in generating genesis block in addition these errors:When starting node from a populated database, blockchain migration from DB version 1 to 3 is completed successfully and node syncs to network. However,
usable is negative
error periodically comes up.Sending old and new BP transactions to network hasn't been tested yet.
Attempted to make a transfer, but got following error message:
Edit
Issue related to
7f0dd094e7
I've temporarily commented out this commit and was able to send and receive txs.
Edit: fixed
I tried the rebase branch on wowario's fork. DB was successfully migrated, hashrate and diff were wrong, transfer failed with a different error:
I did a trace on the wallet, it seems the fee is wrong:
I compared with v0.4 and
estimated_fee
seems to be correct, so the min_fee is probably wrong for the old fee.Edit: this should be fixed once 5 is fixed.
After disabling the fee check there's a new error:
some more trace:
PR opened in Wownero's repo