B7: confirmations with merkle proof, adoption of the confirmed version, RBF bumper and reconciler (TX-30..33, DAT-85)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
feff993584
commit
fa57d2e5ab
20 files changed
+1165
-20
No files matched your search
@@ -37,6 +37,8 @@ class LotteryConfig(models.Model):
|
||||
max_round_pool_sats = models.BigIntegerField(default=0) # 0 = no cap
|
||||
# Network fee of the transactions built from now on, sat/vB (BET-04); a transaction in flight keeps its own.
|
||||
fee_rate_sat_vb = models.PositiveIntegerField(default=1)
|
||||
# TX-32: how long a pending transaction waits before it is replaced with a higher fee.
|
||||
rbf_timeout_seconds = models.PositiveIntegerField(default=900)
|
||||
|
||||
# ADR-57: three distinct commands.
|
||||
pause_after_round = models.BooleanField(default=False)
|
||||
@@ -72,6 +74,9 @@ class LotteryConfig(models.Model):
|
||||
models.CheckConstraint(
|
||||
condition=Q(fee_rate_sat_vb__gte=1, fee_rate_sat_vb__lte=5000), name="lottery_config_fee_rate_range"
|
||||
),
|
||||
models.CheckConstraint(
|
||||
condition=Q(rbf_timeout_seconds__gte=60, rbf_timeout_seconds__lte=86400), name="lottery_config_rbf_timeout_range"
|
||||
),
|
||||
]
|
||||
|
||||
@classmethod
|
||||
@@ -245,6 +250,10 @@ class ChainTransaction(models.Model):
|
||||
confirmed_at = models.DateTimeField(null=True, blank=True)
|
||||
failed_at = models.DateTimeField(null=True, blank=True)
|
||||
failure_reason = models.TextField(blank=True, default="")
|
||||
# DAT-85: the current version's rate, the last send (RBF moves it; broadcast_at stays the first) and the tries.
|
||||
fee_rate_sat_vb = models.PositiveIntegerField(null=True, blank=True)
|
||||
last_broadcast_at = models.DateTimeField(null=True, blank=True)
|
||||
attempt_count = models.PositiveSmallIntegerField(default=1)
|
||||
|
||||
class Meta:
|
||||
indexes = [models.Index(fields=["status"])]
|
||||
|
||||
Reference in new issue
Block a user