mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
Merge branch 'master' of github.com:darkrenaissance/darkfi
This commit is contained in:
@@ -2,6 +2,7 @@ use std::path::PathBuf;
|
|||||||
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
|
use drk::serial::serialize;
|
||||||
use drk::cli::{Config, DrkCli, DrkConfig};
|
use drk::cli::{Config, DrkCli, DrkConfig};
|
||||||
use drk::rpc::jsonrpc;
|
use drk::rpc::jsonrpc;
|
||||||
use drk::rpc::jsonrpc::JsonResult;
|
use drk::rpc::jsonrpc::JsonResult;
|
||||||
@@ -86,11 +87,13 @@ impl Drk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn transfer(&self, address: String, amount: f64) -> Result<()> {
|
pub async fn transfer(&self, address: String, amount: f64) -> Result<()> {
|
||||||
|
let address = serialize(&address);
|
||||||
let r = jsonrpc::request(json!("transfer"), json!([address, amount]));
|
let r = jsonrpc::request(json!("transfer"), json!([address, amount]));
|
||||||
Ok(self.request("transfer", r).await?)
|
Ok(self.request("transfer", r).await?)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn withdraw(&self, address: String, amount: f64) -> Result<()> {
|
pub async fn withdraw(&self, address: String, amount: f64) -> Result<()> {
|
||||||
|
let address = serialize(&address);
|
||||||
let r = jsonrpc::request(json!("withdraw"), json!([address, amount]));
|
let r = jsonrpc::request(json!("withdraw"), json!([address, amount]));
|
||||||
Ok(self.request("withdraw", r).await?)
|
Ok(self.request("withdraw", r).await?)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ use crate::crypto::{
|
|||||||
};
|
};
|
||||||
use crate::rpc::adapters::{RpcClient, RpcClientAdapter};
|
use crate::rpc::adapters::{RpcClient, RpcClientAdapter};
|
||||||
use crate::rpc::jsonserver;
|
use crate::rpc::jsonserver;
|
||||||
|
use crate::serial::Decodable;
|
||||||
use crate::serial::Encodable;
|
use crate::serial::Encodable;
|
||||||
use crate::serial::{deserialize, Decodable};
|
|
||||||
use crate::service::{CashierClient, GatewayClient, GatewaySlabsSubscriber};
|
use crate::service::{CashierClient, GatewayClient, GatewaySlabsSubscriber};
|
||||||
use crate::state::{state_transition, ProgramState, StateUpdate};
|
use crate::state::{state_transition, ProgramState, StateUpdate};
|
||||||
use crate::wallet::{CashierDbPtr, WalletPtr};
|
use crate::wallet::{CashierDbPtr, WalletPtr};
|
||||||
@@ -127,21 +127,14 @@ impl Client {
|
|||||||
pub async fn transfer(
|
pub async fn transfer(
|
||||||
self: &mut Self,
|
self: &mut Self,
|
||||||
asset_id: u64,
|
asset_id: u64,
|
||||||
pub_key: String,
|
pub_key: jubjub::SubgroupPoint,
|
||||||
amount: f64,
|
amount: f64,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let address = bs58::decode(pub_key.clone())
|
|
||||||
.into_vec()
|
|
||||||
.map_err(|_| ClientFailed::UnvalidAddress(pub_key.clone()))?;
|
|
||||||
|
|
||||||
let address: jubjub::SubgroupPoint =
|
|
||||||
deserialize(&address).map_err(|_| ClientFailed::UnvalidAddress(pub_key))?;
|
|
||||||
|
|
||||||
if amount <= 0.0 {
|
if amount <= 0.0 {
|
||||||
return Err(ClientFailed::UnvalidAmount(amount as u64).into());
|
return Err(ClientFailed::UnvalidAmount(amount as u64).into());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.send(address.clone(), amount.clone() as u64, asset_id, false)
|
self.send(pub_key.clone(), amount.clone() as u64, asset_id, false)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::client::{Client, ClientFailed};
|
use crate::client::{Client, ClientFailed};
|
||||||
use crate::serial::{deserialize, serialize};
|
use crate::serial::{deserialize, serialize, Decodable};
|
||||||
use crate::service::CashierClient;
|
use crate::service::CashierClient;
|
||||||
use crate::{Error, Result};
|
use crate::{Error, Result};
|
||||||
|
|
||||||
@@ -31,11 +31,11 @@ pub trait RpcClient {
|
|||||||
|
|
||||||
/// transfer
|
/// transfer
|
||||||
#[rpc(name = "transfer")]
|
#[rpc(name = "transfer")]
|
||||||
fn transfer(&self, asset_id: u64, pub_key: String, amount: f64) -> BoxFuture<Result<String>>;
|
fn transfer(&self, asset_id: u64, pub_key: Vec<u8>, amount: f64) -> BoxFuture<Result<String>>;
|
||||||
|
|
||||||
/// withdraw
|
/// withdraw
|
||||||
#[rpc(name = "withdraw")]
|
#[rpc(name = "withdraw")]
|
||||||
fn withdraw(&self, asset_id: u64, pub_key: String, amount: f64) -> BoxFuture<Result<String>>;
|
fn withdraw(&self, asset_id: u64, pub_key: Vec<u8>, amount: f64) -> BoxFuture<Result<String>>;
|
||||||
|
|
||||||
/// deposit
|
/// deposit
|
||||||
#[rpc(name = "deposit")]
|
#[rpc(name = "deposit")]
|
||||||
@@ -76,9 +76,17 @@ impl RpcClientAdapter {
|
|||||||
async fn transfer_process(
|
async fn transfer_process(
|
||||||
client: Arc<Mutex<Client>>,
|
client: Arc<Mutex<Client>>,
|
||||||
asset_id: u64,
|
asset_id: u64,
|
||||||
address: String,
|
address: Vec<u8>,
|
||||||
amount: f64,
|
amount: f64,
|
||||||
) -> Result<String> {
|
) -> Result<String> {
|
||||||
|
let pub_key: String = deserialize(&address)?;
|
||||||
|
let address = bs58::decode(pub_key.clone())
|
||||||
|
.into_vec()
|
||||||
|
.map_err(|_| ClientFailed::UnvalidAddress(pub_key.clone()))?;
|
||||||
|
|
||||||
|
let address: jubjub::SubgroupPoint =
|
||||||
|
deserialize(&address).map_err(|_| ClientFailed::UnvalidAddress(pub_key))?;
|
||||||
|
|
||||||
client
|
client
|
||||||
.lock()
|
.lock()
|
||||||
.await
|
.await
|
||||||
@@ -92,7 +100,7 @@ impl RpcClientAdapter {
|
|||||||
client: Arc<Mutex<Client>>,
|
client: Arc<Mutex<Client>>,
|
||||||
cashier_client: Arc<Mutex<CashierClient>>,
|
cashier_client: Arc<Mutex<CashierClient>>,
|
||||||
asset_id: u64,
|
asset_id: u64,
|
||||||
address: String,
|
address: Vec<u8>,
|
||||||
amount: f64,
|
amount: f64,
|
||||||
) -> Result<String> {
|
) -> Result<String> {
|
||||||
let drk_public = cashier_client
|
let drk_public = cashier_client
|
||||||
@@ -103,8 +111,6 @@ impl RpcClientAdapter {
|
|||||||
.map_err(|err| ClientFailed::from(err))?;
|
.map_err(|err| ClientFailed::from(err))?;
|
||||||
|
|
||||||
if let Some(drk_addr) = drk_public {
|
if let Some(drk_addr) = drk_public {
|
||||||
let drk_addr = bs58::encode(serialize(&drk_addr)).into_string();
|
|
||||||
|
|
||||||
client
|
client
|
||||||
.lock()
|
.lock()
|
||||||
.await
|
.await
|
||||||
@@ -120,11 +126,14 @@ impl RpcClientAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn deposit_process(
|
async fn deposit_process<T>(
|
||||||
client: Arc<Mutex<Client>>,
|
client: Arc<Mutex<Client>>,
|
||||||
cashier_client: Arc<Mutex<CashierClient>>,
|
cashier_client: Arc<Mutex<CashierClient>>,
|
||||||
asset_id: u64,
|
asset_id: u64,
|
||||||
) -> Result<String> {
|
) -> Result<String>
|
||||||
|
where
|
||||||
|
T: Decodable + ToString,
|
||||||
|
{
|
||||||
let deposit_addr = client.lock().await.state.wallet.get_public_keys()?[0];
|
let deposit_addr = client.lock().await.state.wallet.get_public_keys()?[0];
|
||||||
let coin_public = cashier_client
|
let coin_public = cashier_client
|
||||||
.lock()
|
.lock()
|
||||||
@@ -134,7 +143,8 @@ impl RpcClientAdapter {
|
|||||||
.map_err(|err| ClientFailed::from(err))?;
|
.map_err(|err| ClientFailed::from(err))?;
|
||||||
|
|
||||||
if let Some(coin_addr) = coin_public {
|
if let Some(coin_addr) = coin_public {
|
||||||
return Ok(deserialize(&coin_addr)?);
|
let pub_k: T = deserialize(&coin_addr)?;
|
||||||
|
return Ok(pub_k.to_string());
|
||||||
} else {
|
} else {
|
||||||
return Err(Error::from(ClientFailed::UnableToGetDepositAddress));
|
return Err(Error::from(ClientFailed::UnableToGetDepositAddress));
|
||||||
}
|
}
|
||||||
@@ -162,12 +172,12 @@ impl RpcClient for RpcClientAdapter {
|
|||||||
Self::key_gen_process(self.client.clone()).boxed()
|
Self::key_gen_process(self.client.clone()).boxed()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn transfer(&self, asset_id: u64, pub_key: String, amount: f64) -> BoxFuture<Result<String>> {
|
fn transfer(&self, asset_id: u64, pub_key: Vec<u8>, amount: f64) -> BoxFuture<Result<String>> {
|
||||||
debug!(target: "RPC USER ADAPTER", "transfer() [START]");
|
debug!(target: "RPC USER ADAPTER", "transfer() [START]");
|
||||||
Self::transfer_process(self.client.clone(), asset_id, pub_key, amount).boxed()
|
Self::transfer_process(self.client.clone(), asset_id, pub_key, amount).boxed()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn withdraw(&self, asset_id: u64, pub_key: String, amount: f64) -> BoxFuture<Result<String>> {
|
fn withdraw(&self, asset_id: u64, pub_key: Vec<u8>, amount: f64) -> BoxFuture<Result<String>> {
|
||||||
debug!(target: "RPC USER ADAPTER", "withdraw() [START]");
|
debug!(target: "RPC USER ADAPTER", "withdraw() [START]");
|
||||||
Self::withdraw_process(
|
Self::withdraw_process(
|
||||||
self.client.clone(),
|
self.client.clone(),
|
||||||
@@ -181,6 +191,12 @@ impl RpcClient for RpcClientAdapter {
|
|||||||
|
|
||||||
fn deposit(&self, asset_id: u64) -> BoxFuture<Result<String>> {
|
fn deposit(&self, asset_id: u64) -> BoxFuture<Result<String>> {
|
||||||
debug!(target: "RPC USER ADAPTER", "deposit() [START]");
|
debug!(target: "RPC USER ADAPTER", "deposit() [START]");
|
||||||
Self::deposit_process(self.client.clone(), self.cashier_client.clone(), asset_id).boxed()
|
#[cfg(feature = "default")]
|
||||||
|
Self::deposit_process::<bitcoin::PublicKey>(
|
||||||
|
self.client.clone(),
|
||||||
|
self.cashier_client.clone(),
|
||||||
|
asset_id,
|
||||||
|
)
|
||||||
|
.boxed()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
use crate::serial::{Decodable, Encodable};
|
|
||||||
use crate::Result;
|
|
||||||
use super::bridge::CoinClient;
|
use super::bridge::CoinClient;
|
||||||
|
use crate::serial::{Decodable, Encodable, serialize};
|
||||||
|
use crate::Result;
|
||||||
|
|
||||||
|
use async_trait::async_trait;
|
||||||
use bitcoin::blockdata::script::Script;
|
use bitcoin::blockdata::script::Script;
|
||||||
use bitcoin::network::constants::Network;
|
use bitcoin::network::constants::Network;
|
||||||
use bitcoin::util::address::Address;
|
use bitcoin::util::address::Address;
|
||||||
@@ -11,7 +12,6 @@ use log::*;
|
|||||||
use rand::distributions::Alphanumeric;
|
use rand::distributions::Alphanumeric;
|
||||||
use rand::{thread_rng, Rng};
|
use rand::{thread_rng, Rng};
|
||||||
use secp256k1::key::SecretKey;
|
use secp256k1::key::SecretKey;
|
||||||
use async_trait::async_trait;
|
|
||||||
|
|
||||||
use async_std::sync::Arc;
|
use async_std::sync::Arc;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
@@ -132,50 +132,6 @@ impl BitcoinKeys {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Encodable for bitcoin::Address {
|
|
||||||
fn encode<S: std::io::Write>(&self, s: S) -> Result<usize> {
|
|
||||||
let addr = self.to_string();
|
|
||||||
let len = addr.encode(s)?;
|
|
||||||
Ok(len)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Decodable for bitcoin::Address {
|
|
||||||
fn decode<D: std::io::Read>(mut d: D) -> Result<Self> {
|
|
||||||
let addr: String = Decodable::decode(&mut d)?;
|
|
||||||
let addr = bitcoin::Address::from_str(&addr)
|
|
||||||
.map_err(|err| crate::Error::from(BtcFailed::from(err)))?;
|
|
||||||
Ok(addr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub enum BtcFailed {
|
|
||||||
NotEnoughValue(u64),
|
|
||||||
BadBTCAddress(String),
|
|
||||||
ElectrumError(String),
|
|
||||||
BtcError(String),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl std::error::Error for BtcFailed {}
|
|
||||||
|
|
||||||
impl std::fmt::Display for BtcFailed {
|
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
|
||||||
match self {
|
|
||||||
BtcFailed::NotEnoughValue(i) => {
|
|
||||||
write!(f, "There is no enough value {}", i)
|
|
||||||
}
|
|
||||||
BtcFailed::BadBTCAddress(ref err) => {
|
|
||||||
write!(f, "Unable to create Electrum Client: {}", err)
|
|
||||||
}
|
|
||||||
BtcFailed::ElectrumError(ref err) => write!(f, "could not parse BTC address: {}", err),
|
|
||||||
BtcFailed::BtcError(i) => {
|
|
||||||
write!(f, "BtcFailed: {}", i)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pub struct BtcClient {
|
pub struct BtcClient {
|
||||||
client: Arc<ElectrumClient>,
|
client: Arc<ElectrumClient>,
|
||||||
@@ -209,14 +165,97 @@ impl CoinClient for BtcClient {
|
|||||||
//let _script = btc_keys.get_script();
|
//let _script = btc_keys.get_script();
|
||||||
//
|
//
|
||||||
|
|
||||||
Ok((btc_priv.to_bytes(), btc_pub.to_bytes()))
|
Ok((serialize(&btc_priv.to_bytes()), serialize(&btc_pub.to_bytes())))
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn send(&self, _address: Vec<u8>, _amount: u64) -> Result<()> {
|
async fn send(&self, _address: Vec<u8>, _amount: u64) -> Result<()> {
|
||||||
// TODO
|
// TODO
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Encodable for bitcoin::Address {
|
||||||
|
fn encode<S: std::io::Write>(&self, s: S) -> Result<usize> {
|
||||||
|
let addr = self.to_string();
|
||||||
|
let len = addr.encode(s)?;
|
||||||
|
Ok(len)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Decodable for bitcoin::Address {
|
||||||
|
fn decode<D: std::io::Read>(mut d: D) -> Result<Self> {
|
||||||
|
let addr: String = Decodable::decode(&mut d)?;
|
||||||
|
let addr = bitcoin::Address::from_str(&addr)
|
||||||
|
.map_err(|err| crate::Error::from(BtcFailed::from(err)))?;
|
||||||
|
Ok(addr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Encodable for bitcoin::PublicKey {
|
||||||
|
fn encode<S: std::io::Write>(&self, s: S) -> Result<usize> {
|
||||||
|
let key = self.to_bytes();
|
||||||
|
let len = key.encode(s)?;
|
||||||
|
Ok(len)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Decodable for bitcoin::PublicKey {
|
||||||
|
fn decode<D: std::io::Read>(mut d: D) -> Result<Self> {
|
||||||
|
let key: Vec<u8> = Decodable::decode(&mut d)?;
|
||||||
|
let key = bitcoin::PublicKey::from_slice(&key)
|
||||||
|
.map_err(|err| crate::Error::from(BtcFailed::from(err)))?;
|
||||||
|
Ok(key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Encodable for bitcoin::PrivateKey {
|
||||||
|
fn encode<S: std::io::Write>(&self, s: S) -> Result<usize> {
|
||||||
|
let key = self.to_bytes();
|
||||||
|
let len = key.encode(s)?;
|
||||||
|
Ok(len)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Decodable for bitcoin::PrivateKey {
|
||||||
|
fn decode<D: std::io::Read>(mut d: D) -> Result<Self> {
|
||||||
|
let key: Vec<u8> = Decodable::decode(&mut d)?;
|
||||||
|
let key = bitcoin::PrivateKey::from_slice(&key, Network::Testnet)
|
||||||
|
.map_err(|err| crate::Error::from(BtcFailed::from(err)))?;
|
||||||
|
Ok(key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub enum BtcFailed {
|
||||||
|
NotEnoughValue(u64),
|
||||||
|
BadBTCAddress(String),
|
||||||
|
ElectrumError(String),
|
||||||
|
BtcError(String),
|
||||||
|
DecodeAndEncodeError(String),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::error::Error for BtcFailed {}
|
||||||
|
|
||||||
|
impl std::fmt::Display for BtcFailed {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
BtcFailed::NotEnoughValue(i) => {
|
||||||
|
write!(f, "There is no enough value {}", i)
|
||||||
|
}
|
||||||
|
BtcFailed::BadBTCAddress(ref err) => {
|
||||||
|
write!(f, "Unable to create Electrum Client: {}", err)
|
||||||
|
}
|
||||||
|
BtcFailed::ElectrumError(ref err) => write!(f, "could not parse BTC address: {}", err),
|
||||||
|
BtcFailed::DecodeAndEncodeError(ref err) => write!(f, "Decode and decode keys error: {}", err),
|
||||||
|
BtcFailed::BtcError(i) => {
|
||||||
|
write!(f, "BtcFailed: {}", i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
impl From<crate::error::Error> for BtcFailed {
|
impl From<crate::error::Error> for BtcFailed {
|
||||||
fn from(err: crate::error::Error) -> BtcFailed {
|
fn from(err: crate::error::Error) -> BtcFailed {
|
||||||
BtcFailed::BtcError(err.to_string())
|
BtcFailed::BtcError(err.to_string())
|
||||||
@@ -234,6 +273,12 @@ impl From<electrum_client::Error> for BtcFailed {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<bitcoin::util::key::Error> for BtcFailed {
|
||||||
|
fn from(err: bitcoin::util::key::Error) -> BtcFailed {
|
||||||
|
BtcFailed::DecodeAndEncodeError(err.to_string())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub type BtcResult<T> = std::result::Result<T, BtcFailed>;
|
pub type BtcResult<T> = std::result::Result<T, BtcFailed>;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|||||||
@@ -238,14 +238,13 @@ impl CashierService {
|
|||||||
}
|
}
|
||||||
1 => {
|
1 => {
|
||||||
debug!(target: "CASHIER DAEMON", "Received withdraw request");
|
debug!(target: "CASHIER DAEMON", "Received withdraw request");
|
||||||
let (asset_id, coin_address): (u64, String) = deserialize(&request.get_payload())?;
|
let (asset_id, coin_address): (u64, Vec<u8>) = deserialize(&request.get_payload())?;
|
||||||
//let btc_address: String = deserialize(&btc_address)?;
|
//let btc_address: String = deserialize(&btc_address)?;
|
||||||
//let btc_address = bitcoin::util::address::Address::from_str(&btc_address)
|
//let btc_address = bitcoin::util::address::Address::from_str(&btc_address)
|
||||||
// .map_err(|err| crate::Error::from(super::BtcFailed::from(err)))?;
|
// .map_err(|err| crate::Error::from(super::BtcFailed::from(err)))?;
|
||||||
//
|
//
|
||||||
|
|
||||||
let asset_id = serialize(&asset_id);
|
let asset_id = serialize(&asset_id);
|
||||||
let coin_address = serialize(&coin_address);
|
|
||||||
|
|
||||||
let cashier_public: jubjub::SubgroupPoint;
|
let cashier_public: jubjub::SubgroupPoint;
|
||||||
|
|
||||||
@@ -301,7 +300,7 @@ impl CashierClient {
|
|||||||
pub async fn withdraw(
|
pub async fn withdraw(
|
||||||
&mut self,
|
&mut self,
|
||||||
asset_id: u64,
|
asset_id: u64,
|
||||||
coin_address: String,
|
coin_address: Vec<u8>,
|
||||||
) -> Result<Option<jubjub::SubgroupPoint>> {
|
) -> Result<Option<jubjub::SubgroupPoint>> {
|
||||||
let handle_error = Arc::new(handle_error);
|
let handle_error = Arc::new(handle_error);
|
||||||
let rep = self
|
let rep = self
|
||||||
|
|||||||
37
todo.md
37
todo.md
@@ -46,9 +46,42 @@
|
|||||||
- [x] darkfid: state transition function
|
- [x] darkfid: state transition function
|
||||||
- [x] darkfid: send tx data to rocksdb
|
- [x] darkfid: send tx data to rocksdb
|
||||||
|
|
||||||
# blockchain
|
# research
|
||||||
|
|
||||||
- [ ]
|
Open research questions.
|
||||||
|
|
||||||
|
## light-clients
|
||||||
|
|
||||||
|
- [ ] Fast efficient batch DH technique. Currently all new transactions need to be scanned. There should be a means of efficiently batching this test for light clients initially syncing against a server.
|
||||||
|
- [ ] Anonymouse fetch using an Oblivious-Transfer protocol. Light clients potentially leak info to servers based on the data they request, but with an OT protocol they do not reveal exactly what they are requesting.
|
||||||
|
|
||||||
|
## cryptography
|
||||||
|
|
||||||
|
- [ ] FFT for polynomial multiplication
|
||||||
|
- [ ] finish bulletproofs impl
|
||||||
|
|
||||||
|
## blockchain
|
||||||
|
|
||||||
|
- [ ] basic sequencer architecture design
|
||||||
|
- [ ] basic DHT design
|
||||||
|
- [ ] consensus algorithm
|
||||||
|
- [ ] solve double verify problem (potentially need need a payment inside the contract to handle exceptions)
|
||||||
|
- [ ] research polygon design
|
||||||
|
- [ ] code up a simple demo
|
||||||
|
|
||||||
|
## product
|
||||||
|
|
||||||
|
- [ ] first MPC services
|
||||||
|
- [ ] DAO
|
||||||
|
- [ ] auctions
|
||||||
|
- [ ] staking. Look up how TORN was distributed anonymously.
|
||||||
|
- [ ] swaps
|
||||||
|
- [ ] token issuance
|
||||||
|
- [ ] NFTs
|
||||||
|
|
||||||
|
## dev
|
||||||
|
|
||||||
|
- [ ] make bitreich halo2 impl
|
||||||
|
|
||||||
# halo2
|
# halo2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user