Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS should send ACK to maker address posting #401

Open
mojoX911 opened this issue Feb 6, 2025 · 5 comments
Open

DNS should send ACK to maker address posting #401

mojoX911 opened this issue Feb 6, 2025 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@mojoX911
Copy link

mojoX911 commented Feb 6, 2025

Currently, the maker has no way of knowing if their address posting request are successfully stored by DNS.

make the DNS send back an ACK message to maker.

@mojoX911 mojoX911 added the bug Something isn't working label Feb 6, 2025
@mojoX911 mojoX911 added this to the v0.1.1 milestone Feb 6, 2025
@mojoX911 mojoX911 added this to core lib Feb 6, 2025
@Levi0804
Copy link

After updating/inserting the address:

);
directory.updated_address_map((metadata.url, metadata.proof.bond.outpoint))?;
}

we can send ACK and then handle reading it on the maker side. Am I correct?

@Shourya742
Copy link

After updating/inserting the address:

coinswap/src/market/directory.rs

Lines 486 to 488 in 6ee6dd6

 ); 
 directory.updated_address_map((metadata.url, metadata.proof.bond.outpoint))?; 

}
we can send ACK and then handle reading it on the maker side. Am I correct?

based on successful operation send an ACK or NACK. Just expand the result and send the payload accordingly.

@Levi0804
Copy link

Levi0804 commented Feb 10, 2025

if let Err(e) = directory.updated_address_map((metadata.url, metadata.proof.bond.outpoint)) {
    log::warn!(
        "NACK. Posting request by maker was rejected by DNS: {:?}",
        e
    );
    send_message(stream, &"NACK")?;
    return Err(e);
} 
log::info!("ACK. Posting request by maker was accepted by DNS.");
send_message(stream, &"ACK")?;

so something like this, right?

@Shourya742
Copy link

if let Err(e) = directory.updated_address_map((metadata.url, metadata.proof.bond.outpoint)) {
log::warn!(
"NACK. Posting request by maker was rejected by DNS: {:?}",
e
);
send_message(stream, &"NACK")?;
return Err(e);
}
log::info!("ACK. Posting request by maker was accepted by DNS.");
send_message(stream, &"ACK")?;
so something like this, right?

have response type as enum and use match

@Levi0804
Copy link

I created a PR #414 Please let me know your thoughts on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants