Je suis en train de creuser le protocole de Duniter pour travailler sur mon implémentation.
Vu que les documents sont signés, il est nécessaire que le formatage (code des retours à la ligne, mais aussi l’encodage du document) soit parfaitement défini pour obtenir la bonne signature. Du coup, quel encodage est utilisé pour les documents ? De l’UT8, de l’ASCII (0-127) ou quelque chose d’autre ?
Seul des caractères 1-9 a-z A-Z + quelques spéciaux sont autorisés leur code est il me semble commun en ASCII et leur équivalent utf-8
Très bien. Les chaînes de caractères sont encodées en UT8 en Rust. Donc pour ces documents, la représentation devrait être la même en ASCII et en UT8, non ? Je n’aurais pas besoin de faire de conversion ?
À vérifier expérimentalement
Je vais donc commencer par faire le code gérant les documents
Je ne connais pas RUST, le seul truc qui pourrait poser problème est s’il rajoute un BOM en tête de fichier. Ça serait étonnant, mais on ne sait jamais. Si les caractères utilisés sont effectivement de l’ASCII, il n’y a rien à faire, ça passera en UTF8 (et vice versa - sans BOM bien sûr).
Je ne pense pas. En plus je compte faire d’abord une version entièrement en mémoire, donc c’est juste l’encodage et le retour à la ligne qui m’importe ^^
Est-ce qu’on pourrait me donner des exemples de documents avec signatures et paires de clés publique/privée pour écrire des tests unitaires ?
Voici un scénario de blockchain de 11 blocs contenant tous les documents actuels du protocole Duniter :
tic
pub: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
sec: 468Q1XtTq7h84NorZdWBZFJrGkB18CbmbHr9tkp9snt5GiERP7ySs3wM8myLccbAAGejgMRC9rqnXuW3iAfZACm7
toc
pub: DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
sec: 64EYRvdPpTfLGGmaX5nijLXRqWXaVz8r1Z1GtaahXwVSJGQRn7tqkxLb288zwSYzELMEG5ZhXSBYSxsTsz1m9y8
Version: 10
Type: Identity
Currency: duniter_unit_test_currency
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
UniqueID: tic
Timestamp: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
1eubHHbuNfilHMM0G2bI30iZzebQ2cQ1PC7uPAw08FGMMmQCRerlF/3pc4sAcsnexsxBseA/3lY03KlONqJBAg==
Version: 10
Type: Identity
Currency: duniter_unit_test_currency
Issuer: DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
UniqueID: toc
Timestamp: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
lcekuS0eP2dpFL99imJcwvDAwx49diiDMkG8Lj7FLkC/6IJ0tgNjUzCIZgMGi7bL5tODRiWi9B49UMXb8b3MAw==
Version: 10
Type: Certification
Currency: duniter_unit_test_currency
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IdtyIssuer: DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
IdtyUniqueID: toc
IdtyTimestamp: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
IdtySignature: lcekuS0eP2dpFL99imJcwvDAwx49diiDMkG8Lj7FLkC/6IJ0tgNjUzCIZgMGi7bL5tODRiWi9B49UMXb8b3MAw==
CertTimestamp: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
RKIGMgYIhB9FmjPbmyo4egPufg/iTpBznYGZp5hjK1WZ1a9imQldLNUMe0eiPlSKJTK/JD3gOlCiynOEY2csBA==
Version: 10
Type: Certification
Currency: duniter_unit_test_currency
Issuer: DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
IdtyIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IdtyUniqueID: tic
IdtyTimestamp: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
IdtySignature: 1eubHHbuNfilHMM0G2bI30iZzebQ2cQ1PC7uPAw08FGMMmQCRerlF/3pc4sAcsnexsxBseA/3lY03KlONqJBAg==
CertTimestamp: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
vMaYgBSnU+83AYOVQCZAx1XLpg/F1MmMztDfCnZvl8hPs4LE9tcDvCrrFogAwMEW2N7Y0gCH62/fBMgw4KrGCA==
Version: 10
Type: Membership
Currency: duniter_unit_test_currency
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
Block: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
Membership: IN
UserID: tic
CertTS: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
s2hUbokkibTAWGEwErw6hyXSWlWFQ2UWs2PWx8d/kkElAyuuWaQq4Tsonuweh1xn4AC1TVWt4yMR3WrDdkhnAw==
Version: 10
Type: Membership
Currency: duniter_unit_test_currency
Issuer: DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
Block: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
Membership: IN
UserID: toc
CertTS: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
80pUx9YBk0RwqrVrQQA+PuxoNn21A8NwQ3824CQPU1ad9R1oDXc/pU6NVpQv92LM8gaWs/Pm1mLXNNVnr+m6BA==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 0
PoWMin: 0
Time: 1490000000
MedianTime: 1490000000
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 1
IssuersFrameVar: 0
DifferentIssuersCount: 0
Parameters: 0.007376575:7210:1200:0:40:604800:31536000:1:604800:604800:0.9:31536000:3:1:7210:10:0.6666666666666666:1490007210:1490007210:7210
MembersCount: 2
Identities:
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV:1eubHHbuNfilHMM0G2bI30iZzebQ2cQ1PC7uPAw08FGMMmQCRerlF/3pc4sAcsnexsxBseA/3lY03KlONqJBAg==:0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855:tic
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo:lcekuS0eP2dpFL99imJcwvDAwx49diiDMkG8Lj7FLkC/6IJ0tgNjUzCIZgMGi7bL5tODRiWi9B49UMXb8b3MAw==:0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855:toc
Joiners:
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo:80pUx9YBk0RwqrVrQQA+PuxoNn21A8NwQ3824CQPU1ad9R1oDXc/pU6NVpQv92LM8gaWs/Pm1mLXNNVnr+m6BA==:0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855:0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855:toc
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV:s2hUbokkibTAWGEwErw6hyXSWlWFQ2UWs2PWx8d/kkElAyuuWaQq4Tsonuweh1xn4AC1TVWt4yMR3WrDdkhnAw==:0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855:0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855:tic
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV:DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo:0:RKIGMgYIhB9FmjPbmyo4egPufg/iTpBznYGZp5hjK1WZ1a9imQldLNUMe0eiPlSKJTK/JD3gOlCiynOEY2csBA==
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo:DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV:0:vMaYgBSnU+83AYOVQCZAx1XLpg/F1MmMztDfCnZvl8hPs4LE9tcDvCrrFogAwMEW2N7Y0gCH62/fBMgw4KrGCA==
Transactions:
InnerHash: C167D631B3E2BCD2FCDE8BE613FA5BE95D2EE44C60FA1DD27CD7878702B2ED5B
Nonce: 1
dj32N99reBwcQCSRtyaUk4fpe65N4K2ApW3XjQOI55RvDNLK7MZekwfb72+8d1Vn5B9QYAiR4/4V+kfC9L23CQ==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 1
PoWMin: 0
Time: 1490007210
MedianTime: 1490000000
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 1
IssuersFrameVar: 5
DifferentIssuersCount: 1
PreviousHash: DF54C05A13BF2B433BC657933616FE17D611B1F012982D9E0929F3EE01B9A8E2
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
InnerHash: B56A318281A8017DFCF41517F3480A85178951EFA56E9EEF5EC8CF6F5A6B3082
Nonce: 1
zfYa9/2gjP0Q1IBewtCU2JvnAhnFCZdVVv756lSD6yVUSqt6kk9WL6Cm6usopyBrcCuwV7rZPTnDxFLCQPqqAw==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 2
PoWMin: 0
Time: 1490007210
MedianTime: 1490007210
UniversalDividend: 1200
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 2
IssuersFrameVar: 4
DifferentIssuersCount: 1
PreviousHash: BC596D988F4EBB142B71BDF72536309A54A4B03BD14E8E71D79E62BD58FFA92B
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
InnerHash: E8444322853C4A75EC891E2011BDF8B9AC742C7FDA84885AEE4586BF26DC86C0
Nonce: 1
c4zYpECnNa99xc8Np/6NXXSo6bK7eGVAdG8QcZE8ZhFZeZjCv0F1Zzeub1ZDnWm4/TvKK9PjpuQBv9tBn9hcAA==
Version: 10
Type: Transaction
Currency: duniter_unit_test_currency
Blockstamp: 2-1AD8408503230986CB3955D4034976CE6128C85BC284B9AE5FAC376DE2C09578
Locktime: 0
Issuers:
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
Inputs:
1200:0:D:DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV:2
Unlocks:
0:SIG(0)
Outputs:
510:0:SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo)
690:0:SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV)
Comment:
Wy2tAKp/aFH2hqZJ5qnUFUNEukFbHwaR4v9gZ/aGoySPfXovDwld9W15w8C0ojVYbma9nlU3eLkVqzVBYz3lAw==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 3
PoWMin: 0
Time: 1490007220
MedianTime: 1490007210
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 3
IssuersFrameVar: 3
DifferentIssuersCount: 1
PreviousHash: 1AD8408503230986CB3955D4034976CE6128C85BC284B9AE5FAC376DE2C09578
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
TX:10:1:1:1:2:0:0
2-1AD8408503230986CB3955D4034976CE6128C85BC284B9AE5FAC376DE2C09578
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
1200:0:D:DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV:2
0:SIG(0)
510:0:SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo)
690:0:SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV)
Wy2tAKp/aFH2hqZJ5qnUFUNEukFbHwaR4v9gZ/aGoySPfXovDwld9W15w8C0ojVYbma9nlU3eLkVqzVBYz3lAw==
InnerHash: 6506C71776D7D7C6C15CC0010A989D24D205945F66C206D8E06682C67288F437
Nonce: 1
cRwDtegxPCc+hD768qz4sdh00+FfOhaWJp5RgrRA207Hn4CHWkQZNQANQf4T120sGbdr7hnjWLx/89ZXNuzPAQ==
Version: 10
Type: Transaction
Currency: duniter_unit_test_currency
Blockstamp: 3-73434C90B0609B5B6A624D63EE1BD763B0E49CBF5D817321D8CA6875772F2260
Locktime: 0
Issuers:
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
Inputs:
1200:0:D:DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo:2
510:0:T:B6DCADFB841AC05A902741A8772A70B4086D5AEAB147AD48987DDC3887DD55C8:0
Unlocks:
0:SIG(0)
1:SIG(0)
Outputs:
1710:0:SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV)
Comment:
coU3A3t0P7UkLQ6+O+utznx7ztLX2BuDtVRQ0ux9fwcRW1VgrOLzLXFTMzSGpUXW2Ad3kJzmfqA4hz2B8tBPCA==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 4
PoWMin: 0
Time: 1490015000
MedianTime: 1490007220
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 4
IssuersFrameVar: 2
DifferentIssuersCount: 1
PreviousHash: 73434C90B0609B5B6A624D63EE1BD763B0E49CBF5D817321D8CA6875772F2260
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
TX:10:1:2:2:1:0:0
3-73434C90B0609B5B6A624D63EE1BD763B0E49CBF5D817321D8CA6875772F2260
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
1200:0:D:DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo:2
510:0:T:B6DCADFB841AC05A902741A8772A70B4086D5AEAB147AD48987DDC3887DD55C8:0
0:SIG(0)
1:SIG(0)
1710:0:SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV)
coU3A3t0P7UkLQ6+O+utznx7ztLX2BuDtVRQ0ux9fwcRW1VgrOLzLXFTMzSGpUXW2Ad3kJzmfqA4hz2B8tBPCA==
InnerHash: 3D9A52CF2287D0AC66B3CFEC8C1E80853CF8B8CE94B608D39849240DD5640656
Nonce: 1
0s2aq4W0Nppt87uZ1Ti7C4hC92pQEtQ0tylOoIDvULiLYIkWKwerBMJ1cpC7L/5QvsNMhOWF/aaOGWm1Fk/eCQ==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 5
PoWMin: 0
Time: 1490015000
MedianTime: 1490015000
UniversalDividend: 1200
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 5
IssuersFrameVar: 1
DifferentIssuersCount: 1
PreviousHash: E0979E56CA47F7CB11C9C7A4D11DF832BF4EE8E1350B57112F7B20B6F07465DC
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
InnerHash: 9C16B7516CE56292A5C542A764530ED02CDEB962593C9C9BCF019BF5FDA11C3B
Nonce: 1
VVcwD8pon9LLVnP3roZmbotcuLogGJqLR9exbMv8mKY9iJEbm00fhQYK/OYCWV8S8Cb5ATjW6uJLTprbolPuAw==
Version: 10
Type: Transaction
Currency: duniter_unit_test_currency
Blockstamp: 5-93909072860FE0D2B7655F99AD0965EE8D935F222D5899348F04889B550AF72A
Locktime: 0
Issuers:
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
Inputs:
1200:0:D:DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo:5
Unlocks:
0:SIG(0)
Outputs:
1200:0:SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV)
Comment:
wxij+l4/38cvlPXBtrDNL6xaewvuhn09wokjbzUlzMWCutqXdQuZSW6xbX0M3SHCxxWRUd7eVzSEejhC219kDQ==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 6
PoWMin: 0
Time: 1490015000
MedianTime: 1490015000
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 6
IssuersFrameVar: 0
DifferentIssuersCount: 1
PreviousHash: 93909072860FE0D2B7655F99AD0965EE8D935F222D5899348F04889B550AF72A
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
TX:10:1:1:1:1:0:0
5-93909072860FE0D2B7655F99AD0965EE8D935F222D5899348F04889B550AF72A
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
1200:0:D:DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo:5
0:SIG(0)
1200:0:SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV)
wxij+l4/38cvlPXBtrDNL6xaewvuhn09wokjbzUlzMWCutqXdQuZSW6xbX0M3SHCxxWRUd7eVzSEejhC219kDQ==
InnerHash: F2711865EBB6A9C5C206791DF287D32B9879757469FAECF87EC75AE89E047716
Nonce: 1
M2+akSJyQXqUl7Xqesnj0RR+Zir+iYELVbYuMJ+iY5dY7plxVMeCROlABjvzXW5LYdz+86RNk6svYTYf40ZECA==
Version: 10
Type: Transaction
Currency: duniter_unit_test_currency
Blockstamp: 6-501593F20FB028233DD8428370A166F7CDEFC5DEA86F75FEC4724219C2F72DA9
Locktime: 0
Issuers:
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
Inputs:
1200:0:T:3BDECD1EFB706242B2FB78D9DA062B6C26190BB2EF4583340BFB4C1E77C3A39B:0
Unlocks:
0:SIG(0)
Outputs:
1200:0:XHX(8AFC8DF633FC158F9DB4864ABED696C1AA0FE5D617A7B5F7AB8DE7CA2EFCD4CB)
Comment: ok
4hGroQkQrXa7qCsIX7Pu1nh50+ggEvmFx3o6ZGZ5Za+b1r8n07GxKOMEMqZjvgSFaMLD+ZCwffRgwQX9JGHzDw==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 7
PoWMin: 0
Time: 1490019840
MedianTime: 1490015000
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 6
IssuersFrameVar: 0
DifferentIssuersCount: 1
PreviousHash: 501593F20FB028233DD8428370A166F7CDEFC5DEA86F75FEC4724219C2F72DA9
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
TX:10:1:1:1:1:1:0
6-501593F20FB028233DD8428370A166F7CDEFC5DEA86F75FEC4724219C2F72DA9
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
1200:0:T:3BDECD1EFB706242B2FB78D9DA062B6C26190BB2EF4583340BFB4C1E77C3A39B:0
0:SIG(0)
1200:0:XHX(8AFC8DF633FC158F9DB4864ABED696C1AA0FE5D617A7B5F7AB8DE7CA2EFCD4CB)
ok
4hGroQkQrXa7qCsIX7Pu1nh50+ggEvmFx3o6ZGZ5Za+b1r8n07GxKOMEMqZjvgSFaMLD+ZCwffRgwQX9JGHzDw==
InnerHash: 5528770B70ABB9DF7C3586BB85FEB4DBC91305E8561FFDDC307F1DD7CD54E63D
Nonce: 1
4zhx226iDDPLAHSopbiDtv8vJjgAC9trZeNfGQCGO8KuDZVm9j7AvQSkzkFfhCf8Vexboncq3rIrczYxTudPDw==
Version: 10
Type: Transaction
Currency: duniter_unit_test_currency
Blockstamp: 6-501593F20FB028233DD8428370A166F7CDEFC5DEA86F75FEC4724219C2F72DA9
Locktime: 0
Issuers:
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
Inputs:
1200:0:T:D99CFD124AF4B8F7449F12236BCB43D808019E500B9A136B3B02121CD4754B82:0
Unlocks:
0:XHX(1872767826647264)
Outputs:
1200:0:SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo)
Comment: okk
TyxJdhgChNIDsSJAwioW8+nqcUzWxW9HtVJs6UMQ6jA9a13paZ9WtqGVKuyRg5vKwJX7MmTACg4sHE4ozsnJAw==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 8
PoWMin: 0
Time: 1490019840
MedianTime: 1490019840
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 6
IssuersFrameVar: 0
DifferentIssuersCount: 1
PreviousHash: B965CB2BC497D26B3414979D0CD15E703946CFE75C8963D7A4CA132DB86E9658
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
TX:10:1:1:1:1:1:0
6-501593F20FB028233DD8428370A166F7CDEFC5DEA86F75FEC4724219C2F72DA9
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
1200:0:T:D99CFD124AF4B8F7449F12236BCB43D808019E500B9A136B3B02121CD4754B82:0
0:XHX(1872767826647264)
1200:0:SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo)
okk
TyxJdhgChNIDsSJAwioW8+nqcUzWxW9HtVJs6UMQ6jA9a13paZ9WtqGVKuyRg5vKwJX7MmTACg4sHE4ozsnJAw==
InnerHash: F2E6363E618CD2873F9B001DCEC46F2CA206800E78D01107E50870F8F1480587
Nonce: 1
Mu/Q1dGLeQVHqUkA/rS5spMw+OvalxF5Ui/vRHGFEFG5I2QhmhgKL7iVXIeVBNK2xCvI8v5pLEvE+47WANMkBA==
Version: 10
Type: Transaction
Currency: duniter_unit_test_currency
Blockstamp: 8-19913E958E06A2817B4B818B5D350C8DB1AA6899D077F7382A6F865B36C734CA
Locktime: 0
Issuers:
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
Inputs:
1200:0:T:F236FBE61EF35259D53FC69C588C5C3A5789E6C599D6F37713685933862B4EFF:0
Unlocks:
0:SIG(0)
Outputs:
1200:0:SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV)
Comment:
sVvasiMr1l4L3FFvGdxdKtKDiAI3T+Q2GfCm2wNVykCFiXoD9B4fjZDWCk1Q1zjYdzIC7iz4sc0BIF5T1XFgCQ==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 9
PoWMin: 0
Time: 1490019840
MedianTime: 1490019840
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 6
IssuersFrameVar: 0
DifferentIssuersCount: 1
PreviousHash: 19913E958E06A2817B4B818B5D350C8DB1AA6899D077F7382A6F865B36C734CA
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
TX:10:1:1:1:1:0:0
8-19913E958E06A2817B4B818B5D350C8DB1AA6899D077F7382A6F865B36C734CA
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
1200:0:T:F236FBE61EF35259D53FC69C588C5C3A5789E6C599D6F37713685933862B4EFF:0
0:SIG(0)
1200:0:SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV)
sVvasiMr1l4L3FFvGdxdKtKDiAI3T+Q2GfCm2wNVykCFiXoD9B4fjZDWCk1Q1zjYdzIC7iz4sc0BIF5T1XFgCQ==
InnerHash: 2160DD6BED42E3387839387AEE73265F61F95BF24C094E4D7C1652E6CBE1C618
Nonce: 1
DANLOBGaDmy80hZtx4O7uqSOZ4KyNwu+M8N1BtpRUDjPHfc51kf+xngC3L/i3SzixhaVvR/TwsJJ20rL3UG9DQ==
Version: 10
Type: Transaction
Currency: duniter_unit_test_currency
Blockstamp: 9-1E5E911391B993B14777C7B57DC83BA1A601703B3752B0453B3F121CEFD6F7A4
Locktime: 0
Issuers:
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
Inputs:
1200:0:T:FCBBC135FF4E5A646B1BA9A80069B7F5D08F2A450D18EABD087B05FF6EB28A6D:0
Unlocks:
0:SIG(0)
Outputs:
1200:0:(XHX(8AFC8DF633FC158F9DB4864ABED696C1AA0FE5D617A7B5F7AB8DE7CA2EFCD4CB) && SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo)) || (SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV) && SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo))
Comment: cross1
PZmBtG3TlmhFx9hlA/iyaZD2N5DQb1SUbQxUU7BL2Xzhg8heDSjL22Ey+f5bqrvKwiWXdqDqdZgMnixN4R7YCg==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 10
PoWMin: 1
Time: 1490019840
MedianTime: 1490019840
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 6
IssuersFrameVar: 0
DifferentIssuersCount: 1
PreviousHash: 1E5E911391B993B14777C7B57DC83BA1A601703B3752B0453B3F121CEFD6F7A4
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 2
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
TX:10:1:1:1:1:1:0
9-1E5E911391B993B14777C7B57DC83BA1A601703B3752B0453B3F121CEFD6F7A4
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
1200:0:T:FCBBC135FF4E5A646B1BA9A80069B7F5D08F2A450D18EABD087B05FF6EB28A6D:0
0:SIG(0)
1200:0:(XHX(8AFC8DF633FC158F9DB4864ABED696C1AA0FE5D617A7B5F7AB8DE7CA2EFCD4CB) && SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo)) || (SIG(DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV) && SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo))
cross1
PZmBtG3TlmhFx9hlA/iyaZD2N5DQb1SUbQxUU7BL2Xzhg8heDSjL22Ey+f5bqrvKwiWXdqDqdZgMnixN4R7YCg==
InnerHash: 7AF4A3E9CDE61F968F2805D3DEBE1D776C663903F549CE438B5BFA4A5E3A67E6
Nonce: 1
2UM5DKeegk3Lp7DMPE8kjle7sSW6iy6BM2T3tmqlYhEcBE7vo19zKopSDdtU+JobwFKgPThOsxpwBsw8pf6VBw==
Version: 10
Type: Transaction
Currency: duniter_unit_test_currency
Blockstamp: 9-1E5E911391B993B14777C7B57DC83BA1A601703B3752B0453B3F121CEFD6F7A4
Locktime: 0
Issuers:
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
Inputs:
1200:0:T:FA123C50B800E5F94CB144FB9EF90964C01595C06EDADC0402FD0D6A9243BC81:0
Unlocks:
0:XHX(1872767826647264) SIG(0)
Outputs:
1200:0:SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo)
Comment: ok
1fUA0Aabcgd4CdYFM/Uhpace9+UmmB4h2QJhpjlGBxgAv2dT/SJ/JhtWcAoxB4RCZuRPwZOy3KwufZElFsllDw==
Version: 10
Type: Revocation
Currency: duniter_unit_test_currency
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IdtyUniqueID: tic
IdtyTimestamp: 0-E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
IdtySignature: 1eubHHbuNfilHMM0G2bI30iZzebQ2cQ1PC7uPAw08FGMMmQCRerlF/3pc4sAcsnexsxBseA/3lY03KlONqJBAg==
AAFSisqkMb/2L4/YmZXQWoKYxnz/PW1c2wbux+ZRe8Iw8dxthPR4Iw+g+/JKA5nPE+C/lkX2YFrIikgUpZdlAA==
Version: 10
Type: Block
Currency: duniter_unit_test_currency
Number: 11
PoWMin: 1
Time: 1490028413
MedianTime: 1490019840
UnitBase: 0
Issuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
IssuersFrame: 6
IssuersFrameVar: 0
DifferentIssuersCount: 1
PreviousHash: A1738EF20615B77B3A1C444ACB0061284B9B6783145845316A06666647F2CC51
PreviousIssuer: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
MembersCount: 1
Identities:
Joiners:
Actives:
Leavers:
Revoked:
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV:AAFSisqkMb/2L4/YmZXQWoKYxnz/PW1c2wbux+ZRe8Iw8dxthPR4Iw+g+/JKA5nPE+C/lkX2YFrIikgUpZdlAA==
Excluded:
DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
Certifications:
Transactions:
TX:10:1:1:1:1:1:0
9-1E5E911391B993B14777C7B57DC83BA1A601703B3752B0453B3F121CEFD6F7A4
DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo
1200:0:T:FA123C50B800E5F94CB144FB9EF90964C01595C06EDADC0402FD0D6A9243BC81:0
0:XHX(1872767826647264) SIG(0)
1200:0:SIG(DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo)
ok
1fUA0Aabcgd4CdYFM/Uhpace9+UmmB4h2QJhpjlGBxgAv2dT/SJ/JhtWcAoxB4RCZuRPwZOy3KwufZElFsllDw==
InnerHash: AB1EAF4E8D05FD535913E8B6D850051353D7CC929CD4276049A248C917BD6B51
Nonce: 1
SxCDyRMeOCzvkU4vm4/qyZf2//CMHmROqAQySUE7fr8ygC2Wmkw2elFk0vHhbC5DRuUs31TTp65Weow+bqLdBg==
Version: 10
Type: Peer
Currency: duniter_unit_test_currency
PublicKey: DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV
Block: 1-BC596D988F4EBB142B71BDF72536309A54A4B03BD14E8E71D79E62BD58FFA92B
Endpoints:
BASIC_MERKLED_API 127.0.0.1 10000
YyNfDXSnFoDJMJuHry1iDXCE1QHiirBM+BUTzB/brQoF+L49G0maihTh3MjEvJfiLlVgos7wVkIIOrE+PwBaCw==
Parfait ! C’est parti pour coder tout ça
Et à la fin, tu dois pouvoir nous raconter l’histoire !
Haha. Je vais essayer, pour l’instant je ne vais coder que la gestion des documents et leur signature
Le protocole affiche les clés en Base58. Est-ce que l’alphabet est bien 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
comme avec le Bitcoin ?
Est-ce que c’est du Base58 pur ou du Base58Check avec un header, le payload et un checksum ?
C’est du Base58 “pur”.
Tu confirmes l’alphabet ? Il n’est pas dans le standard, c’est un détail d’implémentation et d’application. J’ai trouvé une crate qui reprend l’implémentation du Base58 de Trazor (Bitcoin), ça correspond bien ?
Tu aurais moyen de me passer quelques clés publiques et privés sous la forme d’entier et de Base58 pour vérifier que ma conversion est fonctionnelle ?
Je veux bien, mais aussi l’idée n’est pas de t’aider à recoder entièrement Duniter, c’est toi qui fait cette démarche, pas moi
Sur qui ai-je pu vérifier, moi ?
Je t’invite à faire ta vérification avec le parser python, qui est normalement 100% compatible
https://github.com/duniter/duniter-python-api/tree/master/tests/documents
Je suis bien d’accord, et je me débrouillerais quand j’ajouterais de nouvelles fonctionnalités. Mais là, je cherche surtout à être compatible avec l’implémentation actuelle. Quand tu as développé ton protocole, tu as défini ton standard. Je ne peux pas faire de même. J’essaye de suivre au maximum le document du protocole, mais ces informations sont manquantes (à rajouter ?). S’il y a des tests unitaires autour des signatures et des clés, je les veux bien.
Ah ! Je vais regarder ça tout de suite.
EDIT : Je viens de regarder, mais je ne vois pas les clés sous la forme d’un entier/tableau d’octet. L’ai-je manqué ?