35个版本
0.2.3 | 2024年7月29日 |
---|---|
0.2.2 | 2024年7月8日 |
0.2.1 | 2024年6月4日 |
0.1.26 | 2024年6月13日 |
0.1.2 | 2024年3月28日 |
#176 in 网络编程
每月256次下载
510KB
9K SLoC
sn_auditor
这是一个小型网络服务器应用程序,允许您通过收集网络上的Spends DAG来审计SAFE网络货币。
用法
运行审计实例
# on a Network with known peers
cargo run --release --peer "/ip4/<network_peer_addr>"
# on a local testnet
cargo run --release --features=local-discovery
它可以使用以下标志运行
-f, --force-from-genesis
Force the spend DAG to be updated from genesis
-c, --clean
Clear the local spend DAG and start from scratch
-o, --offline-viewer <dag_file>
Visualize a local DAG file offline, does not connect to the Network
-b, --beta-participants <discord_names_file>
Beta rewards program participants to track
Provide a file with a list of Discord
usernames as argument
-k, --beta-encryption-key <hex_secret_key>
Secret encryption key of the beta rewards to decypher
discord usernames of the beta participants
以下环境变量
# time in seconds UTXOs are refetched in DAG crawl
UTXO_REATTEMPT_INTERVAL=3600
端点
网络服务器监听端口 4242
并有以下端点
路由 | 描述 |
---|---|
"/" |
svg DAG的代码表示 |
"/spend/<addr>" |
json 关于在此 addr 的spend的信息 |
"/beta-rewards" |
json beta奖励参与者列表 |
注意,要使 "/"
端点正常工作,您需要
- 安装 graphviz
- 启用
svg-dag
功能标志(使用cargo run --release --features=svg-dag
)
依赖项
~55–92MB
~2M SLoC