Skip to content

Conversation

tuxcanfly
Copy link
Collaborator

Fixes #7

@tuxcanfly tuxcanfly marked this pull request as ready for review March 4, 2023 21:59
@tuxcanfly tuxcanfly requested review from Ferret-san and jcstein March 4, 2023 21:59
@tuxcanfly
Copy link
Collaborator Author

Caller needs to pass:

	Network             string
	RevealSatAmount     int64
        RevealSatFee        int64
	RevealPrivateKeyWIF string

Defaults are:

Network: "regtest"
RevealSatAmount: 1000
RevealSatFee: 200
RevealPrivateKeyWIF: "5JoQtsKQuH8hC9MyvfJAqo6qmKLm8ePYNucs7tPu2YxG12trzBt"

Copy link

@rach-id rach-id left a comment

Choose a reason for hiding this comment

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

This stuff is so cool 🚀 🚀

No blocking feedback, just a passing by review to understand more :D


const (
DEFAULT_SAT_AMOUNT = 1000
DEFAULT_SAT_FEE = 200
Copy link

Choose a reason for hiding this comment

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

[Question]
Shouldn't this be configurable? Because, if I understand right, the whole block data will be posted, not just a commitment to it. Thus, its size can change. Wouldn't it be better to have the fee specified as vBytes so that it changes according to the amount of data being posted?

Comment on lines +101 to +102
revealSatAmount btcutil.Amount
revealSatFee btcutil.Amount
Copy link

Choose a reason for hiding this comment

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

[Proposal]
If these are used also for the commit transaction, proposal to rename to txAmount and txFee as they would be used for the commit and also the reveal

network *chaincfg.Params
revealSatAmount btcutil.Amount
revealSatFee btcutil.Amount
revealPrivateKeyWIF *btcutil.WIF
Copy link

Choose a reason for hiding this comment

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

[Proposal]
Similar, if the same key will be used for the commit tx, proposal to rename to privateKeyWIF

const (
DEFAULT_SAT_AMOUNT = 1000
DEFAULT_SAT_FEE = 200
DEFAULT_PRIVATE_KEY = "5JoQtsKQuH8hC9MyvfJAqo6qmKLm8ePYNucs7tPu2YxG12trzBt"
Copy link
Member

Choose a reason for hiding this comment

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

I don't like this. Private keys should be provided and not hardcoded.

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.

config: cleanup

4 participants