-
Notifications
You must be signed in to change notification settings - Fork 8
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
config: cleanup; params #19
base: main
Are you sure you want to change the base?
Conversation
Caller needs to pass:
Defaults are:
|
There was a problem hiding this 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
@@ -17,14 +17,15 @@ import ( | |||
// PROTOCOL_ID allows data identification by looking at the first few bytes | |||
var PROTOCOL_ID = []byte{0x72, 0x6f, 0x6c, 0x6c} | |||
|
|||
const ( | |||
DEFAULT_SAT_AMOUNT = 1000 | |||
DEFAULT_SAT_FEE = 200 |
There was a problem hiding this comment.
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?
revealSatAmount btcutil.Amount | ||
revealSatFee btcutil.Amount |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
Fixes #7