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

for new staking tx add key.index and proof in db #134

Open
RafilxTenfen opened this issue Jun 18, 2024 · 1 comment
Open

for new staking tx add key.index and proof in db #134

RafilxTenfen opened this issue Jun 18, 2024 · 1 comment

Comments

@RafilxTenfen
Copy link
Contributor

To create BTC delegations we also need the index and proof

// TransactionInfo is the info of a tx on Bitcoin,
// including
// - the position of the tx on BTC blockchain
// - the full tx content
// - the Merkle proof that this tx is on the above position
message TransactionInfo {
  // key is the position (txIdx, blockHash) of this tx on BTC blockchain
  // Although it is already a part of SubmissionKey, we store it here again
  // to make TransactionInfo self-contained.
  // For example, storing the key allows TransactionInfo to not relay on
  // the fact that TransactionInfo will be ordered in the same order as
  // TransactionKeys in SubmissionKey.
  TransactionKey key = 1;
  // transaction is the full transaction in bytes
  bytes transaction = 2;
  // proof is the Merkle proof that this tx is included in the position in `key`
  // TODO: maybe it could use here better format as we already processed and
  // validated the proof?
  bytes proof = 3;
}
@RafilxTenfen
Copy link
Contributor Author

related #135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant