mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-23 04:36:50 +00:00
Proxy private keys are now SHA256(shared secret only) instead of SHA256(shared secret + public keys).
HTML/JS in src/test/resources/proxy-key-example.html updated accordingly. Add handshake status to output of API call GET /peers Add/correct @ApiErrors annotations on some API calls. Add API call POST /admin/orphan (target height as body) to force blockchain orphaning for when node is wildly out of sync. Added support for above to BlockChain class. BlockGenerator now requires a minimum number of peers before it will generate any new blocks. See "minBlockchainPeers" in settings. Controller now requires a minimum number of peers before it will consider synchronizing. See "minBlockchainPeers" in settings. Old "minPeers" entry in settings.json no longer valid! Networking now allows both an outbound and inbound connection to a peer although will use the outbound connection in preference. Networking checks peer ID of inbound connections to detect, and resolve, peer ID clashes/theft.
This commit is contained in:
17
src/test/java/org/qora/test/GuiTests.java
Normal file
17
src/test/java/org/qora/test/GuiTests.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.qora.test;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.qora.gui.SplashFrame;
|
||||
|
||||
public class GuiTests {
|
||||
|
||||
@Test
|
||||
public void testSplashFrame() throws InterruptedException {
|
||||
SplashFrame splashFrame = SplashFrame.getInstance();
|
||||
|
||||
Thread.sleep(2000L);
|
||||
|
||||
splashFrame.dispose();
|
||||
}
|
||||
|
||||
}
|
@@ -25,18 +25,8 @@
|
||||
var sharedSecret = nacl.crypto_scalarmult(mintingX25519Prk, recipientAccountX25519Puk);
|
||||
console.log("shared secret (for debugging): " + Base58.encode(sharedSecret));
|
||||
|
||||
// Data to be hashed: shared secret (32 bytes) + minting public key (32 bytes) + recipient public key (32 bytes)
|
||||
// or, in general terms: shared secret (32 bytes) + public key from private key (32 bytes) + other party's public key (32 bytes)
|
||||
var proxyHashData = new Uint8Array(sharedSecret.length + mintingAccountPuk.length + recipientAccountPuk.length);
|
||||
// copy shared secret into array, starting at index 0
|
||||
proxyHashData.set(sharedSecret);
|
||||
// copy minting account public key into array, starting at index 32
|
||||
proxyHashData.set(mintingAccountPuk, sharedSecret.length);
|
||||
// copy recipient account public key into array, starting at index 64 (32 + 32)
|
||||
proxyHashData.set(recipientAccountPuk, sharedSecret.length + mintingAccountPuk.length);
|
||||
|
||||
// Proxy PRIVATE key is SHA256 of data above
|
||||
var proxyPrivateKey = nacl.crypto_hash_sha256(proxyHashData)
|
||||
// Proxy PRIVATE key is SHA256 of shared secret
|
||||
var proxyPrivateKey = nacl.crypto_hash_sha256(sharedSecret)
|
||||
console.log("proxy private key: " + Base58.encode(proxyPrivateKey));
|
||||
|
||||
var proxyKeyPair = nacl.crypto_sign_seed_keypair(proxyPrivateKey);
|
||||
|
Reference in New Issue
Block a user