Skip to content

Conversation

@biryukovmaxim
Copy link
Collaborator

No description provided.

aspect and others added 30 commits September 2, 2024 16:02
biryukovmaxim and others added 30 commits September 2, 2025 12:46
* feat: sign and sign_transactions improvements

* fix: review
* empty

* use payload in pskt

* progress checkpoint: code might be broken

* CONFIRMS WORKING AND BUILDING WITH PAYLOAD PSKT SUPPORT

* use option in sig

* Address reviewer feedback for PSKT payload support

- Add Version::One variant to PSKT Version enum for explicit payload support
- Add serde attribute for hex serialization of payload field
- Implement payload combination rules in Global::Add:
  - Both None -> None
  - One has payload -> use that payload
  - Same payload -> use that payload
  - Different payloads -> return PayloadMismatch error
- Add PayloadMismatch error variant to CombineError enum
- Auto-upgrade PSKT version to One when setting payload
- Maintain backward compatibility with Version::Zero (no payload)

These changes address all feedback from the PR review while maintaining
compatibility and proper error handling.

* simplify

* Fix: Enforce strict version checking for payload support

- Changed payload() method to return Result<Self, Error> instead of Self
- Payload can only be set when PSKT version is One or higher (no auto-upgrade)
- Returns PayloadRequiresVersion1 error if attempting to set payload on Version::Zero
- unsigned_tx() now only includes payload when version >= One
- Version combining already fails if versions don't match (no changes needed)

This ensures strict compatibility: old clients (Version::Zero) cannot have payloads,
and combining PSKTs with different versions will fail as expected.

* cargo fmt

* address comments: set version and version error
* docs: run a devnet node

* review: move to a dedicated sub section

* review: re-arrange section and wording changes

* clean: remove blank line

* format: remove markdown bold not working on details blocks

---------

Co-authored-by: IzioDev <[email protected]>
Co-authored-by: coderofstuff <[email protected]>
* Add Dockerfile.kaspad

* Add Dockerfile.kaspad and remove some apk deps in kaspad's image

* Add docker files to kaspa-wallet and simpa

* Add build-docker-multi-arch.sh and update README.md

* Other minor README updates

* Remove workaround related to librocksdb-sys-0.16.0+8.10.0
* Processor changes for ibd optimizations

* ibd file redesign

* names and minor refactors

* Processor changes for ibd optimizations

* ibd file redesign

* names and minor refactors

* rebasing adaptations

* reverted unrequired cargo.lock update,  minor comments

* minor comment

* version bump

* format missed

* addresses comment

* comments addressed

* remove batch (mem footprint of large blocks is more significant than the avoided context switch) + misc

* map to explicit err

* spaces

* remove `ibd` from p2p msg names (no need to dedicate the types to ibd since we support req/response ids now)
* lints and style

* removed redundant check

* toml fix
* update asm and add windows asm

* default keccak asm feature

---------

Co-authored-by: Ori Newman <[email protected]>
* Add support for override params

* Update docs

* Change readme
* Add pruning_test and indirect_parents_test tests

* Fix indirect_parents_test and some renames
* remove outdated todo

* add doc comment

* remove header processing activation checks (and restore checks to correct location)

* remove pruning point v1 methods

* remove pruning_samples_database_upgrade

* remove obsolete pruning point candidate

* remove tx::hash() include mass field parameter

* address minor comments

* expose pre-crescendo tx hash function
* Disable build of zip archive at the end of release build

* Fix creation of zip-in-zip delivery

as actions/upload-artifact automatically creates a zip archive for the upload

* Remove obsolete commands

* Remove obsolete archive move/rename operation

* Refactored upload step

by replacing unmaintained github action actions/upload-release-asset with softprops/action-gh-release

* Create zip archive of kaspa-wasm32-sdk before upload

* Remove obsolete and already disabled cmd

---------

Co-authored-by: aspect <[email protected]>
Co-authored-by: Ori Newman <[email protected]>
…et#697)

* Check that trusted blocks are not in the pruning point future

