Skip to content
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

Range proof validation mismatch [igor] #5295

Closed
hansieodendaal opened this issue Apr 6, 2023 · 1 comment
Closed

Range proof validation mismatch [igor] #5295

hansieodendaal opened this issue Apr 6, 2023 · 1 comment
Assignees
Labels
P-more_info_needed Process - Please provide more information

Comments

@hansieodendaal
Copy link
Contributor

hansieodendaal commented Apr 6, 2023

This issue was caused by manually submitting a transaction to a base node that spends an igor faucet UTXO without a range proof.

  • Any base node that the transaction was directly submitted to accepts and inserts it into its mempool.
2023-04-06 08:26:55.871685100 [c::mp::service::inbound_handlers] DEBUG Handling remote request: SubmitTransaction (3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a)
2023-04-06 08:26:55.871700300 [c::mp::service::inbound_handlers] DEBUG Transaction (3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a) submitted using request.
2023-04-06 08:26:55.871925900 [c::mp::mempool_storage] DEBUG Inserting tx into mempool: 3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a
2023-04-06 08:26:55.879899200 [c::mp::mempool_storage] DEBUG Transaction 3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a is VALID (7.97ms), inserting in unconfirmed pool in
2023-04-06 08:26:55.880437500 [c::mp::unconfirmed_pool::unconfirmed_pool_storage] DEBUG Inserted transaction 3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a (weight: 250, internal key: 0) into unconfirmed pool:
2023-04-06 08:26:55.880455100 [c::mp::mempool_storage] DEBUG Transaction 3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a inserted in 519.60µs
2023-04-06 08:26:55.880626900 [c::mp::service::inbound_handlers] DEBUG Transaction inserted into mempool: 3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a, pool: Unconfirmed pool.
2023-04-06 08:26:55.880652300 [c::mp::service::inbound_handlers] DEBUG Propagate transaction (3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a) to network.
  • Any base node that received the propagated transaction rejects it.
