Open feliciss opened 10 months ago
Someone is attempting to deploy a commit to the Rooch Team on Vercel.
A member of the Team first needs to authorize it.
Split this PR into two PRs.
This PR is currently a mirror of nostr-rs-relay. The command line output of running a rooch relay start
is as below:
RUST_LOG=warn,rooch_ws_relay=info rooch relay start &
[1] 45067
2023-07-06T19:16:22.260188Z INFO rooch_ws_relay: listening on: 0.0.0.0:8080
2023-07-06T19:16:22.264771Z INFO rooch_ws_relay::repo::sqlite: Built a connection pool "writer" (min=0, max=2)
2023-07-06T19:16:22.265047Z INFO rooch_ws_relay::repo::sqlite: Built a connection pool "maintenance" (min=0, max=2)
2023-07-06T19:16:22.265510Z INFO rooch_ws_relay::repo::sqlite: Built a connection pool "reader" (min=4, max=8)
2023-07-06T19:16:22.266309Z INFO rooch_ws_relay::repo::sqlite_migration: DB version = 0
2023-07-06T19:16:22.268365Z INFO rooch_ws_relay::repo::sqlite_migration: database pragma/schema initialized to v18, and ready
2023-07-06T19:16:22.268389Z INFO rooch_ws_relay::repo::sqlite_migration: All migration scripts completed successfully. Welcome to v18.
2023-07-06T19:16:22.268601Z INFO rooch_ws_relay: db writer created
2023-07-06T19:16:22.268692Z INFO rooch_ws_relay: control message listener started
2023-07-06T19:17:22.272455Z INFO rooch_ws_relay::repo::sqlite: checkpoint ran in 203.583µs (result: Ok, WAL size: 0)
2023-07-06T19:18:22.276296Z INFO rooch_ws_relay::repo::sqlite: checkpoint ran in 87.917µs (result: Ok, WAL size: 0)
2023-07-06T19:19:22.280120Z INFO rooch_ws_relay::repo::sqlite: checkpoint ran in 133.333µs (result: Ok, WAL size: 0)
2023-07-06T19:20:22.284054Z INFO rooch_ws_relay::repo::sqlite: checkpoint ran in 130.75µs (result: Ok, WAL size: 0)
2023-07-06T19:21:22.288332Z INFO rooch_ws_relay::repo::sqlite: checkpoint ran in 147.167µs (result: Ok, WAL size: 0)
I will do further research to improve it, store in Rooch in-memory DB or Rooch embedded DBs.
Maybe we should rename it to rooch relay serve
?
Is it possible to store the event in the Move contract state?
Is it possible to store the event in the Move contract state?
I think it is, and it's only meaningful for payment chain events made with LNbits.com? Others have little incentive to do so with SMT state storage, expect it's made for proof of statement purposes, such as posts and messages.
I can try with replacing sqlite with StateDB with new_with_memory_store() to check if it's possible to store in contract state.
Is it possible to store the event in the Move contract state?
It's perfectly to implement StateDB, EventStore and TransactionDB under moveos-store
directory for state merkle trees and proofs through hypercore: https://docs.holepunch.to/building-blocks/hypercore.
Its Rust implementation is at https://docs.rs/hypercore/latest/hypercore/.
It can be used for sharing large datasets and streams of real-time data, as an example of nostr.
Is it possible to store the event in the Move contract state?
It's perfectly to implement StateDB, EventStore and TransactionDB under
moveos-store
directory for state merkle trees and proofs through hypercore: https://docs.holepunch.to/building-blocks/hypercore.Its Rust implementation is at https://docs.rs/hypercore/latest/hypercore/.
It can be used for sharing large datasets and streams of real-time data, as an example of nostr.
It may be suited for syncing the transaction between sequencers and proposers when we build the p2p network layer2. @baichuan3 @templexxx
But in this PR, we try to reuse rooch infrastructure to implement the nostr protocol.
This PR drafts:
Resolves #407