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

Add notaryd #61

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Add notaryd #61

merged 1 commit into from
Sep 25, 2023

Conversation

ariard
Copy link
Contributor

@ariard ariard commented Sep 16, 2023

Rolling the ball forward for #5, added a new civkit-notaryd daemon.

@twshelton
Copy link

Will this replace AnchorManager (#5) or will notaryd be called from AnchorManager?

//TODO: step 7 return the result to the Nostr client ?
// - add pre-notification at step 3 if the client does not want to be dependent
// on blockchain interval

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirming my understanding of the process flow in pseudo-code

fn notarize(service_payload) -> NostrEventContent {
2. local_store.append(service_payload)
3. attestation = sign(service_payload) // pre-notification?
4. build_merkle_tree // unclear as to process here
5. if local_store.length() >= x; btcx = create_btc_transaction(local_store);
6. broadcast(btcx);
7. return NostrEventContent(attestation);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the flow is mostly correct with the following feedback:
4. I don’t know yet if the attestation will be committed with a merkle tree or pay-to-contract (i’m thinking to start to standardize bitcoin notarization with bips or something equivalent to have inter-operability of attestations)
5. rather to have create_btc_transaction committed on the size of the store, X should be a time point (block height or unix epoch) though obviously we might have to flush when the store is full before X

@ariard
Copy link
Contributor Author

ariard commented Sep 21, 2023

Will this replace AnchorManager (#5) or will notaryd be called from AnchorManager?

I’m thinking yes, like notaryd is some boilerplate code to have an AnchorManager (or AttestationManager) receiving the payload and submitting the scriptpubkey to transaction builder.

If you have more feedback, I can address it, otherwise I’m thinking to land #61.

@twshelton
Copy link

I agree. Let's land #61 and get the rest of it flushed out.

@ariard ariard merged commit 9feedcf into civkit:main Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants