Closed ncying closed 6 years ago
sbt mode minter and docker seed test
{
"type": 2,
"id": "nk2p716Ub1vr4JsCh5XKHehe1oxSskvCV6bk9BZCQTY",
"fee": 10000000,
"timestamp": 1535358665039891700,
"proofs": [
{
"proofType": "Curve25519",
"publicKey": "ATtRykARbyJS1RwNsA6Rn1Um3S7FuVSovHK",
"signature": "CcoqdK5MwShhjU26gBfKFZZ45V25qvMo9n96g1kLtG4hkhgJY8KbcaF5SzAVEJ4NAdoJuHr8eNsVLN4y1mQJfh7"
}
],
"recipient": "AUD9poQ3ernHVx2kUz9XRJvmCJEk6sZrj9T",
"feeScale": 100,
"amount": 100000000000000,
"attachment": "veetest",
"status": "Success",
"feeCharged": 10000000,
"height": 14
}
ContendFailed
failed case:
{
"type": 6,
"id": "E34Bfd5zZoSCkozGcdtdeG8ijai8b7QtwgupPJjMQ4Ft",
"fee": 5000000000000,
"timestamp": 1535358355473432000,
"proofs": [
{
"proofType": "Curve25519",
"publicKey": "ATuc9KxZmMZcKEBWpkhMJfgJzrtLJ7gepA4",
"signature": "5u2H2KyUNzqB82ijeRGT44TEHWPtukqbjtJebE6QvDREwKEirYmvEhzovGLBZkfTKrkVyFKY9PpLTDW4Tqcmqr1C"
}
],
"slotId": 0,
"feeScale": 100,
"status": "ContendFailed",
"feeCharged": 5000000000000,
"height": 6
}
success case:
{
"type": 6,
"id": "J8W2NoeafsGA3CMuF8Tkmz9mQu4YV5AFk357JaUpgBqb",
"fee": 5000000000000,
"timestamp": 1535358516241921300,
"proofs": [
{
"proofType": "Curve25519",
"publicKey": "ATuc9KxZmMZcKEBWpkhMJfgJzrtLJ7gepA4",
"signature": "5YzG7gWAmKLej8FQQecnVoH2eeNsi6PZgJE2jqfaCFRKyckA3cXd1ZKuwSq8VFpN3TQh2aDAScen1sNwfUpZbXLS"
}
],
"slotId": 11,
"feeScale": 100,
"status": "Success",
"feeCharged": 5000000000000,
"height": 9
}
ContendFailed
{
"type": 6,
"id": "4QKFMG6fCDYc9BfYL57ZmokhwzmLNsy8XYsRkC9aQPHk",
"fee": 5000000000000,
"timestamp": 1535358688182656000,
"proofs": [
{
"proofType": "Curve25519",
"publicKey": "AUD9poQ3ernHVx2kUz9XRJvmCJEk6sZrj9T",
"signature": "47ccmKLHYYT2xt45LLdcmwFmf4vJhgU6PkYcUu4muh1N52wKapefr4AnaM5iAe9bvxFcA6dvEJmPcE2Xfmig7fxs"
}
],
"slotId": 21,
"feeScale": 100,
"status": "ContendFailed",
"feeCharged": 5000000000000,
"height": 15
}
lgtm
On Mon, Aug 27, 2018 at 7:11 AM ncying notifications@github.com wrote:
@ncying commented on this pull request.
In src/main/scala/com/wavesplatform/state2/diffs/BlockDiffer.scala https://github.com/excelsia/VEE/pull/108#discussion_r212989480:
val txsDiffEi = txs.foldLeft(right(feesDistribution)) { case (ei, tx) => ei.flatMap(diff =>
- txDiffer(new CompositeStateReader(s, diff.asBlockDiff), tx)
- .map(newDiff => diff.combine(newDiff)))
- txDiffer(new CompositeStateReader(s, diff.asBlockDiff), tx.transaction) match {
the transaction status is reported by minter. how can we judge the status is correct or not? so, i just reprocess the transaction and validate the status. i know your idea here, because if the transaction is complex, all nodes should process this failed status transaction in their local machine.
— You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub https://github.com/excelsia/VEE/pull/108#discussion_r212989480, or mute the thread https://github.com/notifications/unsubscribe-auth/AlKdEO_CjhCTw8bJdrNO3NUzK_pZkPdyks5uU_4rgaJpZM4WNdq7 .
txStatus
andchargedFee
states inDiff
TransactionDiffer
txStatus
is SuccesschargedFee
is 0ContendFailed
chargedFee = tx.fee
to all transaction diff except contend (see 2)BlockDiffer
Success
txStatus
chargedFee
(this case should be more complex if we enable our fee calculation system)packUnconfirmed
Seq[Transaction]
toSeq[ProcessedTransaction]
txStatus
andchargedFee
inTransactionDiifer
, so we can use these states andProcessedTransaction
method to get the required sequence.unit test passed
sbt mode minter and docker seed test success manually stop at height 220