Skip to content

Commit

Permalink
RPC API (#161)
Browse files Browse the repository at this point in the history
* Set maximum gRPC message size to 1GB (P2P & RPC)

* Fully functional get_block_template

* Add FlowContext.is_nearly_synced()

* Fully functional submit_block

* Fully functional get_info

* Fully functional submit_transaction

* Add max_difficulty to Params

* Add kaspa-notify Converter allowing contextualized conversions

* Replace RpcScriptClass with txscript ScriptClass

* Fully functional get_block

* Use Arc<Config> instead of Config clones

* Fully functional get_blocks

* Fully functional get_mempool_entry

* Fully functional get_mempool_entries

* Fully functional get_mempool_entries_by_addresses

* Fix get_block_relations

* Refactor get_mempool_entries_by_addresses

* Fully functional get_current_network & not implemented get_subnetwork

* Fully functional get_sink_blue_score

* Fully functional get_virtual_chain_from_block

* Partial get_block_count (missing consensus impl)

* Rename ConsensusAPI anticone into get_anticone

* Activate get_sync_info with default values

* Let GitHub CI Wasm32 jobs ignore llvm install errors

* Other CI strategy

* Ignore llvm.sh install error

* Other attempts

* Fix ignoring llvm.sh install error

* Refactor llvm steps

* Actually calculate ratio in get_difficulty_ratio

* Add a todo

* Add a contextualized IndexConverter

* Remove get_block_relations

* Test DIFFICULTY_MAX too

* Fix is_chain_block

* Keep an internal copy of acceptance_data_store in Consensus

* Remove Params.is_in_difficulty_window and put the logic in-situ

* Add a todo

* Replace get_block_info with get_ghostdag_data

* Make get_sink & get_sink_timestamp non optional and get_virtual_chain_from_block fallible

* Fix get_block_even_if_header_only filter bug

* Use relations_service  instead of underlying store

* Make no assumption on the validity of get_blocks_acceptance_data provided hashes

* Remove FlowContext::is_nearly_synced
  • Loading branch information
tiram88 authored Apr 13, 2023
1 parent 97c5b9b commit b09e5b1
Show file tree
Hide file tree
Showing 70 changed files with 1,142 additions and 477 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,17 @@ jobs:
- name: Install protoc
run: sudo apt install -y protobuf-compiler

- name: Install llvm
- name: Get llvm install script
run: wget https://apt.llvm.org/llvm.sh
- run: chmod +x llvm.sh
- run: sudo ./llvm.sh all

- name: Install llvm
id: install_llvm
continue-on-error: true
run: sudo ./llvm.sh all || true

- name: Install stable toolchain
if: steps.install_llvm.outcome == 'success' && steps.install_llvm.conclusion == 'success'
uses: dtolnay/rust-toolchain@stable

- name: Add wasm32 target
Expand Down Expand Up @@ -204,12 +209,17 @@ jobs:
- name: Install protoc
run: sudo apt install -y protobuf-compiler

- name: Install llvm
- name: Get llvm install script
run: wget https://apt.llvm.org/llvm.sh
- run: chmod +x llvm.sh
- run: sudo ./llvm.sh all

- name: Install llvm
id: install_llvm
continue-on-error: true
run: sudo ./llvm.sh all || true

- name: Install stable toolchain
if: steps.install_llvm.outcome == 'success' && steps.install_llvm.conclusion == 'success'
uses: dtolnay/rust-toolchain@stable

- name: Install wasm-pack
Expand Down
95 changes: 31 additions & 64 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b09e5b1

Please sign in to comment.