Skip to content

Error: Invalid Target Originator #463

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

Closed
mkysel opened this issue Feb 5, 2025 · 0 comments
Closed

Error: Invalid Target Originator #463

mkysel opened this issue Feb 5, 2025 · 0 comments
Assignees
Labels
decentralization-client Client improvements payer Items related to the payer service

Comments

@mkysel
Copy link
Collaborator

mkysel commented Feb 5, 2025

Right now the client hardcodes originatorID to 100, but that code needs to go away.

If I made an edit to the client such as

diff --git a/xmtp_proto/src/convert.rs b/xmtp_proto/src/convert.rs
index 4c003af3..0fe826d0 100644
--- a/xmtp_proto/src/convert.rs
+++ b/xmtp_proto/src/convert.rs
@@ -105,8 +105,7 @@ impl AuthenticatedData {
     #[allow(deprecated)]
     pub fn with_topic(topic: Vec<u8>) -> AuthenticatedData {
         AuthenticatedData {
-            //TODO(mkysel) originator is hardcoded for now, but will have to become configurable
-            target_originator: Some(100),
+            target_originator: None,
             target_topic: topic,
             depends_on: None,
             is_commit: false,

the payer will fail:

2025-02-05T13:29:49.053-0500	ERROR	replication	error publishing payer envelopes	{"error": "rpc error: code = Internal desc = error publishing payer envelopes: rpc error: code = InvalidArgument desc = invalid target originator"}
2025-02-05T13:29:49.053-0500	ERROR	replication	Client Unary RPC Error	{"method": "/xmtp.xmtpv4.payer_api.PayerApi/PublishClientEnvelopes", "duration": 818125, "code": "Internal", "message": "error publishing payer envelopes"}

What I suspect is happening is that the payload goes to an unavailable node and the payer doesn't take unavailable nodes into account.

Since the payer is doing the hashing, it needs to be able to rehash if a node is unavailable.

@mkysel mkysel self-assigned this Feb 5, 2025
@mkysel mkysel added decentralization-client Client improvements payer Items related to the payer service labels Feb 5, 2025
@mkysel mkysel moved this to In Progress in Decentralization Feb 5, 2025
@neekolas neekolas added this to the Finish payer service milestone Feb 21, 2025
mkysel added a commit that referenced this issue Feb 24, 2025
Uses xmtp/proto#247

This adds a new field to the payer envelope that prevents a node from
stealing payloads #474

Additionally it gets rid of old AAD validation #463

The bulk of the changeset allows the payer to pick a different node if
the connection to the ideal node has failed. This is obviously not
ideal, because it will keep retrying even if the node is down long term,
but in the short/medium term this is sufficient.

Fixes #474 #463
@neekolas neekolas moved this from In Progress to Done in Decentralization Feb 25, 2025
@neekolas neekolas closed this as completed by moving to Done in Decentralization Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decentralization-client Client improvements payer Items related to the payer service
Projects
Status: Done
Development

No branches or pull requests

2 participants