build: sync grin node + wallet submodules to GRIM upstream
Adopt GRIM's restructure (upstream 20db758, 2ebc8ba, 3e4a3db): the
separate `node` submodule is gone; the grin node crates now live inside
the wallet submodule at wallet/grin (a nested submodule pinned to
ardocrat/node grim tip). Pins now match upstream GRIM master exactly:
wallet = 32e132a45470d01a105fcab263e4970bc8eaff40 (ardocrat/wallet grim)
node = 7ae52bc6991da00443b40ce96f1afbe675023f6d (nested wallet/grin)
Changes:
- .gitmodules: drop the node submodule; wallet now carries nested grin.
- Cargo.toml: grin_* paths node/* -> wallet/grin/*; uuid 0.8.2 -> 1.23.4
(the new wallet API exposes uuid 1.x in its public signatures, e.g.
retrieve_payment_proof/slate ids -- forced bump, matches upstream).
- src/wallet/wallet.rs + src/node/node.rs: adapt to new upstream APIs --
HTTPNodeClient::new/new_proxy now take a request timeout; Server/ApiServer
api_chan is a tokio mpsc channel instead of a leaked futures oneshot.
Seed-at-rest is unchanged across the wallet bump: impls/lifecycle/seed.rs
is byte-identical (PBKDF2-HMAC-SHA512, 100 iters) and the node keychain
mnemonic derivation is byte-identical, so existing wallets/funds are safe.
Goblin's additive layers are untouched: money path runs over nostr (no
Tor send/pay/finalize tasks), the custom Tor engine stays on arti 0.43,
and the soft-lock work is preserved.
cargo check clean (1 pre-existing crate::node::Node warning); lib tests
280 pass / 1 ignored, i18n_keys 2 pass -- unchanged from baseline.
(cherry picked from commit eb37e66a990b537ad65db2b3438a467e1100d7ef)
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
[submodule "node"]
|
||||
path = node
|
||||
url = https://code.gri.mw/ardocrat/node
|
||||
[submodule "wallet"]
|
||||
path = wallet
|
||||
url = https://code.gri.mw/ardocrat/wallet
|
||||
|
||||
Generated
+2247
-1083
File diff suppressed because it is too large
Load Diff
+9
-9
@@ -42,14 +42,14 @@ e2e-internal = []
|
||||
log = "0.4.27"
|
||||
|
||||
# node
|
||||
grin_api = { path = "node/api" }
|
||||
grin_chain = { path = "node/chain" }
|
||||
grin_config = { path = "node/config" }
|
||||
grin_core = { path = "node/core" }
|
||||
grin_p2p = { path = "node/p2p" }
|
||||
grin_servers = { path = "node/servers" }
|
||||
grin_keychain = { path = "node/keychain" }
|
||||
grin_util = { path = "node/util" }
|
||||
grin_api = { path = "wallet/grin/api" }
|
||||
grin_chain = { path = "wallet/grin/chain" }
|
||||
grin_config = { path = "wallet/grin/config" }
|
||||
grin_core = { path = "wallet/grin/core" }
|
||||
grin_p2p = { path = "wallet/grin/p2p" }
|
||||
grin_servers = { path = "wallet/grin/servers" }
|
||||
grin_keychain = { path = "wallet/grin/keychain" }
|
||||
grin_util = { path = "wallet/grin/util" }
|
||||
|
||||
# wallet
|
||||
grin_wallet_impls = { path = "wallet/impls" }
|
||||
@@ -105,7 +105,7 @@ hyper-tls = "0.6.0"
|
||||
# Version already present transitively (async-socks5 tree) — no new download.
|
||||
tokio-socks = "0.5"
|
||||
async-std = "1.13.2"
|
||||
uuid = { version = "0.8.2", features = ["v4"] }
|
||||
uuid = { version = "1.23.4", features = ["serde", "v4"] }
|
||||
num-bigint = "0.4.6"
|
||||
|
||||
## nostr
|
||||
|
||||
-1
Submodule node deleted from bce5a7144b
+1
-3
@@ -12,7 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use futures::channel::oneshot;
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::RwLock;
|
||||
use std::path::{Path, PathBuf};
|
||||
@@ -680,8 +679,7 @@ fn start_node_server() -> Result<Server, Error> {
|
||||
}
|
||||
|
||||
// Start integrated node server.
|
||||
let api_chan: &'static mut (oneshot::Sender<()>, oneshot::Receiver<()>) =
|
||||
Box::leak(Box::new(oneshot::channel::<()>()));
|
||||
let api_chan = tokio::sync::mpsc::channel::<()>(1);
|
||||
let server_result = Server::new(server_config, None, None, api_chan);
|
||||
server_result
|
||||
}
|
||||
|
||||
+10
-7
@@ -26,7 +26,6 @@ use crate::wallet::types::{
|
||||
use crate::wallet::{ConnectionsConfig, Mnemonic, WalletConfig};
|
||||
|
||||
use chrono::Utc;
|
||||
use futures::channel::oneshot;
|
||||
use grin_api::{ApiServer, Router};
|
||||
use grin_chain::SyncStatus;
|
||||
use grin_keychain::{ExtKeychain, Keychain};
|
||||
@@ -319,6 +318,7 @@ impl Wallet {
|
||||
/// Create [`HTTPNodeClient`] from provided config.
|
||||
fn create_node_client(config: &WalletConfig) -> Result<HTTPNodeClient, Error> {
|
||||
let (node_api_url, node_secret) = Self::node_url_secret(config);
|
||||
let timeout = Duration::from_secs(60);
|
||||
let client = if AppConfig::use_proxy() {
|
||||
let socks = AppConfig::use_socks_proxy();
|
||||
let url = if socks {
|
||||
@@ -347,14 +347,19 @@ impl Wallet {
|
||||
};
|
||||
|
||||
match addr_res {
|
||||
None => HTTPNodeClient::new(&node_api_url, node_secret)?,
|
||||
None => HTTPNodeClient::new(&node_api_url, node_secret, timeout)?,
|
||||
Some(addr) => {
|
||||
let scheme = if socks { "socks5://" } else { "http://" };
|
||||
HTTPNodeClient::new_proxy(&node_api_url, node_secret, Some((addr, scheme)))?
|
||||
HTTPNodeClient::new_proxy(
|
||||
&node_api_url,
|
||||
node_secret,
|
||||
Some((addr, scheme)),
|
||||
timeout,
|
||||
)?
|
||||
}
|
||||
}
|
||||
} else {
|
||||
HTTPNodeClient::new(&node_api_url, node_secret)?
|
||||
HTTPNodeClient::new(&node_api_url, node_secret, timeout)?
|
||||
};
|
||||
Ok(client)
|
||||
}
|
||||
@@ -3938,11 +3943,9 @@ fn start_api_server(wallet: &Wallet) -> Result<(ApiServer, u16), Error> {
|
||||
.add_route("/v2/foreign", Arc::new(api_handler_v2))
|
||||
.map_err(|_| Error::GenericError("Router failed to add route".to_string()))?;
|
||||
|
||||
let api_chan: &'static mut (oneshot::Sender<()>, oneshot::Receiver<()>) =
|
||||
Box::leak(Box::new(oneshot::channel::<()>()));
|
||||
|
||||
let mut apis = ApiServer::new();
|
||||
let socket_addr: SocketAddr = api_addr.parse().unwrap();
|
||||
let api_chan = tokio::sync::mpsc::channel::<()>(1);
|
||||
let _ = apis
|
||||
.start(socket_addr, router, None, api_chan)
|
||||
.map_err(|_| Error::GenericError("API thread failed to start".to_string()))?;
|
||||
|
||||
+1
-1
Submodule wallet updated: c2db754552...32e132a454
Reference in New Issue
Block a user