* Allow the pruning point to be a trusted block
* change priority bucket expected time to block target time

* clippy

---------

Co-authored-by: coderofstuff <[email protected]>
* naive catchup, utxo sync flag

* intrusive pruning point update

* catchup new pruning points import functionality fix

* minor fixes of utxo syncing safety

* improve sync flag pruning safety

* improved trusted_bodies_syncing

* minor fixes

* error fix, and relay blocks improvements

* clippy

* fixed should_sync

* validate pruning points in catchup fix

* Remove temporary dust prevention mechanism (kaspanet#698)

* Remove temporary dust prevention mechanism

* Disable uninlined_format_args lint

* Apply workspace lints to all crates

* clippy

* download trusted bodies before utxo

* deleted redundant files

* fixed prning_point update bug

* fixed more edge cases

* missing batch write

* formatting

* halt prune if sync was suddenly initiated

* prevents pruning freeze due to recovery before catching up

* removed constantly repeating info!

* solved a deadlock

* removed unnecessary prints

* partial comment addressing

* partial comments addressing part 2

* Update protocol/flows/src/v5/ibd/flow.rs

accepted review suggestion

Co-authored-by: Ori Newman <[email protected]>

* partial comment addressing no. 3

* comments addressed

* more comments addressed

* addressing some newer comments

* retention point logic simplified and prevented for archival nodes

* misc edits

* moved some logic to pruning_proof_manager

* minor pruning_ processor updates

* pruning_meta_stores cache optimization

* address latest comments

* addressed block bodies TODO on trusted blocks

* fixed trusted bodies request

* added version support for trusted syncing

* fixed is_pruning_sample bugs

* clippy

* minor structuring changes

* extra infos regarding utxoset download + descriptive errors for is pruning sample?

* Minor style fix

* addressed a few more comments

* removed IBD type none

* changed terminology + minor fixes

* name clarity fix

* anticone storage improved interface

* refactored initial consensus values caching

* drop utxo stable flag in a staging consensus

* changed cache->set

* fixed comment

* name change + separation line

---------

Co-authored-by: Ori Newman <[email protected]>
* Fix pruning_test

* Add timeout for pruning_test
* Add support for environment variable configuration.

* add environment vars for the remaining cli flags

---------

Co-authored-by: Emmett Hitz <[email protected]>
* CompressedParents WIP

* CompressedParents Improvements -
* Implement a generic dedup_with_cumulative_count iterator fn
* Change cumulative to u8 instead of u32 (a little optimization)
* The `get` is now using binary_search_by_key for better performance

* * add `expand_rle` IterExtensions2
* finalize headers.rs CompressedParents logic + tests

* Update `Header::new_finalized` and other methods to work with `CompressedParents`
- Increase the database version to 5 to reflect the data structure change
- Adapt relevant parts of the codebase to handle the new compressed format
- Replace the custom `CompressedParentsIter` with the more generic `expand_rle` utility
- Removed the v3->v4 database migration and added a v4->v5 migration

* calc_block_parents now creates compressed-parents during iterations

* Refactor calc_block_parents to use CompressedParents struct and add push method

* Add fallback support for CachedDbAccess and update DatabaseStorePrefixes for CompressedHeaders

* has -> has_with_fallback

* has -> has with fallback

* typo

* Refactor memory size estimation for Header to account for CompressedParents structure

* remove unused fn

* Fix tests and warnings

* tests fix

* PR review -  CompressedParentsError, TryFrom instead of From, replacing panicking unwrap() calls with proper error propagation

* rename iter to expended_iter

* enforce strictly increasing cumulative counts

* final touches

* conversions

* user approval for database upgrade

---------

Co-authored-by: AxiomePro <[email protected]>
* Get rid of some ghostdag_k.get(..)

* Move check_coinbase_outputs_limit back to check_coinbase_in_isolation

* Get rid of more ForkedParam.get(..)

* Move checks from validate_tx_in_header_context to validate_tx_in_isolation

* Remove check_transaction_payload

* Get rid of more ForkedParam.get(..)

* Remove crescendo activation logic from validate_body_in_isolation

* Get rid of some calls to ForkActivation.isActive

* Get rid of some pruning constants sanity checks and use of lower_bound()

* Get rid of calls to ForkedParam.upper_bound

* Remove some uses of ForkActivation

* fmt

* Address comments
* remove v5::register and unused flow

* move sub-mods to v6 and remove v5 altogether

* rename v6 -> v7 and remove v6 registration

* remove unused consensus api functions
* Remove `kip10_enabled` flag from `TxScriptEngine` and related methods

* Update script test file comments to reflect removal of `kip10_enabled` flag

* Remove `runtime_sig_op_counting` flag and refactor `TxScriptEngine` and related methods

* Remove `numeric_op` macro and refactor numeric opcode implementations

* Remove `Kip10I64` type and update numeric opcode implementations to use `i64`
change i64 deserialization to use 8 bytes the same way Kip10I64 used before

remove tests that were falling due to deserialization i64 into 4 bytes.

* rename file with test-data

* rename tests
remove redundant constants

* remove comment
…et#779)

* Fix GetBlocks returning duplicate hashes (issue kaspanet#778)

- Filter sink_anticone to remove low_hash and existing block_hashes
- Prevents low_hash from appearing twice when it's in sink anticone
- Fixes GitHub issue kaspanet#778

* Update service.rs

* Update service.rs

Updates:

Refactored per @coderofstuff feedback

Moved duplicate filtering logic inside `if high_hash == sink_hash` condition

Replaced manual HashSet inserts with idiomatic `once(low_hash).chain(block_hashes.iter().copied()).collect()`

Improves code clarity and efficiency
* starting point - merge utxo return addr pr.

* starting point - merge utxo return addr pr.

* fix double message in rpc.proto.

* pass test

* go over co-piolet reveiw.

* fmt

* clippy

* fmt

* add basic example of vcc v2

* rpc core: revert changes on models that should be untouched

* reintroduce missing errors from master

* grpc optional structures

* add optional structs to rpc service

* revert rotshchild changes

* more revert to master

* more revert to master

* clippy

* add vcc v2 example to workspace members

* fix vccv2 example

* feat: simplify verbosity level (wip)

* stage: working example, still needs polish with rpc verbosity structs

* clean: remove .zed folder

* review: add coderofstuff proposal for verbosity

* chore: clippy

* clean: default hash value

* clean(grpc): removed now unsued granular verbosity mapping

* refacto(consensus): get transaction by accepting block

* docs: add verbosity level indicator at field level

* Merge main

* Move accepted transactions as a top-level vec to VSPC2

GetVirtualChainFromBlockV2Response now has chain_block_accepted_transactions

* fix(test): mock rpc chain block accepted transactions

* review: replace *_v_n with *_vn

* review: add min confirmtation count for v2

* refacto: rename variable

* wip: optimize txs population data-fetching from merged block acceptance
data

* clean: remove playgroud

* revert: example change

* revert: example change

* revert: example change

* refacto: unify merged block header fetching

* wasm: add example and fix data level verbosity

* refacto: clean

* refacto: reduce instanciation visibility

* perf: wip setup a rpc benchmark in high load environment

* wip: for coder

* Pass in full acceptance data when resolving the missing outpoint

* review: last clean

* review: cargo format

* review(cli): remove useless reverse operation on argv

* review(rpc/error): remove unused member

* review(utxo-inquierer/errors): removed unused and message format unification

* review(benchmark/rpc): stop program execution after getting the results

* review(wrpc/example): revamped

* refacto(utxo-inquirer): find txs from acceptance data

* clippy

* clippy

* review(utxo-inquirer): annotate unimplemented part with todo

* review(rpc/vspcv2): set verbosity level to full by default

* refacto(rpc/grpc): convert header file re-arranged

* format

* review: small rename and inconsistency fix

---------

Co-authored-by: D-Stacks <[email protected]>
Co-authored-by: IzioDev <[email protected]>
Co-authored-by: coderofstuff <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.