2023-04-06 08:26:55.884427900 [c::mp::mempool_storage] DEBUG Inserting tx into mempool: 3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a
2023-04-06 08:26:55.884460200 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking kernel signatures
2023-04-06 08:26:55.884614100 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking kernel total
2023-04-06 08:26:55.884631200 [c::val::aggregate_body_internal_consistency_validator] TRACE Total outputs - inputs:fc1865f8988b524002dfdd881b5c2d3738e85edc87724cbe10565ae7be63ac54
2023-04-06 08:26:55.884691300 [c::val::aggregate_body_internal_consistency_validator] TRACE Comparing sum.  excess:0c076814ba71146dcbc51c693c16dfebc54d337b11e19f7d3625be0803362541 == sum fc1865f8988b524002dfdd881b5c2d3738e85edc87724cbe10565ae7be63ac54 + fees 5c9878cd8d45e1e94fc311f590e419ac0cb84589a952e1e6d0a38871f2bd5d2c
2023-04-06 08:26:55.884698300 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking range proofs
2023-04-06 08:26:55.889558900 [c::mp::mempool_storage] WARN  Validation failed due to error: The transaction is invalid: A range proof construction or verification has produced an error: Invalid range proof provided: `Internal range proof(s) error (A proof component failed to verify: `Range proof batch not valid)`
2023-04-06 08:26:55.889666900 [c::mp::service::inbound_handlers] DEBUG Transaction inserted into mempool: 3dd48fbf1c9cb7129e5ec6b5b227765e13c8beeb86fe5462bdc054402bfa390a, pool: Not stored.
  • Any base node that already had the transaction in its mempool would also accept the mined block
2023-04-06 09:11:59.568222900 [c::cs::database] TRACE [add_block] acquired write access db lock for block #3791 in 200.00ns
2023-04-06 09:11:59.568297800 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking kernel signatures
2023-04-06 09:11:59.568441200 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking kernel total
2023-04-06 09:11:59.568453300 [c::val::aggregate_body_internal_consistency_validator] TRACE Total outputs - inputs:c66140f0466fd00443c54d753274dc855d04b54a05ed5aece5dff3d5a2f1a058
2023-04-06 09:11:59.568493100 [c::val::aggregate_body_internal_consistency_validator] TRACE Comparing sum.  excess:b07566286c11a207691c18d110d3fcfbbc16a3526431dd56b0897dea2f668a05 == sum c66140f0466fd00443c54d753274dc855d04b54a05ed5aece5dff3d5a2f1a058 + fees 5c9878cd8d45e1e94fc311f590e419ac0cb84589a952e1e6d0a38871f2bd5d2c
2023-04-06 09:11:59.568497900 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking range proofs
2023-04-06 09:11:59.571284600 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking sender signatures
2023-04-06 09:11:59.572118400 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking script and script offset
...
2023-04-06 09:11:59.588430200 [c::cs::database] DEBUG Storing new block #3791 `4f0487ee911ec8225eb4253be9b9796c8a6fb533c336eaf4b595d5d56400e254`
2023-04-06 09:11:59.595784400 [c::cs::database] TRACE [add_block] released write access db lock for block #3791 
  • Any node that receives the mined block via propagation with that transaction in it, rejects it and bans the propagator.
2023-04-06 09:11:56.753903500 [c::cs::database] TRACE [add_block] acquired write access db lock for block #3791 in 400.00ns
2023-04-06 09:11:56.754015000 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking kernel signatures
2023-04-06 09:11:56.754247200 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking kernel total
2023-04-06 09:11:56.754266800 [c::val::aggregate_body_internal_consistency_validator] TRACE Total outputs - inputs:c66140f0466fd00443c54d753274dc855d04b54a05ed5aece5dff3d5a2f1a058
2023-04-06 09:11:56.754326500 [c::val::aggregate_body_internal_consistency_validator] TRACE Comparing sum.  excess:b07566286c11a207691c18d110d3fcfbbc16a3526431dd56b0897dea2f668a05 == sum c66140f0466fd00443c54d753274dc855d04b54a05ed5aece5dff3d5a2f1a058 + fees 5c9878cd8d45e1e94fc311f590e419ac0cb84589a952e1e6d0a38871f2bd5d2c
2023-04-06 09:11:56.754337700 [c::val::aggregate_body_internal_consistency_validator] TRACE Checking range proofs
2023-04-06 09:11:56.758846000 [c::val::block_body_internal_consistency_validator] WARN  Validation failed on block:4f0487ee911ec8225eb4253be9b9796c8a6fb533c336eaf4b595d5d56400e254:TransactionError(RangeProofError(InvalidRangeProof("Internal range proof(s) error (A proof component failed to verify: `Range proof batch not valid)")))
@hansieodendaal hansieodendaal converted this from a draft issue Apr 6, 2023
@hansieodendaal hansieodendaal changed the title Range proof validation mismatch Range proof validation mismatch [igor] Apr 6, 2023
@stringhandler stringhandler added the P-more_info_needed Process - Please provide more information label Apr 6, 2023
@SWvheerden SWvheerden moved this from Bugs to Must Do in Tari Esme Testnet Apr 11, 2023
@hansieodendaal hansieodendaal moved this from Must Do to In Review in Tari Esme Testnet Apr 11, 2023
@hansieodendaal hansieodendaal self-assigned this Apr 11, 2023
@hansieodendaal
Copy link
Contributor Author

See #5304

SWvheerden pushed a commit that referenced this issue Apr 11, 2023
Description
---
Fixed RPC transaction proto conversion

Motivation and Context
---
With the RPC conversion `minimum_value_promise` was zeroed instead of
assigned
See #5295 

How Has This Been Tested?
---

What process can a PR reviewer use to test or verify this change?
---
Run a system-level test to submit a transaction via gRPC to a base node
where an output has `minimum_value_promise != 0` and then mine the
transaction

Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
@github-project-automation github-project-automation bot moved this from In Review to Done in Tari Esme Testnet Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-more_info_needed Process - Please provide more information
Projects
Status: Done
Development

No branches or pull requests

2 participants