Closed kayabaNerve closed 4 years ago
It could be a hash sort/packet sort disconnect.
{
"hash": "98A24AE3316BEAFA90B29F9F8161E879DBD0358F590338BE34ECFCF7C10A1300",
"header": {
"contents": "7022E89B3EA6C7548B6792A272EE650997426E3557C3DC96276D123487065149",
"sketchCheck": "CF283D5C7E54E75202D5237C670102E590091B6347AA233F6EFE8DB12CD814AC",
"time": 1595693721,
"proof": 6880,
"signature": "896A63C842F06575C118F329714073D8A09F04D8C0849FAD048BAD4D74E85120F9254FCE2EA07F14109D171AA4E797BF",
"miner": 1
},
"aggregate": "AB982D547E1F38E02AEAA8566AD37D42CDC051A98A3DE208206EA742B5BCC5FF49C65E04C3F65F001DB96F597A65DD65",
"transactions": [
{
"hash": "A93E25A54F933B515DD13BE4257C3AF84A47AE65ED85341FA5421754CBE8A6B9",
"holders": [
1
]
},
{
"hash": "300F2D4BEC4D3C8F1A33F303526DD061BC3FFD4BB90D8B1AF1F80204C02082E0",
"holders": [
0,
3
]
},
{
"hash": "86F7B04B9AE7D04669E2E4383300BF2D5480CD6DDEE0D379B5119EDF7DC3B71E",
"holders": [
0,
3
]
}
]
}
"A93E25A54F933B515DD13BE4257C3AF84A47AE65ED85341FA5421754CBE8A6B9": {
"inputs": [
{
"hash": "4D45524F535F444556454C4F5045525F544553544E45545F3500000000000000"
}
],
"outputs": [],
"hash": "A93E25A54F933B515DD13BE4257C3AF84A47AE65ED85341FA5421754CBE8A6B9",
"descendant": "Data",
"data": "C456BA3A2691B0E292A4C959D5687EBBB83E9F3473B073DC29AC1E5D1AB91300",
"signature": "FCB406BF11DE863663605C8BB40F8166B2AA070EF72364B5AA2EFE39B53593638A78D975A59AAAF157FEBC147EFFBACC7301B71190BA2080E4AE11C45E92D401",
"proof": 0,
"argon": "FD103038724E0420A362C19AB482C04413C3C48C609BD244FE441591D15E54D9"
}
"300F2D4BEC4D3C8F1A33F303526DD061BC3FFD4BB90D8B1AF1F80204C02082E0": {
"inputs": [
{
"hash": "4D45524F535F444556454C4F5045525F544553544E45545F3500000000000000"
}
],
"outputs": [],
"hash": "300F2D4BEC4D3C8F1A33F303526DD061BC3FFD4BB90D8B1AF1F80204C02082E0",
"descendant": "Data",
"data": "7C42CAB126C3096993F74AB14A90E07243182BE4508075C714D96AF936A61400",
"signature": "751F30A1DAA221E2EDF22394123EBFB1A8859623C0A50B01D492A678D9CD48762D1EC93A76EE0375BF1CF556BBCD730A8A42A7358DC9E7AE642381B187AE7C07",
"proof": 0,
"argon": "0000000000000000000000000000000000000000000000000000000000000000"
}
"86F7B04B9AE7D04669E2E4383300BF2D5480CD6DDEE0D379B5119EDF7DC3B71E": {
"inputs": [
{
"hash": "903808BD94D4977C513245FEBCCF0FFDA145E6FB140BCF3B791FB2C79113BEE5",
"nonce": 0
},
{
"hash": "71D8387AEC0AF30DFDBAD04743B39B140F04D26FF5FAB129AD33064F332B669F",
"nonce": 0
},
{
"hash": "969C47A9717491317EFE421313564BE9C979E7E1F761070E4CEC65E7F3CDC239",
"nonce": 0
},
{
"hash": "98620075F16EC0B7CBC5B6932CC97FC932FCF791ECA1244403B04C7419F00E70",
"nonce": 0
},
{
"hash": "AEBE311ACF1265633AE3233324C93D58443030F0A9136883B03BCAF146531755",
"nonce": 0
},
{
"hash": "42655F1AF8EAD60ED86F4C97B8A8C666B63B3C1FAEB09BE7E69AC35B13FCB767",
"nonce": 0
},
{
"hash": "C916FC373026DB3896517A5D1CD3F4285658589920CA3C5DA8D4D0B3D1F78840",
"nonce": 0
},
{
"hash": "B985E0478453BEAA631005DC800C09F412BCCB683F063EC4EFA73CA6D4F6AEB4",
"nonce": 0
},
{
"hash": "5A62CC4A124718BA7FC398840A110ADCB3CD7DF4F6D94034FC7698B85748468C",
"nonce": 1
},
{
"hash": "A150F1A13124E98F6E077DD117CFAD4A324037CE0BAF99C7940FE95E0DA0F4F8",
"nonce": 0
}
],
"outputs": [
{
"amount": "400000",
"key": "818C65E6DB640E367025CAF8B77090F4A450396CA46505251F442CAA74BAA673"
},
{
"amount": "11505",
"key": "DC0D2EEB08CE1240ADE63ACBE01D7375446BFB61A45F0A671EB8179FA4DEC8A3"
}
],
"hash": "86F7B04B9AE7D04669E2E4383300BF2D5480CD6DDEE0D379B5119EDF7DC3B71E",
"descendant": "Send",
"signature": "2BCF78A4A8720EC71A79752F5305E35D3FB3CF4E3AC90FCEBE47FA461EB809E056EDF0D262C4D19632A27CB2B43ABB977FADFE500924526E61E0EC8E5CDAD203",
"proof": 1,
"argon": "8F2E242683AF0DFF7133D697671FE5BA02A7877C3584B472EC1F34A13A185A00"
}
is another.
Tried to reproduce with:
proto: PrototypeChain = PrototypeChain(1)
dataFilter: SpamFilter = SpamFilter(5)
edPrivKey: ed25519.SigningKey = ed25519.SigningKey(b'\0' * 32)
edPubKey: ed25519.VerifyingKey = edPrivKey.get_verifying_key()
datas: List[Data] = [Data(bytes(32), edPubKey.to_bytes())]
datas.append(Data(datas[0].hash, b'\0'))
counter: int = 1
packets: List[VerificationPacket] = [VerificationPacket(data.hash, [0]) for data in datas]
while Sketch.hash(bytes(4), packets[0]) < Sketch.hash(bytes(4), packets[1]):
datas[1] = Data(datas[0].hash, counter.to_bytes(4, byteorder="little"))
packets[1] = VerificationPacket(datas[1].hash, [0])
counter += 1
for data in datas:
data.sign(edPrivKey)
data.beat(dataFilter)
proto.add(packets=packets)
Failed to. I'm honestly quite happy it wasn't there. Printing the sketch hashes now/looking to see which if these were in memory.
Confirmed that the first Block went child, origin.
None of the TXs from the first Block were already known to the node (except the Block's Data); it failed AFTER adding DEFF (original data).
Figured it out! It's a cross-chain Data.
https://github.com/MerosCrypto/Meros/issues/228 details how a Block's Data can survive chain re-organizations. The Data verified by the first Block is from an alt-chain. The Data override for the sync code is as follows:
var first: bool = (tx of Data) and (tx.inputs[0].hash == Hash[256]())
#Make sure we have already added every input.
if not first:
for input in tx.inputs:
try:
discard manager.functions.transactions.getTransaction(input.hash)
As we should always have every Block Data when syncing a Block, this is perfectly valid. That said, if a cross-chain Data slips through, this is the error it'll manifest with.
Block which a seed node rejected:
The second transaction relies on the third. That said, their should be sort code in play to prevent this. Then there's the question of why one node allowed this (the miner) and yet another did not.