Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

lfg #1

Open
plebhash opened this issue Nov 28, 2023 · 10 comments
Open

lfg #1

plebhash opened this issue Nov 28, 2023 · 10 comments

Comments

@plebhash
Copy link
Member

ping @a-moreira @Davidson-Souza

@Davidson-Souza
Copy link

Opa, agora estamos conversando... Qual o plano aqui?

@plebhash
Copy link
Member Author

plebhash commented Nov 28, 2023

em breve SRI vai exportar essas crates como libs:

entao, poderemos fazer:

Cargo.toml:

[package]
name = "plebpool"

[dependencies]
pool_sv2 = { git = "https://github.com/stratum-mining/stratum.git", branch = "dev" }
jd_server = { git = "https://github.com/stratum-mining/stratum.git", branch = "dev" }

src/main.rs:

pub use pool_sv2::lib::*;
pub use jd_server::lib::*;

fn main() {
    println!("⛏️ plebs be hashin ⚡");
    // opinionated share accounting logic using pool_sv2::lib
    // opinionated coinbase generation logic using jd_server::lib
}

onde opinionated * traduz-se na forma com que vamos definir as politicas da pool.

Por exemplo, para o problema de coinbase generation (jd_server::lib) temos as seguintes opções:

  • P2PK
  • P2PKH
  • P2WPKH
  • P2TR
  • P2SH
  • P2WSH

Alem disso, outra decisao opinionada sobre o uso de jd_server::lib e pool_sv::lib seria a estrategia de distribuicao dos rewards:

  • quem leva taxas, em que proporcao (solo vs proporcional)
  • quem leva subsidios, em que proporcao (solo vs proporcional)
  • caso haja distribuicao de rewards baseado em shares, a forma como as shares sao contabilizadas

@plebhash
Copy link
Member Author

plebhash commented Nov 28, 2023

Uma grande referencia de pool adotando SV2 eh a DEMAND.

@plebhash
Copy link
Member Author

plebhash commented Nov 28, 2023

pra contabilizacao de shares, o caminho ideal (IMHO) é via consenso distribuido (e.g.: braidpool)

to propondo uma solucao baseada em IPVM aqui: #2

@plebhash
Copy link
Member Author

plebhash commented Nov 29, 2023

guia de testes do Stratum Reference Implementation (SRI): https://docs.google.com/document/d/1VeZRMhEt-gilXGIrvoGRtg6laekz6nOoU15dBC681Vw/edit#heading=h.tkf0gahfjga4

@plebhash
Copy link
Member Author

plebhash commented Nov 30, 2023

derivacao nix pra rodar um TP pra SRI via regtest: https://github.com/plebhash/nix-bitcoin-regtest-tp-stratum

@plebhash
Copy link
Member Author

plebhash commented Dec 2, 2023

@plebhash
Copy link
Member Author

referencia: SmartPool https://eprint.iacr.org/2017/019

@a-moreira
Copy link
Member

as crates ja tao publicadas?

@plebhash
Copy link
Member Author

plebhash commented Jan 23, 2024

as crates ja tao publicadas?

quais crates? do SRI?

esse PR provavelmente deve ser mergeado essa semana: stratum-mining/stratum#718

ele esta disponibilizando as libs pra consumo externo, mas as APIs ainda impoem um design opinionado na pool que estiver consumindo

o proximo passo vai ser refatorar as APIs pra que elas permitam mais liberdade pra quem esta consumindo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants