feat(nano): miscellaneous changes [part 8]#1285
Conversation
ec39a24 to
0ea3582
Compare
Codecov ReportAttention: Patch coverage is
❌ Your project status has failed because the head coverage (78.11%) is below the target coverage (82.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #1285 +/- ##
==========================================
- Coverage 78.83% 78.11% -0.72%
==========================================
Files 412 413 +1
Lines 29171 29699 +528
Branches 4500 4590 +90
==========================================
+ Hits 22996 23200 +204
- Misses 5402 5710 +308
- Partials 773 789 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
eefcf44 to
9e759b4
Compare
9cbb5c8 to
77f963d
Compare
| self.check_or_raise( | ||
| not self._args.nc_history_index, | ||
| '--nc-history-index has been deprecated, use --nc-indices instead', | ||
| ) |
There was a problem hiding this comment.
We can just remove this.
| help='Create an index of transactions by address and allow searching queries') | ||
| parser.add_argument('--utxo-index', action='store_true', | ||
| help='Create an index of UTXOs by token/address/amount and allow searching queries') | ||
| parser.add_argument('--nc-history-index', action='store_true', help=SUPPRESS) # moved to --nc-indices |
| x_enable_ipv6: bool | ||
| x_disable_ipv4: bool | ||
| localnet: bool | ||
| nc_history_index: bool |
| try: | ||
| contract_storage = block_storage.get_contract_storage(ContractId(NCVertexId(contract_id))) | ||
| except KeyError: | ||
| from hathor.nanocontracts.exception import NanoContractDoesNotExist | ||
| raise NanoContractDoesNotExist(contract_id.hex()) |
There was a problem hiding this comment.
We can remove this exception handling because it's now done in get_contract_storage itself.
|
LGTM ✅ |
9e759b4 to
cb8cc56
Compare
|
| Branch | feat/nano/misc |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result minutes (m) (Result Δ%) | Lower Boundary minutes (m) (Limit %) | Upper Boundary minutes (m) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 1.63 m(-0.15%)Baseline: 1.63 m | 1.47 m (90.14%) | 1.79 m (90.77%) |
| parser.add_argument('--nc-indices', action='store_true', | ||
| help='Enable indices related to nano contracts') |
There was a problem hiding this comment.
While "indices" is technically correct, "indexes" is also correct, I'd rather use that since it's what we've been using before, there's also this style guide which opts for indexes too.
| MULTISIG_VERSION_BYTE=b'\x87', | ||
| NETWORK_NAME='nano-testnet-alpha', | ||
| BOOTSTRAP_DNS=[], | ||
| BOOTSTRAP_DNS=['alpha.nano-testnet.hathor.network'], |
There was a problem hiding this comment.
Is it going to be alpha or bravo now? It probably doesn't sync with the current alpha so we might as well bump it.
| raise NotImplementedError('temporarily removed during nano merge') | ||
| # used to initialize self.text with | ||
| match self.kind: | ||
| case CodeKind.PYTHON_GZIP: |
There was a problem hiding this comment.
This should be PYTHON_ZLIB now, right?
There was a problem hiding this comment.
This changes aren't making anything right? If anything I'd rather move away from string annotations instead of moving to them.
Motivation
Merge multiple minor changes from Nano.
Acceptance Criteria
Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged