Skip to content

Fix created_at_height retrieval using git rev-list#35

Merged
volta2030 merged 1 commit intogitledger:mainfrom
volta2030:main
May 5, 2026
Merged

Fix created_at_height retrieval using git rev-list#35
volta2030 merged 1 commit intogitledger:mainfrom
volta2030:main

Conversation

@volta2030
Copy link
Copy Markdown
Member

This pull request updates the transaction creation script to set the created_at_height field dynamically based on the current Git commit count, instead of using a hardcoded value. This ensures that the output UTXO JSON files more accurately reflect the current repository state.

Transaction metadata improvements:

  • .github/scripts/create_transaction.py: Replaces the hardcoded created_at_height value with the current Git commit count for both the main output UTXO and the change UTXO, making the transaction metadata more representative of the repository's state at creation time. [1] [2]

@volta2030 volta2030 requested a review from Copilot May 5, 2026 03:52
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Code Review Required

@volta2030 @P1750A

This PR contains non-transaction changes and requires validator approval before merging.

To approve, post:

/approve

Required: 1 of 2 validators must approve.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the GitCoin transaction builder script to populate created_at_height dynamically from the repository’s Git history, improving the accuracy of UTXO metadata generated for transaction PRs.

Changes:

  • Computes a current_height value via git rev-list --count HEAD.
  • Sets created_at_height on both the recipient UTXO and optional change UTXO to that computed height.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/scripts/create_transaction.py
@volta2030
Copy link
Copy Markdown
Member Author

/approve

@volta2030 volta2030 merged commit 465b33d into gitledger:main May 5, 2026
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants