Post
Topic
Board Announcements (Altcoins)
Re: Network Attack on XVG / VERGE
by
CHIEF56
on 05/06/2018, 09:27:33 UTC
Justin - A few questions for you, as I've finally had a moment to review the Verge XVG code

1. After the Hard Fork in Jan of this year, for what I guess was a code update to help support "stealth transactions" --> (ref: https://twitter.com/vergecurrency/status/954914199188180992) . . .

. . . I notice a modification to 'checkpoints.cpp' in order to update the check-point map

Code:
static MapCheckpoints mapCheckpoints =

https://github.com/vergecurrency/VERGE/commit/2cae3f9a49c805815861c2d91d777e1881fbed3d

Code:
( 1000000, uint256("0x000000000049eaba3d6c29d9f45bc2a944b46eec005e2b038f1ee924f2f9c029"))
  ( 1100000, uint256("0xc766387a2e0cd6af995ea432518614824fe313e988598ea8b26f58efb99ebcdc"))
  ( 1145029, uint256("0x04def2ba205c1e5f4b33873bc9e5b0a54311370e823686aeb4d5aab0bf021899"))
+ ( 1824425, uint256("0x2f30b9c1d6e624c4a01f1309df5149ce32f77da4e71418429dc8ae50ee527a0f")) //first after stealth fork!
         ;


OK, fine. But... I don't quite understand why? I didn't think it was utilized in strictly PoW.. Furthermore, I fail to find the required updates in 'kernel.cpp' to set new values for "modifierchecksum" ~> 0x0e00670bu

Code:
// Hard checkpoints of stake modifiers to ensure they are deterministic
static std::map mapStakeModifierCheckpoints =
    boost::assign::map_list_of
    (     0, 0x0e00670bu )
    ;

https://github.com/vergecurrency/VERGE/commit/5bd3c1d189740a81daf36b46aa8d29706efe6962
https://raw.githubusercontent.com/vergecurrency/VERGE/5bd3c1d189740a81daf36b46aa8d29706efe6962/src/kernel.cpp

Why even take the time to set these in 'checkpoints.cpp' ? ? ? ?

Code:
       (     0,  hashGenesisBlockOfficial)
        (  15000, uint256("0x000000000265c5f4683b169a68cb3cac89287c8b5df94e17b09ef19ac718026b"))
        (  30000, uint256("0x0000000003dddf9e84b1246e9a0bd7ceb2672998294e8c823d5ef288fa3781f4"))
(  45000, uint256("0x000000000321d6be8ffe446a9183f7605e40f523436479b713762346ae65a3bd"))
(  60000, uint256("0x00000000122a8a1dbdc9d2ab530facf3fefa2e7cee0393f628921cae3c60483f"))
(  75000, uint256("0x0000000016e3bb233f2196d532e8e7831ad19c9235e833309d10faf14b7902af"))
(  90000, uint256("0x0000000010f470ed5eda53dc12707e34297e75b7bd91f5e5ac9fb72050112e57"))
(  100000, uint256("0x000000000400a93131a94ad193c63faafeb8dfcc0c7d0e6f1c9c2614cb2823eb"))
(  150000, uint256("0x0000000000548f44babc055557c5870b15d1401bb0de72fb6a6c19d6c5f36d10"))
(  200000, uint256("0x000000000010dd127bfe9f6b8c36080c45bcd352151aa0d2a4c79c9eba1e05b6"))
(  219912, uint256("0x00000000010751365b77b28dc6af3c33e6c620e45a166c659a2056dc7cb3af0a"))
(  222222, uint256("0x00000000003c92cf2938d35cf4006fc21a251d82456780cafb43ab908eef9aff"))
(  244219, uint256("0x000000000139613d26f7436ecc568feb566c22d9a664359e53f0d0a542d5bdba"))
(  400000, uint256("0x0000000001d45af6613024ad5668bfa4909ac63e2b29c28042013d77a216830d"))
(  500000, uint256("0x0000000003700a4e9d81a67036d7647361086527e985cdf764648c5e61d07303"))
(  600000, uint256("0x30fa1eab961c99f6222f9925a27136c34ea27182c92e4f8c48ea3a90c7c2eb25"))
(  700000, uint256("0x3e4f3319706870bb149d1a976202c2a5e973384d181a600e7be59cbab5b63132"))
(  800000, uint256("0xf6b5f222bcc2f4e2439ccf6050d4ea3e9517c3752c3247302f039822ac9cc870"))
(  900000, uint256("0xc4d8b4079da888985854eda0200fb57045c2c70b29f10e98543f7c4076129e91"))
( 1000000, uint256("0x000000000049eaba3d6c29d9f45bc2a944b46eec005e2b038f1ee924f2f9c029"))
( 1100000, uint256("0xc766387a2e0cd6af995ea432518614824fe313e988598ea8b26f58efb99ebcdc"))
( 1145029, uint256("0x04def2ba205c1e5f4b33873bc9e5b0a54311370e823686aeb4d5aab0bf021899"))
( 1824425, uint256("0x2f30b9c1d6e624c4a01f1309df5149ce32f77da4e71418429dc8ae50ee527a0f")) //first after stealth fork!
        ;


It is obvious the function wasn't working since all values for "modifierchecksum" have been null up to and including after block height 1824426 (stealth fork!)

./Verged getblock 9ea785d1ad5120a868c31bceb64d85dc5bb5322c562d6c16e4eb9cbcccaaa5d9

Code:

{
    "hash": "9ea785d1ad5120a868c31bceb64d85dc5bb5322c562d6c16e4eb9cbcccaaa5d9",
    "confirmations": 416933,
    "size": 8352,
    "height": 1824426,
    "version": 6148,
    "algo_id": 1,
    "algo": "x17",
    "mined_hash": "000000000008c9ef2811faf71d0f00d81cd211e4f0cbe1d05222b0d47266d2c9",
    "merkleroot": "d24bd78946f99924d7c0cdc744cecd3c7ee355e72799c978b09c62b0844b2fb2",
    "mint": 1561.103643,
    "time": "2018-01-24 06:35:12 +0300",
    "nonce": 3674376384,
    "bits": "1b0b4b9f",
    "difficulty": 5801.92198634,
    "previousblockhash": "2f30b9c1d6e624c4a01f1309df5149ce32f77da4e71418429dc8ae50ee527a0f",
    "nextblockhash": "d3b1da781cc22f763d297b53ae7535327362f4b5566017b8d922b095f1844268",
    "flags": "proof-of-work",
    "proofhash": "9ea785d1ad5120a868c31bceb64d85dc5bb5322c562d6c16e4eb9cbcccaaa5d9",
    "entropybit": 1,
    "modifier": "b96c8a9e6de606fe",
    "modifierchecksum": "00000000",
    "tx": [
        "4fa82df4d3d86a1438188bbe8c26a93af0459982d3b6b42eac630a9093b9f3e3",
        "0c475e2ee48c05c0bf41f69b727e7e1a15e4d9703fdbf1ebd9bdcc5531ceedbf",
        "4e23cdebf263b5b160193dc21d60b3d5843d64513117f7496c121e5371690fef"
    ],
    "signature": "3045022100bf3e436c13d263afbb4224b206b8662bf5c3b4a1e4de62f40d9dbaf9337cec07022041ee9840d12ca02986d90acb6f4b7829f6fcf3b850f411cafe8609ad54dd64e1"
}


But now, almost magically, blocks are being created with 'modifierchecksum' values :

Code:
{
    "hash": "623e3b1a2dac219a28d87e9e76bf822b32bb1630e6e1d0a5c44ba69cbd94914a",
    "confirmations": 80,
    "size": 12167,
    "height": 2241282,
    "version": 8196,
    "algo_id": 3,
    "algo": "blake",
    "mined_hash": "000000000000001a00041a64810ef6c836806c49c97248e5a15ba4e1bb6e9d6b",
    "merkleroot": "062d766b9cb30b7262e29a3b522e5ea6d9a8e6cfd18bef4ae18859410467aa4b",
    "mint": 737.610371,
    "time": "2018-06-05 11:16:30 +0300",
    "nonce": 519219971,
    "bits": "1a01e3f8",
    "difficulty": 8874336.9484083,
    "previousblockhash": "8276001838e3b812b1bdcd5e7734c0879423a527935ed185a1e951c16a13105d",
    "nextblockhash": "00000000000116efdb4b93f3b1b2b90474e6d5d379ba935fc4d4c025362794a3",
    "flags": "proof-of-work",
    "proofhash": "623e3b1a2dac219a28d87e9e76bf822b32bb1630e6e1d0a5c44ba69cbd94914a",
    "entropybit": 0,
    "modifier": "f0a172acea44beeb",
    "modifierchecksum": "2096c68e",
    "tx": [
        "800cbbcef8dd2fdbe48ccf4bb6ddc1166f4002182f646a2d90f31f0e3e6bcf30",
        "b8ae1ddb44652ad91b7dbbfc597fed852e618fbf025a1ce47f69460ea0935931",
        "d498b5d659cba9bf7348a4ff11b4c87c5cc5f95abd4092ef8ccc6221d26524f0"
    ],
    "signature": "3045022100cd831439151f28aa633f14ad759976da5711fbc5415fba57c4320865d2f68462022056695c35f32179749db5628b3f93466f1aa53df38717b74a2183a1ff18729f94"
}


So now, it seems like there are several different chains being built, ex:

https://verge-blockchain.info/api/getblock?hash=623e3b1a2dac219a28d87e9e76bf822b32bb1630e6e1d0a5c44ba69cbd94914a

  "modifier": "f0a172acea44beeb",
"modifierchecksum": "665d180b",


http://poolovich.pro/explorer/XVG?hash=623e3b1a2dac219a28d87e9e76bf822b32bb1630e6e1d0a5c44ba69cbd94914a

   "modifier": "f0a172acea44beeb",
"modifierchecksum": "2096c68e",


Hmmm... Strange looking diff. But, is the Version # supposed to be different with each block?  ;/

http://poolovich.pro/explorer/XVG?height=2241661


Blockhash:   0000000000009ebeee9a14fbed9ab59615b8dc5fce980c409efeb6772bb1a38a
Confirmations:   67
Height:   2241661
Time:   2018-06-05 14:49:33 (1528199373)
Difficulty:   69632
Bits:   1b00f0f0
Nonce:   3133120713
Version:   804
Size:   278 bytes
Flags:   proof-of-work
Previous Hash:   5777d7190cf591fb111a238a1673fb991c1b37eb81f863e0cc28444452769bb7
Next Hash:   830686cc6b47e56405ea7b5a1472638f246105b9f86c97836dccb8704bbcb0e6
Merkle Root:   a0e8812d5c9621e3f9d51c14fdec40f03def18bee60db45ec1a92f90c2d37e5a
Transactions:   1


http://poolovich.pro/explorer/XVG?height=2241662

Blockhash:   830686cc6b47e56405ea7b5a1472638f246105b9f86c97836dccb8704bbcb0e6
Confirmations:   530
Height:   2241662
Time:   2018-06-05 14:49:34 (1528199374)
Difficulty:   22390.15415413
Bits:   1b02ed4d
Nonce:   1889940574
Version:   5004
Size:   284 bytes
Flags:   proof-of-work
Previous Hash:   0000000000009ebeee9a14fbed9ab59615b8dc5fce980c409efeb6772bb1a38a
Next Hash:   23a9fb393b3507977fb8f191cff87acf93541b86200840c22b0ae7174801793b
Merkle Root:   10c2a8122636306b2a50ddce6fdc56104d1159394f809d8b1209a3e1cd508803
Transactions:   1




This, combined with other problem, seems like quite a mess that could have been avoided  ;/


Edit: Consolidate posts


-C