Copy disabled (too large)
Download .txt
Showing preview only (27,129K chars total). Download the full file to get everything.
Repository: utnet-org/utility
Branch: main
Commit: cedcc29826cb
Files: 1727
Total size: 25.5 MB
Directory structure:
gitextract_ayheqwxv/
├── .cargo/
│ ├── audit.toml
│ └── config.toml
├── .config/
│ └── nextest.toml
├── .dockerignore
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── 01_BUG_REPORT.md
│ │ └── 02_FEATURE_REQUEST.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── RELEASE_TEMPLATE.md
│ └── workflows/
│ ├── calculate-alpha-release.bash
│ ├── crates_publish.yml
│ ├── default.yml
│ ├── gh_pages.yml
│ ├── issue_metrics.yml
│ ├── release_binaries.yml
│ └── release_docker.yml
├── .gitignore
├── .gitmodules
├── .pre-commit-config.yaml
├── .style.yapf
├── ATTRIBUTIONS.md
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── Dockerfile
├── Justfile
├── LICENSE-GPL2
├── LICENSE-GPL2.1
├── Makefile
├── README.md
├── SECURITY.md
├── buf.yaml
├── chain/
│ ├── chain/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── block_processing_utils.rs
│ │ ├── blocks_delay_tracker.rs
│ │ ├── chain.rs
│ │ ├── chain_update.rs
│ │ ├── chunks_store.rs
│ │ ├── crypto_hash_timer.rs
│ │ ├── doomslug.rs
│ │ ├── flat_storage_creator.rs
│ │ ├── garbage_collection.rs
│ │ ├── lib.rs
│ │ ├── lightclient.rs
│ │ ├── metrics.rs
│ │ ├── migrations.rs
│ │ ├── missing_chunks.rs
│ │ ├── orphan.rs
│ │ ├── resharding.rs
│ │ ├── sharding.rs
│ │ ├── state_request_tracker.rs
│ │ ├── state_snapshot_actor.rs
│ │ ├── store.rs
│ │ ├── store_validator/
│ │ │ └── validate.rs
│ │ ├── store_validator.rs
│ │ ├── test_utils/
│ │ │ ├── kv_runtime.rs
│ │ │ └── validator_schedule.rs
│ │ ├── test_utils.rs
│ │ ├── tests/
│ │ │ ├── challenges.rs
│ │ │ ├── doomslug.rs
│ │ │ ├── garbage_collection.rs
│ │ │ ├── mod.rs
│ │ │ ├── simple_chain.rs
│ │ │ └── sync_chain.rs
│ │ ├── types.rs
│ │ ├── update_shard.rs
│ │ └── validate.rs
│ ├── chain-primitives/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── error.rs
│ │ └── lib.rs
│ ├── chunks/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── adapter.rs
│ │ ├── chunk_cache.rs
│ │ ├── client.rs
│ │ ├── lib.rs
│ │ ├── logic.rs
│ │ ├── metrics.rs
│ │ ├── shards_manager_actor.rs
│ │ ├── test/
│ │ │ ├── basic.rs
│ │ │ └── multi.rs
│ │ ├── test_loop.rs
│ │ └── test_utils.rs
│ ├── chunks-primitives/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── error.rs
│ │ └── lib.rs
│ ├── client/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── adapter.rs
│ │ ├── adversarial.rs
│ │ ├── chunk_validation.rs
│ │ ├── client.rs
│ │ ├── client_actor.rs
│ │ ├── config_updater.rs
│ │ ├── debug.rs
│ │ ├── info.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── sync/
│ │ │ ├── adapter.rs
│ │ │ ├── block.rs
│ │ │ ├── epoch.rs
│ │ │ ├── external.rs
│ │ │ ├── header.rs
│ │ │ ├── mod.rs
│ │ │ ├── state.rs
│ │ │ └── sync_actor.rs
│ │ ├── sync_jobs_actor.rs
│ │ ├── test_utils/
│ │ │ ├── block_stats.rs
│ │ │ ├── client.rs
│ │ │ ├── mod.rs
│ │ │ ├── peer_manager_mock.rs
│ │ │ ├── setup.rs
│ │ │ ├── test_env.rs
│ │ │ └── test_env_builder.rs
│ │ ├── tests/
│ │ │ ├── bug_repros.rs
│ │ │ ├── catching_up.rs
│ │ │ ├── chunks_management.rs
│ │ │ ├── consensus.rs
│ │ │ ├── cross_shard_tx.rs
│ │ │ ├── doomslug.rs
│ │ │ ├── maintenance_windows.rs
│ │ │ ├── mod.rs
│ │ │ ├── process_blocks.rs
│ │ │ └── query_client.rs
│ │ └── view_client.rs
│ ├── client-primitives/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── debug.rs
│ │ ├── lib.rs
│ │ └── types.rs
│ ├── epoch-manager/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── adapter.rs
│ │ ├── lib.rs
│ │ ├── proposals.rs
│ │ ├── reward_calculator.rs
│ │ ├── shard_assignment.rs
│ │ ├── shard_tracker.rs
│ │ ├── test_utils.rs
│ │ ├── tests/
│ │ │ ├── mod.rs
│ │ │ └── random_epochs.rs
│ │ ├── types.rs
│ │ └── validator_selection.rs
│ ├── indexer/
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── lib.rs
│ │ └── streamer/
│ │ ├── errors.rs
│ │ ├── fetchers.rs
│ │ ├── metrics.rs
│ │ ├── mod.rs
│ │ └── utils.rs
│ ├── indexer-primitives/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── lib.rs
│ ├── jsonrpc/
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── client/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── fuzz/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ └── fuzz_targets_disabled/
│ │ │ └── fuzz_target_1.rs
│ │ ├── jsonrpc-tests/
│ │ │ ├── Cargo.toml
│ │ │ ├── res/
│ │ │ │ └── genesis_config.json
│ │ │ ├── src/
│ │ │ │ └── lib.rs
│ │ │ └── tests/
│ │ │ ├── http_query.rs
│ │ │ ├── rpc_query.rs
│ │ │ └── rpc_transactions.rs
│ │ ├── res/
│ │ │ ├── chain_n_chunk_info.css
│ │ │ ├── chain_n_chunk_info.html
│ │ │ ├── debug.html
│ │ │ ├── epoch_info.css
│ │ │ ├── epoch_info.html
│ │ │ ├── last_blocks.css
│ │ │ ├── last_blocks.html
│ │ │ ├── last_blocks.js
│ │ │ ├── network_info.css
│ │ │ ├── network_info.html
│ │ │ ├── network_info.js
│ │ │ ├── rpc_errors_schema.json
│ │ │ ├── split_store.html
│ │ │ ├── sync.css
│ │ │ ├── sync.html
│ │ │ ├── tier1_network_info.html
│ │ │ ├── validator.css
│ │ │ └── validator.html
│ │ └── src/
│ │ ├── api/
│ │ │ ├── all_miners.rs
│ │ │ ├── blocks.rs
│ │ │ ├── changes.rs
│ │ │ ├── chunks.rs
│ │ │ ├── client_config.rs
│ │ │ ├── config.rs
│ │ │ ├── gas_price.rs
│ │ │ ├── light_client.rs
│ │ │ ├── maintenance.rs
│ │ │ ├── mod.rs
│ │ │ ├── network_info.rs
│ │ │ ├── provider.rs
│ │ │ ├── query.rs
│ │ │ ├── receipts.rs
│ │ │ ├── sandbox.rs
│ │ │ ├── split_storage.rs
│ │ │ ├── status.rs
│ │ │ ├── transactions.rs
│ │ │ └── validator.rs
│ │ ├── lib.rs
│ │ └── metrics.rs
│ ├── jsonrpc-adversarial-primitives/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── jsonrpc-primitives/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── errors.rs
│ │ ├── lib.rs
│ │ ├── message.rs
│ │ └── types/
│ │ ├── all_miners.rs
│ │ ├── blocks.rs
│ │ ├── changes.rs
│ │ ├── chunks.rs
│ │ ├── client_config.rs
│ │ ├── config.rs
│ │ ├── entity_debug.rs
│ │ ├── gas_price.rs
│ │ ├── light_client.rs
│ │ ├── maintenance.rs
│ │ ├── mod.rs
│ │ ├── network_info.rs
│ │ ├── provider.rs
│ │ ├── query.rs
│ │ ├── receipts.rs
│ │ ├── sandbox.rs
│ │ ├── split_storage.rs
│ │ ├── status.rs
│ │ ├── transactions.rs
│ │ └── validator.rs
│ ├── network/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ ├── accounts_data/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── actix.rs
│ │ ├── announce_accounts/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── blacklist.rs
│ │ ├── broadcast/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── client.rs
│ │ ├── concurrency/
│ │ │ ├── arc_mutex.rs
│ │ │ ├── atomic_cell.rs
│ │ │ ├── ctx/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── tests.rs
│ │ │ │ └── time.rs
│ │ │ ├── demux.rs
│ │ │ ├── mod.rs
│ │ │ ├── rate.rs
│ │ │ ├── rayon.rs
│ │ │ ├── runtime.rs
│ │ │ ├── scope/
│ │ │ │ ├── mod.rs
│ │ │ │ └── tests.rs
│ │ │ ├── signal.rs
│ │ │ └── tests.rs
│ │ ├── config.rs
│ │ ├── config_json.rs
│ │ ├── debug.rs
│ │ ├── lib.rs
│ │ ├── network_protocol/
│ │ │ ├── borsh.rs
│ │ │ ├── borsh_conv.rs
│ │ │ ├── edge.rs
│ │ │ ├── mod.rs
│ │ │ ├── network.proto
│ │ │ ├── peer.rs
│ │ │ ├── proto_conv/
│ │ │ │ ├── account_key.rs
│ │ │ │ ├── crypto.rs
│ │ │ │ ├── handshake.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── net.rs
│ │ │ │ ├── peer_message.rs
│ │ │ │ ├── time.rs
│ │ │ │ ├── trace_context.rs
│ │ │ │ └── util.rs
│ │ │ ├── state_sync.rs
│ │ │ ├── testonly.rs
│ │ │ └── tests.rs
│ │ ├── peer/
│ │ │ ├── mod.rs
│ │ │ ├── peer_actor.rs
│ │ │ ├── stream.rs
│ │ │ ├── testonly.rs
│ │ │ ├── tests/
│ │ │ │ ├── communication.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── stream.rs
│ │ │ ├── tracker.rs
│ │ │ └── transfer_stats.rs
│ │ ├── peer_manager/
│ │ │ ├── connection/
│ │ │ │ ├── mod.rs
│ │ │ │ └── tests.rs
│ │ │ ├── connection_store/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ ├── mod.rs
│ │ │ ├── network_state/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── routing.rs
│ │ │ │ └── tier1.rs
│ │ │ ├── peer_manager_actor.rs
│ │ │ ├── peer_store/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ ├── testonly.rs
│ │ │ └── tests/
│ │ │ ├── accounts_data.rs
│ │ │ ├── connection_pool.rs
│ │ │ ├── mod.rs
│ │ │ ├── nonce.rs
│ │ │ ├── routing.rs
│ │ │ ├── snapshot_hosts.rs
│ │ │ ├── tier1.rs
│ │ │ └── tier2.rs
│ │ ├── private_actix.rs
│ │ ├── raw/
│ │ │ ├── connection.rs
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── routing/
│ │ │ ├── bfs.rs
│ │ │ ├── edge.rs
│ │ │ ├── edge_cache/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ ├── graph/
│ │ │ │ ├── mod.rs
│ │ │ │ └── tests.rs
│ │ │ ├── graph_v2/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ ├── mod.rs
│ │ │ ├── route_back_cache.rs
│ │ │ └── routing_table_view/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── shards_manager.rs
│ │ ├── sink.rs
│ │ ├── snapshot_hosts/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── state_sync.rs
│ │ ├── stats/
│ │ │ ├── metrics.rs
│ │ │ └── mod.rs
│ │ ├── store/
│ │ │ ├── mod.rs
│ │ │ ├── schema/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ └── testonly.rs
│ │ ├── stun/
│ │ │ ├── mod.rs
│ │ │ ├── testonly.rs
│ │ │ └── tests.rs
│ │ ├── tcp.rs
│ │ ├── test_loop.rs
│ │ ├── test_utils.rs
│ │ ├── testonly/
│ │ │ ├── fake_client.rs
│ │ │ ├── mod.rs
│ │ │ └── stream.rs
│ │ └── types.rs
│ ├── pool/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ └── types.rs
│ └── telemetry/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── lib.rs
│ └── metrics.rs
├── cliff.toml
├── codecov.yml
├── core/
│ ├── async/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── actix.rs
│ │ ├── examples/
│ │ │ ├── async_component.rs
│ │ │ ├── async_component_test.rs
│ │ │ ├── mod.rs
│ │ │ ├── multi_instance_test.rs
│ │ │ ├── sum_numbers.rs
│ │ │ ├── sum_numbers_test.rs
│ │ │ ├── timed_component.rs
│ │ │ └── timed_component_test.rs
│ │ ├── futures.rs
│ │ ├── lib.rs
│ │ ├── messaging.rs
│ │ ├── test_loop/
│ │ │ ├── adhoc.rs
│ │ │ ├── delay_sender.rs
│ │ │ ├── event_handler.rs
│ │ │ ├── futures.rs
│ │ │ └── multi_instance.rs
│ │ ├── test_loop.rs
│ │ └── time.rs
│ ├── chain-configs/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── client_config.rs
│ │ ├── genesis_config.rs
│ │ ├── genesis_validate.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ └── updateable_config.rs
│ ├── crypto/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── errors.rs
│ │ ├── hash.rs
│ │ ├── key_conversion.rs
│ │ ├── key_file.rs
│ │ ├── lib.rs
│ │ ├── signature.rs
│ │ ├── signer.rs
│ │ ├── test_utils.rs
│ │ ├── traits.rs
│ │ ├── util.rs
│ │ └── vrf.rs
│ ├── dyn-configs/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── lib.rs
│ │ └── metrics.rs
│ ├── o11y/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── benches/
│ │ │ └── metrics.rs
│ │ └── src/
│ │ ├── context.rs
│ │ ├── delay_detector.rs
│ │ ├── env_filter.rs
│ │ ├── io_tracer.rs
│ │ ├── lib.rs
│ │ ├── log_config.rs
│ │ ├── log_counter.rs
│ │ ├── macros.rs
│ │ ├── metrics.rs
│ │ ├── opentelemetry.rs
│ │ ├── reload.rs
│ │ ├── span_duration_logger.rs
│ │ ├── subscriber.rs
│ │ ├── testonly/
│ │ │ └── tracing_capture.rs
│ │ └── testonly.rs
│ ├── parameters/
│ │ ├── Cargo.toml
│ │ ├── res/
│ │ │ ├── README.md
│ │ │ └── runtime_configs/
│ │ │ ├── 129.yaml
│ │ │ ├── 138.yaml
│ │ │ ├── 35.yaml
│ │ │ ├── 42.yaml
│ │ │ ├── 46.yaml
│ │ │ ├── 48.yaml
│ │ │ ├── 49.yaml
│ │ │ ├── 50.yaml
│ │ │ ├── 52.yaml
│ │ │ ├── 53.yaml
│ │ │ ├── 55.yaml
│ │ │ ├── 57.yaml
│ │ │ ├── 59.yaml
│ │ │ ├── 61.yaml
│ │ │ ├── 62.yaml
│ │ │ ├── 63.yaml
│ │ │ ├── 64.yaml
│ │ │ ├── parameters.snap
│ │ │ ├── parameters.yaml
│ │ │ └── parameters_testnet.yaml
│ │ └── src/
│ │ ├── config.rs
│ │ ├── config_store.rs
│ │ ├── cost.rs
│ │ ├── lib.rs
│ │ ├── parameter.rs
│ │ ├── parameter_table.rs
│ │ ├── snapshots/
│ │ │ ├── unc_parameters__config_store__tests__138.json.snap
│ │ │ ├── unc_parameters__config_store__tests__testnet_138.json.snap
│ │ │ └── unc_parameters__view__tests__runtime_config_view.snap
│ │ ├── view.rs
│ │ └── vm.rs
│ ├── primitives/
│ │ ├── Cargo.toml
│ │ ├── benches/
│ │ │ └── serialization.rs
│ │ └── src/
│ │ ├── action/
│ │ │ ├── delegate.rs
│ │ │ └── mod.rs
│ │ ├── block.rs
│ │ ├── block_header.rs
│ │ ├── challenge.rs
│ │ ├── chunk_validation.rs
│ │ ├── epoch_manager.rs
│ │ ├── epoch_sync.rs
│ │ ├── errors.rs
│ │ ├── lib.rs
│ │ ├── merkle.rs
│ │ ├── network.rs
│ │ ├── rand.rs
│ │ ├── receipt.rs
│ │ ├── runtime/
│ │ │ ├── apply_state.rs
│ │ │ ├── migration_data.rs
│ │ │ └── mod.rs
│ │ ├── sandbox.rs
│ │ ├── shard_layout.rs
│ │ ├── sharding/
│ │ │ └── shard_chunk_header_inner.rs
│ │ ├── sharding.rs
│ │ ├── signable_message.rs
│ │ ├── snapshots/
│ │ │ ├── unc_primitives__views__tests__exec_metadata_v1_view.snap
│ │ │ ├── unc_primitives__views__tests__exec_metadata_v2_view.snap
│ │ │ ├── unc_primitives__views__tests__exec_metadata_v3_view.snap
│ │ │ └── unc_primitives__views__tests__runtime_config_view.snap
│ │ ├── state.rs
│ │ ├── state_part.rs
│ │ ├── state_record.rs
│ │ ├── state_sync.rs
│ │ ├── static_clock.rs
│ │ ├── telemetry.rs
│ │ ├── test_utils.rs
│ │ ├── transaction.rs
│ │ ├── trie_key.rs
│ │ ├── types.rs
│ │ ├── upgrade_schedule.rs
│ │ ├── utils/
│ │ │ └── min_heap.rs
│ │ ├── utils.rs
│ │ ├── validator_mandates.rs
│ │ ├── validator_signer.rs
│ │ ├── version.rs
│ │ └── views.rs
│ ├── primitives-core/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── account.rs
│ │ ├── chains.rs
│ │ ├── config.rs
│ │ ├── hash.rs
│ │ ├── lib.rs
│ │ ├── serialize.rs
│ │ ├── types.rs
│ │ └── version.rs
│ └── store/
│ ├── Cargo.toml
│ ├── benches/
│ │ ├── finalize_bench.rs
│ │ ├── store_bench.rs
│ │ └── trie_bench.rs
│ └── src/
│ ├── cold_storage.rs
│ ├── columns.rs
│ ├── config.rs
│ ├── db/
│ │ ├── colddb.rs
│ │ ├── database_tests.rs
│ │ ├── refcount.rs
│ │ ├── rocksdb/
│ │ │ ├── instance_tracker.rs
│ │ │ └── snapshot.rs
│ │ ├── rocksdb.rs
│ │ ├── slice.rs
│ │ ├── splitdb.rs
│ │ └── testdb.rs
│ ├── db.rs
│ ├── flat/
│ │ ├── chunk_view.rs
│ │ ├── delta.rs
│ │ ├── inlining_migration.rs
│ │ ├── manager.rs
│ │ ├── metrics.rs
│ │ ├── mod.rs
│ │ ├── storage.rs
│ │ ├── store_helper.rs
│ │ ├── test_utils.rs
│ │ └── types.rs
│ ├── genesis/
│ │ ├── initialization.rs
│ │ ├── mod.rs
│ │ └── state_applier.rs
│ ├── lib.rs
│ ├── metadata.rs
│ ├── metrics.rs
│ ├── migrations.rs
│ ├── opener.rs
│ ├── rocksdb_metrics.rs
│ ├── sync_utils.rs
│ ├── test_utils.rs
│ └── trie/
│ ├── accounting_cache.rs
│ ├── config.rs
│ ├── from_flat.rs
│ ├── insert_delete.rs
│ ├── iterator.rs
│ ├── mem/
│ │ ├── arena/
│ │ │ ├── alloc.rs
│ │ │ ├── metrics.rs
│ │ │ └── mod.rs
│ │ ├── construction.rs
│ │ ├── flexible_data/
│ │ │ ├── children.rs
│ │ │ ├── encoding.rs
│ │ │ ├── extension.rs
│ │ │ ├── mod.rs
│ │ │ └── value.rs
│ │ ├── loading.rs
│ │ ├── lookup.rs
│ │ ├── metrics.rs
│ │ ├── mod.rs
│ │ ├── node/
│ │ │ ├── encoding.rs
│ │ │ ├── mod.rs
│ │ │ ├── mutation.rs
│ │ │ ├── tests.rs
│ │ │ └── view.rs
│ │ └── updating.rs
│ ├── mod.rs
│ ├── nibble_slice.rs
│ ├── prefetching_trie_storage.rs
│ ├── raw_node.rs
│ ├── resharding.rs
│ ├── shard_tries.rs
│ ├── state_parts.rs
│ ├── state_snapshot.rs
│ ├── trie_recording.rs
│ ├── trie_storage.rs
│ ├── trie_tests.rs
│ ├── update/
│ │ └── iterator.rs
│ └── update.rs
├── deny.toml
├── docs/
│ ├── README.md
│ ├── SUMMARY.md
│ ├── advanced_configuration/
│ │ └── networking.md
│ ├── architecture/
│ │ ├── README.md
│ │ ├── gas/
│ │ │ ├── README.md
│ │ │ ├── estimator.md
│ │ │ ├── gas_profile.md
│ │ │ └── parameter_definition.md
│ │ ├── how/
│ │ │ ├── README.md
│ │ │ ├── epoch.md
│ │ │ ├── gas.md
│ │ │ ├── gc.md
│ │ │ ├── meta-tx.md
│ │ │ ├── proofs.md
│ │ │ ├── serialization.md
│ │ │ ├── sync.md
│ │ │ ├── tx_receipts.md
│ │ │ └── tx_routing.md
│ │ ├── network.md
│ │ ├── next/
│ │ │ ├── README.md
│ │ │ ├── catchup_and_state_sync.md
│ │ │ └── malicious_chunk_producer_and_phase2.md
│ │ ├── storage/
│ │ │ ├── database.md
│ │ │ ├── flat_storage.md
│ │ │ ├── flow.md
│ │ │ └── trie.md
│ │ └── storage.md
│ ├── book.toml
│ ├── misc/
│ │ ├── README.md
│ │ ├── state_sync_dump.md
│ │ └── state_sync_from_external_storage.md
│ ├── practices/
│ │ ├── README.md
│ │ ├── docs.md
│ │ ├── engaging_and_effective_communication.md
│ │ ├── fast_builds.md
│ │ ├── protocol_upgrade.md
│ │ ├── rust.md
│ │ ├── security_vulnerabilities.md
│ │ ├── style.md
│ │ ├── testing/
│ │ │ ├── README.md
│ │ │ ├── python_tests.md
│ │ │ └── test_utils.md
│ │ ├── tracking_issues.md
│ │ ├── when_to_use_private_repository.md
│ │ └── workflows/
│ │ ├── README.md
│ │ ├── deploy_a_contract.md
│ │ ├── gas_estimations.md
│ │ ├── io_trace.md
│ │ ├── localnet_on_many_machines.md
│ │ └── run_a_node.md
│ └── test_networks/
│ └── mainnet_spoon.md
├── genesis-tools/
│ ├── README.md
│ ├── genesis-csv-to-json/
│ │ ├── Cargo.toml
│ │ ├── res/
│ │ │ └── test_accounts.csv
│ │ └── src/
│ │ ├── csv_parser.rs
│ │ ├── csv_to_json_configs.rs
│ │ ├── main.rs
│ │ └── serde_with.rs
│ ├── genesis-populate/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ └── state_dump.rs
│ └── keypair-generator/
│ ├── Cargo.toml
│ └── src/
│ └── main.rs
├── infra/
│ ├── Cargo.toml
│ ├── benches/
│ │ └── store.rs
│ ├── res/
│ │ ├── example-config-gc.json
│ │ └── example-config-no-gc.json
│ ├── src/
│ │ ├── append_only_map.rs
│ │ ├── cold_storage.rs
│ │ ├── config.rs
│ │ ├── config_validate.rs
│ │ ├── download_file.rs
│ │ ├── dyn_config.rs
│ │ ├── entity_debug.rs
│ │ ├── entity_debug_serializer.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── migrations.rs
│ │ ├── runtime/
│ │ │ ├── errors.rs
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── state_sync.rs
│ │ └── test_utils.rs
│ └── tests/
│ └── economics.rs
├── integration-tests/
│ ├── Cargo.toml
│ └── src/
│ ├── genesis_helpers.rs
│ ├── lib.rs
│ ├── node/
│ │ ├── mod.rs
│ │ ├── process_node.rs
│ │ ├── runtime_node.rs
│ │ └── thread_node.rs
│ ├── runtime_utils.rs
│ ├── test_helpers.rs
│ ├── tests/
│ │ ├── client/
│ │ │ ├── access_key_nonce_for_implicit_accounts.rs
│ │ │ ├── account_id_in_function_call_permission.rs
│ │ │ ├── adversarial_behaviors.rs
│ │ │ ├── benchmarks.rs
│ │ │ ├── block_corruption.rs
│ │ │ ├── cap_max_gas_price.rs
│ │ │ ├── challenges.rs
│ │ │ ├── chunk_nodes_cache.rs
│ │ │ ├── chunk_validation.rs
│ │ │ ├── chunks_management.rs
│ │ │ ├── cold_storage.rs
│ │ │ ├── epoch_sync.rs
│ │ │ ├── fix_contract_loading_cost.rs
│ │ │ ├── fix_storage_usage.rs
│ │ │ ├── flat_storage.rs
│ │ │ ├── in_memory_tries.rs
│ │ │ ├── increase_deployment_cost.rs
│ │ │ ├── increase_storage_compute_cost.rs
│ │ │ ├── limit_contract_functions_number.rs
│ │ │ ├── lower_storage_key_limit.rs
│ │ │ ├── mod.rs
│ │ │ ├── process_blocks.rs
│ │ │ ├── restore_receipts_after_fix_apply_chunks.rs
│ │ │ ├── runtimes.rs
│ │ │ ├── sandbox.rs
│ │ │ ├── state_dump.rs
│ │ │ ├── state_snapshot.rs
│ │ │ ├── sync_state_nodes.rs
│ │ │ ├── uncvm.rs
│ │ │ ├── undo_block.rs
│ │ │ ├── wallet_contract.rs
│ │ │ └── zero_balance_account.rs
│ │ ├── framework/
│ │ │ ├── mod.rs
│ │ │ ├── node_cluster.rs
│ │ │ ├── pledge_nodes.rs
│ │ │ ├── rpc_error_structs.rs
│ │ │ ├── rpc_nodes.rs
│ │ │ ├── run_nodes.rs
│ │ │ ├── sync_nodes.rs
│ │ │ └── track_shards.rs
│ │ ├── mod.rs
│ │ ├── network/
│ │ │ ├── churn_attack.rs
│ │ │ ├── full_network.rs
│ │ │ ├── mod.rs
│ │ │ ├── peer_handshake.rs
│ │ │ ├── runner.rs
│ │ │ └── stress_network.rs
│ │ ├── runtime/
│ │ │ ├── deployment.rs
│ │ │ ├── mod.rs
│ │ │ ├── sanity_checks.rs
│ │ │ ├── snapshots/
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nightly.snap
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nondeterministic.snap
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nondeterministic_nightly.snap
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_status.snap
│ │ │ │ └── integration_tests__tests__runtime__sanity_checks__receipts_status_nondeterministic.snap
│ │ │ ├── state_viewer.rs
│ │ │ └── test_evil_contracts.rs
│ │ ├── standard_cases/
│ │ │ ├── mod.rs
│ │ │ ├── rpc.rs
│ │ │ └── runtime.rs
│ │ ├── test_catchup.rs
│ │ ├── test_errors.rs
│ │ ├── test_overflows.rs
│ │ ├── test_simple.rs
│ │ └── test_tps_regression.rs
│ ├── unc_utils.rs
│ └── user/
│ ├── mod.rs
│ ├── rpc_user.rs
│ └── runtime_user.rs
├── lychee.toml
├── node/
│ ├── Cargo.toml
│ ├── build.rs
│ ├── res/
│ │ ├── invalid_proof.json
│ │ └── proof_example.json
│ └── src/
│ ├── cli.rs
│ └── main.rs
├── pytest/
│ ├── Pipfile
│ ├── README.md
│ ├── __init__.py
│ ├── debug_scripts/
│ │ ├── Pipfile
│ │ ├── READEME.md
│ │ ├── __init__.py
│ │ ├── request_chain_info.py
│ │ ├── send_validator_logs.py
│ │ └── tests/
│ │ ├── __init__.py
│ │ ├── data/
│ │ │ └── node0.logs
│ │ └── send_validator_logs_test.py
│ ├── endtoend/
│ │ ├── __init__.py
│ │ └── endtoend.py
│ ├── lib/
│ │ ├── __init__.py
│ │ ├── account.py
│ │ ├── branches.py
│ │ ├── cluster.py
│ │ ├── configured_logger.py
│ │ ├── data.py
│ │ ├── key.py
│ │ ├── lightclient.py
│ │ ├── messages/
│ │ │ ├── __init__.py
│ │ │ ├── block.py
│ │ │ ├── bridge.py
│ │ │ ├── crypto.py
│ │ │ ├── network.py
│ │ │ ├── shard.py
│ │ │ └── tx.py
│ │ ├── metrics.py
│ │ ├── mocknet.py
│ │ ├── mocknet_helpers.py
│ │ ├── network.py
│ │ ├── peer.py
│ │ ├── populate.py
│ │ ├── proxy.py
│ │ ├── proxy_instances.py
│ │ ├── resharding_lib.py
│ │ ├── serializer.py
│ │ ├── state_sync_lib.py
│ │ ├── transaction.py
│ │ └── utils.py
│ ├── remote.json
│ ├── requirements.txt
│ ├── tests/
│ │ ├── __init__.py
│ │ ├── delete_remote_nodes.py
│ │ └── loadtest/
│ │ ├── README.md
│ │ ├── contract/
│ │ │ ├── Cargo.toml
│ │ │ ├── build.sh
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── loadtest.py
│ │ ├── loadtest2.py
│ │ ├── locust/
│ │ │ ├── README.md
│ │ │ ├── common/
│ │ │ │ ├── base.py
│ │ │ │ ├── congestion.py
│ │ │ │ ├── ft.py
│ │ │ │ └── social.py
│ │ │ ├── locustfiles/
│ │ │ │ ├── congestion.py
│ │ │ │ ├── ft.py
│ │ │ │ └── social.py
│ │ │ └── res/
│ │ │ └── social_db.wasm
│ │ └── setup.py
│ └── tools/
│ ├── mirror/
│ │ ├── contract/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── mirror_utils.py
│ │ ├── offline_test.py
│ │ └── online_test.py
│ └── prober/
│ ├── prober.py
│ ├── prober_split.py
│ └── prober_util.py
├── runtime/
│ ├── runtime/
│ │ ├── Cargo.toml
│ │ ├── src/
│ │ │ ├── actions.rs
│ │ │ ├── adapter.rs
│ │ │ ├── balance_checker.rs
│ │ │ ├── config.rs
│ │ │ ├── ext.rs
│ │ │ ├── lib.rs
│ │ │ ├── metrics.rs
│ │ │ ├── prefetch.rs
│ │ │ ├── receipt_manager.rs
│ │ │ ├── state_viewer/
│ │ │ │ ├── errors.rs
│ │ │ │ └── mod.rs
│ │ │ └── verifier.rs
│ │ └── tests/
│ │ ├── runtime_group_tools/
│ │ │ ├── mod.rs
│ │ │ └── random_config.rs
│ │ └── test_async_calls.rs
│ ├── runtime-params-estimator/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── compiler.sh
│ │ ├── costs.txt
│ │ ├── emu-cost/
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── build.sh
│ │ │ ├── counter_plugin/
│ │ │ │ ├── 0001-linux-user-fix-page-table-trashing-when-mmap-munmap-.patch
│ │ │ │ ├── 0002-linux-user-strace-better-format-mmap-logs-support-mr.patch
│ │ │ │ ├── 0003-plugins-avoid-failing-plugin-when-CPU-is-inited-seve.patch
│ │ │ │ ├── Makefile
│ │ │ │ ├── counter.c
│ │ │ │ ├── qemu-x86_64
│ │ │ │ └── test.c
│ │ │ ├── data_builder.py
│ │ │ ├── io_cost.sh
│ │ │ └── run.sh
│ │ ├── estimate.sh
│ │ ├── estimator-warehouse/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── src/
│ │ │ ├── check.rs
│ │ │ ├── db.rs
│ │ │ ├── estimate.rs
│ │ │ ├── import.rs
│ │ │ ├── init.sql
│ │ │ ├── main.rs
│ │ │ ├── snapshots/
│ │ │ │ ├── estimator_warehouse__check__tests__check_command-2.snap
│ │ │ │ ├── estimator_warehouse__check__tests__check_command-3.snap
│ │ │ │ ├── estimator_warehouse__check__tests__check_command-4.snap
│ │ │ │ ├── estimator_warehouse__check__tests__check_command.snap
│ │ │ │ └── estimator_warehouse__tests__stats.snap
│ │ │ └── zulip.rs
│ │ ├── res/
│ │ │ ├── 75220100-75220101.s0.io_trace
│ │ │ ├── fungible_token.wasm
│ │ │ ├── lockup_contract.wasm
│ │ │ ├── mission_control.wasm
│ │ │ ├── staking_pool.wasm
│ │ │ ├── status_message.wasm
│ │ │ ├── voting_contract.wasm
│ │ │ └── whitelist.wasm
│ │ ├── setup.sh
│ │ └── src/
│ │ ├── action_costs.rs
│ │ ├── config.rs
│ │ ├── cost.rs
│ │ ├── cost_table.rs
│ │ ├── costs_to_runtime_config.rs
│ │ ├── estimator_context.rs
│ │ ├── estimator_params.rs
│ │ ├── function_call.rs
│ │ ├── gas_cost.rs
│ │ ├── gas_metering.rs
│ │ ├── least_squares.rs
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ ├── qemu.rs
│ │ ├── replay/
│ │ │ ├── cache_stats.rs
│ │ │ ├── fold_db_ops.rs
│ │ │ └── gas_charges.rs
│ │ ├── replay.rs
│ │ ├── rocksdb.rs
│ │ ├── snapshots/
│ │ │ ├── runtime_params_estimator__replay__tests__CacheStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__CacheStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__CacheStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__CacheStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkCacheStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkCacheStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkCacheStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkCacheStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkDbStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkDbStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkDbStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkDbStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__GasCharges-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__GasCharges-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__GasCharges-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__GasCharges-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptCacheStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptCacheStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptCacheStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptCacheStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptDbStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptDbStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptDbStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptDbStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__account_filter_CacheStats.snap
│ │ │ ├── runtime_params_estimator__replay__tests__account_filter_ReceiptCacheStats.snap
│ │ │ └── runtime_params_estimator__replay__tests__account_filter_ReceiptDbStats.snap
│ │ ├── transaction_builder.rs
│ │ ├── trie.rs
│ │ ├── utils.rs
│ │ └── vm_estimator.rs
│ ├── unc-test-contracts/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── contract-for-fuzzing-rs/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── estimator-contract/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── res/
│ │ │ ├── .gitignore
│ │ │ ├── test_contract_ts.wasm
│ │ │ └── unc_evm.wasm
│ │ ├── src/
│ │ │ └── lib.rs
│ │ └── test-contract-rs/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── unc-vm/
│ │ ├── .gitignore
│ │ ├── ATTRIBUTIONS.md
│ │ ├── README.md
│ │ ├── compiler/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── src/
│ │ │ ├── address_map.rs
│ │ │ ├── compiler.rs
│ │ │ ├── error.rs
│ │ │ ├── function.rs
│ │ │ ├── jump_table.rs
│ │ │ ├── lib.rs
│ │ │ ├── module.rs
│ │ │ ├── relocation.rs
│ │ │ ├── section.rs
│ │ │ ├── sourceloc.rs
│ │ │ ├── target.rs
│ │ │ ├── translator/
│ │ │ │ ├── environ.rs
│ │ │ │ ├── error.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── module.rs
│ │ │ │ ├── sections.rs
│ │ │ │ └── state.rs
│ │ │ └── trap.rs
│ │ ├── compiler-singlepass/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── src/
│ │ │ ├── address_map.rs
│ │ │ ├── codegen_x64.rs
│ │ │ ├── compiler.rs
│ │ │ ├── config.rs
│ │ │ ├── emitter_x64.rs
│ │ │ ├── lib.rs
│ │ │ ├── machine.rs
│ │ │ └── x64_decl.rs
│ │ ├── compiler-test-derive/
│ │ │ ├── Cargo.toml
│ │ │ ├── build.rs
│ │ │ └── src/
│ │ │ ├── ignores.rs
│ │ │ └── lib.rs
│ │ ├── engine/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── src/
│ │ │ ├── engine.rs
│ │ │ ├── error.rs
│ │ │ ├── export.rs
│ │ │ ├── lib.rs
│ │ │ ├── resolver.rs
│ │ │ ├── trap/
│ │ │ │ ├── error.rs
│ │ │ │ ├── frame_info.rs
│ │ │ │ └── mod.rs
│ │ │ └── universal/
│ │ │ ├── artifact.rs
│ │ │ ├── builder.rs
│ │ │ ├── code_memory.rs
│ │ │ ├── engine.rs
│ │ │ ├── executable.rs
│ │ │ ├── link.rs
│ │ │ └── mod.rs
│ │ ├── test-api/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ └── src/
│ │ │ ├── lib.rs
│ │ │ └── sys/
│ │ │ ├── env.rs
│ │ │ ├── exports.rs
│ │ │ ├── externals/
│ │ │ │ ├── function.rs
│ │ │ │ ├── global.rs
│ │ │ │ ├── memory.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── table.rs
│ │ │ ├── import_object.rs
│ │ │ ├── instance.rs
│ │ │ ├── mod.rs
│ │ │ ├── module.rs
│ │ │ ├── native.rs
│ │ │ ├── ptr.rs
│ │ │ ├── store.rs
│ │ │ ├── tunables.rs
│ │ │ └── types.rs
│ │ ├── test-generator/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ ├── lib.rs
│ │ │ └── processors.rs
│ │ ├── tests/
│ │ │ ├── compilers/
│ │ │ │ ├── compilation.rs
│ │ │ │ ├── config.rs
│ │ │ │ ├── deterministic.rs
│ │ │ │ ├── imports.rs
│ │ │ │ ├── issues.rs
│ │ │ │ ├── main.rs
│ │ │ │ ├── multi_value_imports.rs
│ │ │ │ ├── native_functions.rs
│ │ │ │ ├── serialize.rs
│ │ │ │ ├── stack_limiter.rs
│ │ │ │ ├── traps.rs
│ │ │ │ └── wast.rs
│ │ │ ├── deprecated/
│ │ │ │ └── README.md
│ │ │ ├── deprecated.rs
│ │ │ ├── examples/
│ │ │ │ ├── add.wat
│ │ │ │ ├── call_indirect.wat
│ │ │ │ ├── fac.wat
│ │ │ │ ├── fib.wat
│ │ │ │ ├── global.wat
│ │ │ │ ├── invalid.wat
│ │ │ │ ├── memory.wat
│ │ │ │ ├── no_start.wat
│ │ │ │ └── trap.wat
│ │ │ ├── ignores.txt
│ │ │ ├── lib/
│ │ │ │ └── compiler-test-derive/
│ │ │ │ └── src/
│ │ │ │ └── lib.rs.orig
│ │ │ └── wast/
│ │ │ ├── README.md
│ │ │ ├── spec/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Contributing.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── address.wast
│ │ │ │ ├── align.wast
│ │ │ │ ├── binary-leb128.wast
│ │ │ │ ├── binary.wast
│ │ │ │ ├── block.wast
│ │ │ │ ├── br.wast
│ │ │ │ ├── br_if.wast
│ │ │ │ ├── br_table.wast
│ │ │ │ ├── bulk.wast
│ │ │ │ ├── call.wast
│ │ │ │ ├── call_indirect.wast
│ │ │ │ ├── comments.wast
│ │ │ │ ├── const.wast
│ │ │ │ ├── conversions.wast
│ │ │ │ ├── custom.wast
│ │ │ │ ├── data.wast
│ │ │ │ ├── elem.wast
│ │ │ │ ├── endianness.wast
│ │ │ │ ├── exports.wast
│ │ │ │ ├── extract-parts.sh
│ │ │ │ ├── f32.wast
│ │ │ │ ├── f32_bitwise.wast
│ │ │ │ ├── f32_cmp.wast
│ │ │ │ ├── f64.wast
│ │ │ │ ├── f64_bitwise.wast
│ │ │ │ ├── f64_cmp.wast
│ │ │ │ ├── fac.wast
│ │ │ │ ├── float_exprs.wast
│ │ │ │ ├── float_literals.wast
│ │ │ │ ├── float_memory.wast
│ │ │ │ ├── float_misc.wast
│ │ │ │ ├── forward.wast
│ │ │ │ ├── func.wast
│ │ │ │ ├── func_ptrs.wast
│ │ │ │ ├── global.wast
│ │ │ │ ├── i32.wast
│ │ │ │ ├── i64.wast
│ │ │ │ ├── if.wast
│ │ │ │ ├── imports.wast
│ │ │ │ ├── inline-module.wast
│ │ │ │ ├── int_exprs.wast
│ │ │ │ ├── int_literals.wast
│ │ │ │ ├── labels.wast
│ │ │ │ ├── left-to-right.wast
│ │ │ │ ├── linking.wast
│ │ │ │ ├── load.wast
│ │ │ │ ├── local_get.wast
│ │ │ │ ├── local_set.wast
│ │ │ │ ├── local_tee.wast
│ │ │ │ ├── loop.wast
│ │ │ │ ├── memory.wast
│ │ │ │ ├── memory_copy.wast
│ │ │ │ ├── memory_fill.wast
│ │ │ │ ├── memory_grow.wast
│ │ │ │ ├── memory_init.wast
│ │ │ │ ├── memory_redundancy.wast
│ │ │ │ ├── memory_size.wast
│ │ │ │ ├── memory_trap.wast
│ │ │ │ ├── names.wast
│ │ │ │ ├── nop.wast
│ │ │ │ ├── proposals/
│ │ │ │ │ ├── annotations/
│ │ │ │ │ │ └── annotations.wast
│ │ │ │ │ ├── bulk-memory-operations/
│ │ │ │ │ │ ├── binary.wast
│ │ │ │ │ │ ├── bulk.wast
│ │ │ │ │ │ ├── custom.wast
│ │ │ │ │ │ ├── data.wast
│ │ │ │ │ │ ├── elem.wast
│ │ │ │ │ │ ├── imports.wast
│ │ │ │ │ │ ├── linking.wast
│ │ │ │ │ │ ├── memory_copy.wast
│ │ │ │ │ │ ├── memory_fill.wast
│ │ │ │ │ │ ├── memory_init.wast
│ │ │ │ │ │ ├── table_copy.wast
│ │ │ │ │ │ └── table_init.wast
│ │ │ │ │ ├── gc/
│ │ │ │ │ │ ├── array.wast
│ │ │ │ │ │ ├── binary.wast
│ │ │ │ │ │ ├── br_on.wast
│ │ │ │ │ │ ├── br_on_cast.wast
│ │ │ │ │ │ ├── br_on_null.wast
│ │ │ │ │ │ ├── br_table.wast
│ │ │ │ │ │ ├── call_ref.wast
│ │ │ │ │ │ ├── func.wast
│ │ │ │ │ │ ├── func_bind.wast
│ │ │ │ │ │ ├── i31.wast
│ │ │ │ │ │ ├── if.wast
│ │ │ │ │ │ ├── let.wast
│ │ │ │ │ │ ├── linking.wast
│ │ │ │ │ │ ├── ref.wast
│ │ │ │ │ │ ├── ref_as.wast
│ │ │ │ │ │ ├── ref_as_non_null.wast
│ │ │ │ │ │ ├── ref_cast.wast
│ │ │ │ │ │ ├── ref_eq.wast
│ │ │ │ │ │ ├── ref_is.wast
│ │ │ │ │ │ ├── ref_is_null.wast
│ │ │ │ │ │ ├── ref_null.wast
│ │ │ │ │ │ ├── ref_test.wast
│ │ │ │ │ │ ├── return_call_ref.wast
│ │ │ │ │ │ ├── select.wast
│ │ │ │ │ │ ├── struct.wast
│ │ │ │ │ │ ├── table-sub.wast
│ │ │ │ │ │ ├── table.wast
│ │ │ │ │ │ ├── type-equivalence.wast
│ │ │ │ │ │ └── unreached-invalid.wast
│ │ │ │ │ ├── multi-value/
│ │ │ │ │ │ ├── binary.wast
│ │ │ │ │ │ ├── block.wast
│ │ │ │ │ │ ├── br.wast
│ │ │ │ │ │ ├── call.wast
│ │ │ │ │ │ ├── call_indirect.wast
│ │ │ │ │ │ ├── fac.wast
│ │ │ │ │ │ ├── func.wast
│ │ │ │ │ │ ├── if.wast
│ │ │ │ │ │ ├── loop.wast
│ │ │ │ │ │ └── type.wast
│ │ │ │ │ ├── mutable-global/
│ │ │ │ │ │ ├── globals.wast
│ │ │ │ │ │ └── linking.wast
│ │ │ │ │ ├── nontrapping-float-to-int-conversions/
│ │ │ │ │ │ └── conversions.wast
│ │ │ │ │ ├── reference-types/
│ │ │ │ │ │ ├── binary.wast
│ │ │ │ │ │ ├── br_table.wast
│ │ │ │ │ │ ├── bulk.wast
│ │ │ │ │ │ ├── custom.wast
│ │ │ │ │ │ ├── data.wast
│ │ │ │ │ │ ├── elem.wast
│ │ │ │ │ │ ├── exports.wast
│ │ │ │ │ │ ├── globals.wast
│ │ │ │ │ │ ├── imports.wast
│ │ │ │ │ │ ├── linking.wast
│ │ │ │ │ │ ├── memory_copy.wast
│ │ │ │ │ │ ├── memory_fill.wast
│ │ │ │ │ │ ├── memory_grow.wast
│ │ │ │ │ │ ├── memory_init.wast
│ │ │ │ │ │ ├── ref_func.wast
│ │ │ │ │ │ ├── ref_is_null.wast
│ │ │ │ │ │ ├── ref_null.wast
│ │ │ │ │ │ ├── select.wast
│ │ │ │ │ │ ├── table-sub.wast
│ │ │ │ │ │ ├── table_copy.wast
│ │ │ │ │ │ ├── table_fill.wast
│ │ │ │ │ │ ├── table_get.wast
│ │ │ │ │ │ ├── table_grow.wast
│ │ │ │ │ │ ├── table_init.wast
│ │ │ │ │ │ ├── table_set.wast
│ │ │ │ │ │ ├── table_size.wast
│ │ │ │ │ │ └── unreached-invalid.wast
│ │ │ │ │ ├── sign-extension-ops/
│ │ │ │ │ │ ├── i32.wast
│ │ │ │ │ │ └── i64.wast
│ │ │ │ │ ├── simd/
│ │ │ │ │ │ ├── simd_address.wast
│ │ │ │ │ │ ├── simd_align.wast
│ │ │ │ │ │ ├── simd_bit_shift.wast
│ │ │ │ │ │ ├── simd_bitwise.wast
│ │ │ │ │ │ ├── simd_boolean.wast
│ │ │ │ │ │ ├── simd_const.wast
│ │ │ │ │ │ ├── simd_conversions.wast
│ │ │ │ │ │ ├── simd_f32x4.wast
│ │ │ │ │ │ ├── simd_f32x4_arith.wast
│ │ │ │ │ │ ├── simd_f32x4_cmp.wast
│ │ │ │ │ │ ├── simd_f32x4_pmin_pmax.wast
│ │ │ │ │ │ ├── simd_f32x4_rounding.wast
│ │ │ │ │ │ ├── simd_f64x2.wast
│ │ │ │ │ │ ├── simd_f64x2_arith.wast
│ │ │ │ │ │ ├── simd_f64x2_cmp.wast
│ │ │ │ │ │ ├── simd_f64x2_pmin_pmax.wast
│ │ │ │ │ │ ├── simd_f64x2_rounding.wast
│ │ │ │ │ │ ├── simd_i16x8_arith.wast
│ │ │ │ │ │ ├── simd_i16x8_arith2.wast
│ │ │ │ │ │ ├── simd_i16x8_cmp.wast
│ │ │ │ │ │ ├── simd_i16x8_extadd_pairwise_i8x16.wast
│ │ │ │ │ │ ├── simd_i16x8_extmul_i8x16.wast
│ │ │ │ │ │ ├── simd_i16x8_q15mulr_sat_s.wast
│ │ │ │ │ │ ├── simd_i16x8_sat_arith.wast
│ │ │ │ │ │ ├── simd_i32x4_arith.wast
│ │ │ │ │ │ ├── simd_i32x4_arith2.wast
│ │ │ │ │ │ ├── simd_i32x4_cmp.wast
│ │ │ │ │ │ ├── simd_i32x4_dot_i16x8.wast
│ │ │ │ │ │ ├── simd_i32x4_extadd_pairwise_i16x8.wast
│ │ │ │ │ │ ├── simd_i32x4_extmul_i16x8.wast
│ │ │ │ │ │ ├── simd_i32x4_trunc_sat_f32x4.wast
│ │ │ │ │ │ ├── simd_i32x4_trunc_sat_f64x2.wast
│ │ │ │ │ │ ├── simd_i64x2_arith.wast
│ │ │ │ │ │ ├── simd_i64x2_arith2.wast
│ │ │ │ │ │ ├── simd_i64x2_cmp.wast
│ │ │ │ │ │ ├── simd_i64x2_extmul_i32x4.wast
│ │ │ │ │ │ ├── simd_i8x16_arith.wast
│ │ │ │ │ │ ├── simd_i8x16_arith2.wast
│ │ │ │ │ │ ├── simd_i8x16_cmp.wast
│ │ │ │ │ │ ├── simd_i8x16_sat_arith.wast
│ │ │ │ │ │ ├── simd_int_to_int_extend.wast
│ │ │ │ │ │ ├── simd_lane.wast
│ │ │ │ │ │ ├── simd_load.wast
│ │ │ │ │ │ ├── simd_load16_lane.wast
│ │ │ │ │ │ ├── simd_load32_lane.wast
│ │ │ │ │ │ ├── simd_load64_lane.wast
│ │ │ │ │ │ ├── simd_load8_lane.wast
│ │ │ │ │ │ ├── simd_load_extend.wast
│ │ │ │ │ │ ├── simd_load_splat.wast
│ │ │ │ │ │ ├── simd_load_zero.wast
│ │ │ │ │ │ ├── simd_splat.wast
│ │ │ │ │ │ ├── simd_store.wast
│ │ │ │ │ │ ├── simd_store16_lane.wast
│ │ │ │ │ │ ├── simd_store32_lane.wast
│ │ │ │ │ │ ├── simd_store64_lane.wast
│ │ │ │ │ │ └── simd_store8_lane.wast
│ │ │ │ │ ├── tail-call/
│ │ │ │ │ │ ├── return_call.wast
│ │ │ │ │ │ └── return_call_indirect.wast
│ │ │ │ │ └── threads/
│ │ │ │ │ ├── atomic.wast
│ │ │ │ │ ├── exports.wast
│ │ │ │ │ ├── imports.wast
│ │ │ │ │ └── memory.wast
│ │ │ │ ├── ref_func.wast
│ │ │ │ ├── ref_is_null.wast
│ │ │ │ ├── ref_null.wast
│ │ │ │ ├── return.wast
│ │ │ │ ├── select.wast
│ │ │ │ ├── skip-stack-guard-page.wast
│ │ │ │ ├── stack.wast
│ │ │ │ ├── start.wast
│ │ │ │ ├── store.wast
│ │ │ │ ├── switch.wast
│ │ │ │ ├── table-sub.wast
│ │ │ │ ├── table.wast
│ │ │ │ ├── table_copy.wast
│ │ │ │ ├── table_fill.wast
│ │ │ │ ├── table_get.wast
│ │ │ │ ├── table_grow.wast
│ │ │ │ ├── table_init.wast
│ │ │ │ ├── table_set.wast
│ │ │ │ ├── table_size.wast
│ │ │ │ ├── token.wast
│ │ │ │ ├── traps.wast
│ │ │ │ ├── type.wast
│ │ │ │ ├── unreachable.wast
│ │ │ │ ├── unreached-invalid.wast
│ │ │ │ ├── unwind.wast
│ │ │ │ ├── update-testsuite.sh
│ │ │ │ ├── utf8-custom-section-id.wast
│ │ │ │ ├── utf8-import-field.wast
│ │ │ │ ├── utf8-import-module.wast
│ │ │ │ └── utf8-invalid-encoding.wast
│ │ │ └── wasmer/
│ │ │ ├── README.md
│ │ │ ├── call-indirect-spilled-stack.wast
│ │ │ ├── fac.wast
│ │ │ ├── int-extend-garbage.wast
│ │ │ ├── max_locals.wast
│ │ │ ├── max_size_of_memory.wast
│ │ │ ├── multiple-traps.wast
│ │ │ ├── nan-canonicalization-issue-2159.wast
│ │ │ ├── nan-canonicalization-issue-2347.wast
│ │ │ ├── nan-canonicalization.wast
│ │ │ ├── rotate-shift-overflow.wast
│ │ │ ├── stack-overflow-sret.wast
│ │ │ └── stack-overflow.wast
│ │ ├── types/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── src/
│ │ │ │ ├── archives.rs
│ │ │ │ ├── entity/
│ │ │ │ │ ├── boxed_slice.rs
│ │ │ │ │ ├── iter.rs
│ │ │ │ │ ├── keys.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ ├── packed_option.rs
│ │ │ │ │ ├── primary_map.rs
│ │ │ │ │ └── secondary_map.rs
│ │ │ │ ├── extern_ref.rs
│ │ │ │ ├── features.rs
│ │ │ │ ├── indexes.rs
│ │ │ │ ├── initializers.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── memory_view.rs
│ │ │ │ ├── module.rs
│ │ │ │ ├── native.rs
│ │ │ │ ├── partial_sum_map.rs
│ │ │ │ ├── types.rs
│ │ │ │ ├── units.rs
│ │ │ │ └── values.rs
│ │ │ └── tests/
│ │ │ └── partial-sum-map/
│ │ │ ├── corpus/
│ │ │ │ └── .gitkeep
│ │ │ ├── crashes/
│ │ │ │ └── .gitkeep
│ │ │ └── main.rs
│ │ ├── vm/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ └── src/
│ │ │ ├── artifact.rs
│ │ │ ├── export.rs
│ │ │ ├── func_data_registry.rs
│ │ │ ├── global.rs
│ │ │ ├── imports.rs
│ │ │ ├── instance/
│ │ │ │ ├── allocator.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── ref.rs
│ │ │ ├── lib.rs
│ │ │ ├── libcalls.rs
│ │ │ ├── memory.rs
│ │ │ ├── mmap.rs
│ │ │ ├── probestack.rs
│ │ │ ├── resolver.rs
│ │ │ ├── sig_registry.rs
│ │ │ ├── table.rs
│ │ │ ├── trap/
│ │ │ │ ├── handlers.c
│ │ │ │ ├── mod.rs
│ │ │ │ ├── trapcode.rs
│ │ │ │ └── traphandlers.rs
│ │ │ ├── tunables.rs
│ │ │ ├── vmcontext.rs
│ │ │ └── vmoffsets.rs
│ │ └── wast/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── error.rs
│ │ ├── lib.rs
│ │ ├── spectest.rs
│ │ └── wast.rs
│ ├── unc-vm-runner/
│ │ ├── Cargo.toml
│ │ ├── FAQ.md
│ │ ├── README.md
│ │ ├── RUNTIMES.md
│ │ ├── fuzz/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── fuzz_targets/
│ │ │ │ ├── diffrunner.rs
│ │ │ │ └── runner.rs
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ └── src/
│ │ ├── cache.rs
│ │ ├── code.rs
│ │ ├── errors.rs
│ │ ├── features.rs
│ │ ├── imports.rs
│ │ ├── instrument/
│ │ │ ├── gas/
│ │ │ │ ├── mod.rs
│ │ │ │ └── validation.rs
│ │ │ ├── rules.rs
│ │ │ └── stack_height/
│ │ │ ├── max_height.rs
│ │ │ ├── mod.rs
│ │ │ └── thunk.rs
│ │ ├── instrument.rs
│ │ ├── lib.rs
│ │ ├── logic/
│ │ │ ├── alt_bn128.rs
│ │ │ ├── context.rs
│ │ │ ├── dependencies.rs
│ │ │ ├── errors.rs
│ │ │ ├── gas_counter.rs
│ │ │ ├── logic.rs
│ │ │ ├── mocks/
│ │ │ │ ├── mock_external.rs
│ │ │ │ ├── mock_memory.rs
│ │ │ │ └── mod.rs
│ │ │ ├── mod.rs
│ │ │ ├── test_utils.rs
│ │ │ ├── tests/
│ │ │ │ ├── alt_bn128.rs
│ │ │ │ ├── context.rs
│ │ │ │ ├── ecrecover-tests.json
│ │ │ │ ├── ed25519_verify.rs
│ │ │ │ ├── gas_counter.rs
│ │ │ │ ├── helpers.rs
│ │ │ │ ├── iterators.rs
│ │ │ │ ├── logs.rs
│ │ │ │ ├── miscs.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── promises.rs
│ │ │ │ ├── registers.rs
│ │ │ │ ├── storage_read_write.rs
│ │ │ │ ├── storage_usage.rs
│ │ │ │ ├── view_method.rs
│ │ │ │ └── vm_logic_builder.rs
│ │ │ ├── types.rs
│ │ │ ├── utils.rs
│ │ │ └── vmstate.rs
│ │ ├── memory.rs
│ │ ├── prepare/
│ │ │ ├── prepare_v0.rs
│ │ │ ├── prepare_v1.rs
│ │ │ └── prepare_v2.rs
│ │ ├── prepare.rs
│ │ ├── profile/
│ │ │ └── profile_v2.rs
│ │ ├── profile.rs
│ │ ├── runner.rs
│ │ ├── tests/
│ │ │ ├── cache.rs
│ │ │ ├── compile_errors.rs
│ │ │ ├── fuzzers.rs
│ │ │ ├── regression_tests.rs
│ │ │ ├── rs_contract.rs
│ │ │ ├── runtime_errors.rs
│ │ │ ├── test_builder.rs
│ │ │ ├── ts_contract.rs
│ │ │ └── wasm_validation.rs
│ │ ├── tests.rs
│ │ ├── unc_vm_runner.rs
│ │ ├── utils.rs
│ │ ├── wasmer2_runner.rs
│ │ ├── wasmer_runner.rs
│ │ └── wasmtime_runner.rs
│ └── unc-wallet-contract/
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── res/
│ │ └── .gitignore
│ ├── src/
│ │ └── lib.rs
│ └── wallet-contract/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── rust-toolchain.toml
├── rustfmt.toml
├── scripts/
│ ├── __init__.py
│ ├── binaries/
│ │ ├── build.sh
│ │ ├── build_all.sh
│ │ └── x86_64/
│ │ ├── arch.Dockerfile
│ │ ├── debian-11.Dockerfile
│ │ ├── debian-12.Dockerfile
│ │ ├── shared.dockerignore
│ │ ├── ubuntu-2004.Dockerfile
│ │ ├── ubuntu-2204.Dockerfile
│ │ └── ubuntu-2404.Dockerfile
│ ├── check_nightly.py
│ ├── check_pytests.py
│ ├── coverage-wrapper-rustc
│ ├── fix_nightly_feature_flags.py
│ ├── flaky_test_check.py
│ ├── formatting
│ ├── install_precommit.sh
│ ├── parallel_coverage.py
│ ├── requirements_check.sh
│ ├── run_docker.sh
│ ├── setup_hooks.sh
│ ├── split_storage_migration.sh
│ ├── state/
│ │ ├── mega-migrate.py
│ │ ├── split-genesis.py
│ │ └── update_res.py
│ └── testlib.py
├── test-utils/
│ ├── actix-test-utils/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── logger/
│ │ └── Cargo.toml
│ ├── runtime-tester/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── fuzz/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── fuzz_targets_disabled/
│ │ │ └── runtime_fuzzer.rs
│ │ └── src/
│ │ ├── fuzzing.rs
│ │ ├── lib.rs
│ │ ├── run_test.rs
│ │ └── scenario_builder.rs
│ ├── store-validator/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ └── testlib/
│ ├── Cargo.toml
│ └── src/
│ ├── fees_utils.rs
│ ├── lib.rs
│ ├── process_blocks.rs
│ └── runtime_utils.rs
├── tools/
│ ├── amend-genesis/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ └── lib.rs
│ ├── chainsync-loadtest/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── concurrency/
│ │ │ ├── mod.rs
│ │ │ ├── once.rs
│ │ │ ├── rate_limiter.rs
│ │ │ └── weak_map.rs
│ │ ├── fetch_chain.rs
│ │ ├── main.rs
│ │ └── network.rs
│ ├── cold-store/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── cli.rs
│ │ └── lib.rs
│ ├── crates-publish-checker/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── main.rs
│ │ ├── rules.rs
│ │ ├── style.rs
│ │ ├── types.rs
│ │ └── utils.rs
│ ├── database/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── adjust_database.rs
│ │ ├── analyse_data_size_distribution.rs
│ │ ├── analyse_gas_usage.rs
│ │ ├── block_iterators/
│ │ │ ├── height_range.rs
│ │ │ ├── last_blocks.rs
│ │ │ └── mod.rs
│ │ ├── commands.rs
│ │ ├── compact.rs
│ │ ├── corrupt.rs
│ │ ├── lib.rs
│ │ ├── make_snapshot.rs
│ │ ├── memtrie.rs
│ │ ├── run_migrations.rs
│ │ ├── state_perf.rs
│ │ └── utils.rs
│ ├── debug-ui/
│ │ ├── .dockerignore
│ │ ├── .eslintrc.yml
│ │ ├── .gitignore
│ │ ├── .prettierrc.json
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── nginx.conf
│ │ ├── package.json
│ │ ├── public/
│ │ │ └── index.html
│ │ ├── src/
│ │ │ ├── App.scss
│ │ │ ├── App.tsx
│ │ │ ├── BlocksView.scss
│ │ │ ├── BlocksView.tsx
│ │ │ ├── ChainAndChunkInfoView.scss
│ │ │ ├── ChainAndChunkInfoView.tsx
│ │ │ ├── ChainInfoSummaryView.scss
│ │ │ ├── ChainInfoSummaryView.tsx
│ │ │ ├── ClusterNodeView.scss
│ │ │ ├── ClusterNodeView.tsx
│ │ │ ├── ClusterView.scss
│ │ │ ├── ClusterView.tsx
│ │ │ ├── ConnectionStorageView.scss
│ │ │ ├── ConnectionStorageView.tsx
│ │ │ ├── CurrentPeersView.scss
│ │ │ ├── CurrentPeersView.tsx
│ │ │ ├── EpochInfoView.scss
│ │ │ ├── EpochInfoView.tsx
│ │ │ ├── EpochShardsView.scss
│ │ │ ├── EpochShardsView.tsx
│ │ │ ├── EpochValidatorsView.scss
│ │ │ ├── EpochValidatorsView.tsx
│ │ │ ├── FloatingChunksView.scss
│ │ │ ├── FloatingChunksView.tsx
│ │ │ ├── HeaderBar.scss
│ │ │ ├── HeaderBar.tsx
│ │ │ ├── LandingPage.scss
│ │ │ ├── LandingPage.tsx
│ │ │ ├── LatestBlocksView.scss
│ │ │ ├── LatestBlocksView.tsx
│ │ │ ├── LogFileDrop.tsx
│ │ │ ├── NetworkInfoView.scss
│ │ │ ├── NetworkInfoView.tsx
│ │ │ ├── PeerStorageView.scss
│ │ │ ├── PeerStorageView.tsx
│ │ │ ├── RecentEpochsView.scss
│ │ │ ├── RecentEpochsView.tsx
│ │ │ ├── RoutingTableView.scss
│ │ │ ├── RoutingTableView.tsx
│ │ │ ├── SnapshotHostsView.scss
│ │ │ ├── SnapshotHostsView.tsx
│ │ │ ├── Tier1View.scss
│ │ │ ├── Tier1View.tsx
│ │ │ ├── api.tsx
│ │ │ ├── entity_debug/
│ │ │ │ ├── AllQueriesDisplay.scss
│ │ │ │ ├── AllQueriesDisplay.tsx
│ │ │ │ ├── EntityDataRootView.scss
│ │ │ │ ├── EntityDataRootView.tsx
│ │ │ │ ├── EntityDataValueView.scss
│ │ │ │ ├── EntityDataValueView.tsx
│ │ │ │ ├── EntityDebugView.scss
│ │ │ │ ├── EntityDebugView.tsx
│ │ │ │ ├── EntityQueryComposer.scss
│ │ │ │ ├── EntityQueryComposer.tsx
│ │ │ │ ├── KeyInput.scss
│ │ │ │ ├── KeyInput.tsx
│ │ │ │ ├── PinnedKeysView.scss
│ │ │ │ ├── PinnedKeysView.tsx
│ │ │ │ ├── all_queries.tsx
│ │ │ │ ├── composing_query.tsx
│ │ │ │ ├── fetcher.tsx
│ │ │ │ ├── fields.tsx
│ │ │ │ ├── keys.tsx
│ │ │ │ ├── pinned_keys.tsx
│ │ │ │ └── types.tsx
│ │ │ ├── index.css
│ │ │ ├── index.tsx
│ │ │ ├── log_visualizer/
│ │ │ │ ├── LogVisualizer.scss
│ │ │ │ ├── LogVisualizer.tsx
│ │ │ │ ├── arrows.ts
│ │ │ │ ├── events.ts
│ │ │ │ ├── interval.ts
│ │ │ │ └── layout.ts
│ │ │ ├── pretty-print.ts
│ │ │ ├── react-app-env.d.ts
│ │ │ └── utils.tsx
│ │ └── tsconfig.json
│ ├── epoch-sync/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ └── lib.rs
│ ├── flat-storage/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── commands.rs
│ │ └── lib.rs
│ ├── fork-network/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ ├── lib.rs
│ │ ├── single_shard_storage_mutator.rs
│ │ └── storage_mutator.rs
│ ├── indexer/
│ │ └── example/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── configs.rs
│ │ └── main.rs
│ ├── mirror/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── chain_tracker.rs
│ │ ├── cli.rs
│ │ ├── genesis.rs
│ │ ├── key_mapping.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── offline.rs
│ │ ├── online.rs
│ │ └── secret.rs
│ ├── mock-node/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ └── setup.rs
│ ├── ping/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ ├── csv.rs
│ │ ├── lib.rs
│ │ └── metrics.rs
│ ├── re-pledged/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── rpctypegen/
│ │ ├── core/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ └── macro/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── speedy_sync/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── state-parts/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ └── lib.rs
│ ├── state-parts-dump-check/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ ├── lib.rs
│ │ └── metrics.rs
│ ├── state-viewer/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── apply_chain_range.rs
│ │ ├── apply_chunk.rs
│ │ ├── cli.rs
│ │ ├── commands.rs
│ │ ├── contract_accounts.rs
│ │ ├── epoch_info.rs
│ │ ├── lib.rs
│ │ ├── rocksdb_stats.rs
│ │ ├── scan_db.rs
│ │ ├── state_changes.rs
│ │ ├── state_dump.rs
│ │ ├── state_parts.rs
│ │ ├── trie_iteration_benchmark.rs
│ │ └── tx_dump.rs
│ ├── storage-usage-delta-calculator/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ └── undo-block/
│ ├── Cargo.toml
│ └── src/
│ ├── cli.rs
│ └── lib.rs
└── utils/
├── config/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── fmt/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── lib.rs
├── mainnet-res/
│ ├── Cargo.toml
│ ├── README.md
│ ├── res/
│ │ ├── mainnet_genesis.json
│ │ ├── mainnet_restored_receipts.json
│ │ └── storage_usage_delta.json
│ ├── src/
│ │ └── lib.rs
│ └── tests/
│ └── load_genesis.rs
├── stdx/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── unc-cache/
│ ├── Cargo.toml
│ ├── README.md
│ ├── benches/
│ │ └── cache.rs
│ └── src/
│ ├── cell.rs
│ ├── lib.rs
│ └── sync.rs
├── unc-performance-metrics/
│ ├── Cargo.toml
│ └── src/
│ ├── actix_disabled.rs
│ ├── actix_enabled.rs
│ ├── lib.rs
│ ├── process.rs
│ ├── stats_disabled.rs
│ └── stats_enabled.rs
├── unc-performance-metrics-macros/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
└── unc-stable-hasher/
├── Cargo.toml
├── README.md
└── src/
└── lib.rs
================================================
FILE CONTENTS
================================================
================================================
FILE: .cargo/audit.toml
================================================
[advisories]
ignore = [
# DO NOT ADD ANYTHING TO THIS LIST WITHOUT CAREFUL CONSIDERATION!
# dotenv being unmaintained is ignored because it is an indirect dependency of cloud-storage, which would be hard to replace.
# In addition, it is most likely not ever going to be on a security-critical path, considering it only parses trusted .env files.
# However, we should probably replace cloud-storage with tame-gcs as soon as possible to remove this ignore.
"RUSTSEC-2021-0141",
# mach is unmaintained, but seems to be required by wasmtime at its latest version, which we currently cannot do without.
# We should replace it with mach2 in our personal code, but will need to keep it there until wasmtime switches to it.
# Anyway, it cannot be a security liability in production, considering it is bindings to the OS X kernel.
"RUSTSEC-2020-0168",
# memmap is unmaintained, but is used by wasmer0, which we need to keep alive for replayability reasons.
# We should remove wasmer0 and this ignore as soon as we get limited replayability.
"RUSTSEC-2020-0077",
# parity-wasm is deprecated, but is used by our runtimes before unc-vm, which we need to keep alive for replayability reasons.
# We should remove them all, as well as this ignore, as soon as we get limited replayability.
"RUSTSEC-2022-0061",
# borsh is vulnerable, but is used by wasmer0, which we need to keep alive for replayability reasons.
# We should remove it, as well as this ignore, as soon as we get limited replayability.
"RUSTSEC-2023-0033",
# older versions of parking-lot are vulnerable, but used by wasmer0, which we need to keep alive for replayability reasons.
# We should remove it, as well as this ignore, as soon as we get limited replayability.
"RUSTSEC-2020-0070",
]
================================================
FILE: .cargo/config.toml
================================================
[build]
# We compile with `panic=abort`, so we need `-Cforce-unwind-tables=y`
# to get a useful backtrace on panic.
rustflags = ["-Cforce-unwind-tables=y"]
[target.'cfg(target_arch = "x86_64")']
rustflags = ["-Ctarget-feature=+sse4.1,+sse4.2", "-Cforce-unwind-tables=y"]
================================================
FILE: .config/nextest.toml
================================================
[profile.default]
slow-timeout = { period = "60s", terminate-after = 2, grace-period = "0s" }
[[profile.default.overrides]]
filter = 'test(test_full_estimator)'
slow-timeout = { period = "10m", terminate-after = 3 }
retries = 0
threads-required = 2
# Unfortunately no support for inheriting profiles yet:
# https://github.com/nextest-rs/nextest/issues/387
[profile.ci]
slow-timeout = { period = "120s", terminate-after = 5 }
# Try a few times before failing the whole test suite on a potentially spurious tests.
# The hope is that people will fix the spurious tests as they encounter them locally...
retries = { backoff = "fixed", count = 3, delay = "30s" }
failure-output = "final"
fail-fast = false
[[profile.ci.overrides]]
filter = 'test(test_full_estimator)'
slow-timeout = { period = "10m", terminate-after = 3 }
retries = 0
threads-required = 2
================================================
FILE: .dockerignore
================================================
.idea/
.vscode/
docker/
!docker/scripts/
ops/
!ops/run.sh
!ops/tendermint-config.toml
**/target
storage/
keystore/
tmp/
sandbox/
# Ignore Vim swapfiles
*.swp
# Docker files shouldn't invalidate the cache because Docker itself will use these appropriately
.dockerignore
Dockerfile
Dockerfile.nightly
================================================
FILE: .gitattributes
================================================
**/package-lock.json linguist-generated=true -diff
# Disable linguist for WebAssembly files.
# Those are used to test the runtime and should not be indexed.
*.wasm linguist-detectable=false
*.wast linguist-detectable=false
*.wat linguist-detectable=false
================================================
FILE: .github/ISSUE_TEMPLATE/01_BUG_REPORT.md
================================================
---
name: Bug Report
about: In case you have found a bug in our product.
title: "bug: "
labels: "bug"
assignees: ""
---
# Bug Report
Check the [contributing guide](https://github.com/utnet-org/utility/blob/main/CONTRIBUTING.md)
## Description
<!-- Provide a clear and concise description of the bug. -->
## Steps to Reproduce
<!-- List the steps that can be followed to reproduce the bug. -->
1.
2.
3.
## Expected Behavior
<!-- Describe what you expected to happen. -->
## Actual Behavior
<!-- Describe what actually happened. Include screenshots if applicable. -->
## Additional Information
<!-- Add any other context about the problem here, such as environment details, version number, etc. -->
================================================
FILE: .github/ISSUE_TEMPLATE/02_FEATURE_REQUEST.md
================================================
---
name: Feature Request
about: If you have any idea to contribute to the Utility project.
title: "feat: "
labels: "enhancement"
assignees: ""
---
# Feature Request
Check the [contributing guide](https://github.com/utnet-org/utility/blob/main/CONTRIBUTING.md)
## Summary
<!-- Provide a brief summary of the feature you'd like to see added or improved. -->
## Detailed Description
<!-- Describe the feature in detail. Include any specific requirements, benefits, or considerations that will help in understanding the request. -->
## Use Cases
<!-- Explain the scenarios where this feature would be useful. -->
## Alternative Solutions
<!-- Describe any alternative solutions or workarounds you've considered. Why were they not suitable? -->
## Additional Context
<!-- Add any other information, such as mockups, diagrams, or references, that might help in understanding the feature request. -->
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
# Pull Request type
<!-- Check the [contributing guide](../../CONTRIBUTING.md) -->
<!-- Please try to limit your pull request to one type; submit multiple pull requests if needed. -->
Please add the labels corresponding to the type of changes your PR introduces:
- [ ] Feature
- [ ] Bugfix
- [ ] Refactor
- [ ] Format
- [ ] Documentation
- [ ] Testing
- [ ] Other:
## Description
<!-- Summarize the changes made in this pull request. Include the motivation for these changes and highlight any key updates. -->
## Related Issues
<!-- List any related issues or bug numbers this pull request is intended to address. Use GitHub's linking feature to automatically close the issues when the pull request is merged (e.g., "Closes #123"). -->
## Testing Performed
<!-- Describe any testing you performed on these changes, including unit tests, integration tests, manual testing, etc. -->
## Checklist
- [ ] I have performed a self-review of my own code.
- [ ] The tests pass successfully with `cargo test`.
- [ ] The code was formatted with `cargo fmt`.
- [ ] The code compiles with no new warnings with `cargo build --release` and `cargo build --release --features nightly`.
- [ ] The code has no new warnings when using `cargo clippy`.
- [ ] If this change affects documented features or needs new documentation, I have created a PR with a [documentation update](https://github.com/utnet-org/utility.github.io).
================================================
FILE: .github/RELEASE_TEMPLATE.md
================================================
# unc-node vx.x.x
# Versions
Node Version: x.x.x
# Breaking changes
<!-- Does this upgrade include any breadking changes ? Yes / No, describe -->
<!-- Will it require a binary upgrade ? Yes / No -->
# Added
- Scope - Description
# Changed
- Scope - Description
# Fixed
- Scope - Description
# New Runtime
<!-- Summary generated by SR tool in case of runtime upgrade -->
================================================
FILE: .github/workflows/calculate-alpha-release.bash
================================================
#!/bin/bash
# Exit on error. Append "|| true" if you expect an error.
set -o errexit
# Exit on error inside any functions or subshells.
set -o errtrace
# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR
set -o nounset
# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip`
set -o pipefail
# Turn on traces, useful while debugging but commented out by default
# set -o xtrace
last_release="$(git tag --sort=committerdate | grep -P "v0+\.\d+\.\d+$" | tail -1)"
echo "🐭 Last release: ${last_release}"
# detect breaking changes
if [ -n "$(git log --oneline ${last_release}..HEAD | grep '!:')" ]; then
echo "🐭 Breaking changes detected since ${last_release}"
git log --oneline ${last_release}..HEAD | grep '!:'
# increment the minor version
minor="${last_release##v0.}"
minor="${minor%.*}"
next_minor="$((minor + 1))"
next_release="v0.${next_minor}.0"
else
# increment the patch version
patch="${last_release##*.}"
next_patch="$((patch + 1))"
next_release="${last_release/%${patch}/${next_patch}}"
fi
echo "🐭 Next release: ${next_release}"
suffix="alpha"
last_tag="$(git tag --sort=committerdate | tail -1)"
if [[ "${last_tag}" = "${next_release}-${suffix}"* ]]; then
echo "🐭 Last alpha release: ${last_tag}"
# increment the alpha version
# e.g. v0.22.1-alpha.12 -> v0.22.1-alpha.13
alpha="${last_tag##*-${suffix}.}"
next_alpha="$((alpha + 1))"
next_tag="${last_tag/%${alpha}/${next_alpha}}"
else
# increment the patch and start the alpha version from 0
# e.g. v0.22.0 -> v0.22.1-alpha.0
next_tag="${next_release}-${suffix}.0"
fi
# update the crate version
msg="# crate version"
#sed -E -i "s/^version = .* ${msg}$/version = \"${next_tag#v}\" ${msg}/" Cargo.toml
echo "NEXT_TAG=${next_tag}" >> $GITHUB_ENV
echo "🐭 Next alpha release: ${next_tag}"
================================================
FILE: .github/workflows/crates_publish.yml
================================================
name: Crates Publish
on:
workflow_dispatch:
inputs:
branch:
type: string
required: true
description: Branch name or tag to publish crates from
jobs:
publish-cargo-crates:
name: "Publish utility-workspaces on crates.io https://crates.io/crates/utility-workspaces"
runs-on: "ubuntu-latest"
environment: deploy
permissions:
contents: write # required for crates push
timeout-minutes: 30
steps:
- name: Checkout utnet-org/utility's ${{ github.event.inputs.branch }} branch
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Set up git user
uses: fregante/setup-git-user@v2
- name: Publish unc-workspaces on crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
set -x
cargo install --git https://github.com/miraclx/cargo-workspaces --tag v0.3.0 cargo-workspaces
cargo ws publish --yes --allow-dirty --force '*' \
--no-git-commit --no-git-push --no-individual-tags --tag-prefix 'crates-' \
--tag-msg $$'crates.io snapshot\n---%{\n- %n - https://crates.io/crates/%n/%v}'
- name: Create tag on https://github.com/utnet-org/utility
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push --no-follow-tags https://github.com/utnet-org/utility.git tag 'crates-*'
================================================
FILE: .github/workflows/default.yml
================================================
name: Lint Check && nextest && build
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
env:
CARGO_SCCACHE_COMMIT: bed5571c
jobs:
# cargo_nextest:
# name: "Cargo Nextest (${{matrix.name}})"
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - name: Linux
# id: linux
# os: ubuntu-latest
# type: stable
# runs_integ_tests: true
# upload_profraws: true
# - name: Linux Nightly
# id: linux-nightly
# os: ubuntu-latest
# type: nightly
# runs_integ_tests: true
# upload_profraws: true
# timeout-minutes: 90
# steps:
# - uses: actions/checkout@v4
# # Install all the required tools
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
# with:
# tool: just,cargo-nextest,cargo-llvm-cov
# # Run the tests:
# - run: mkdir -p coverage/profraw/{unit,integration,binaries}
# # - Run the unit tests, retrieving the coverage information
# - run: just codecov-ci "nextest-unit ${{ matrix.type }}"
# - run: mv coverage/codecov/{new,unit-${{matrix.id}}}.json
# - run: mv coverage/profraw/{new,unit/${{matrix.id}}}.tar.zst
# # - Run the integration tests, retrieving the coverage information
# - run: just codecov-ci "nextest-integration ${{ matrix.type }}"
# if: matrix.runs_integ_tests
# - run: mv coverage/codecov/{new,integration-${{matrix.id}}}.json
# if: matrix.runs_integ_tests
# - run: mv coverage/profraw/{new,integration/${{matrix.id}}}.tar.zst
# if: matrix.runs_integ_tests
# # Cleanup the target directory, leaving only stuff interesting to llvm-cov, and tarball it
# - run: just tar-bins-for-coverage-ci
# - run: mv coverage/profraw/binaries/{new,${{matrix.id}}}.tar.zst
# # Upload the coverage
# - uses: actions/upload-artifact@v3
# if: matrix.upload_profraws
# with:
# name: coverage-profraw
# path: coverage/profraw
# retention-days: 2
# - uses: actions/upload-artifact@v3
# with:
# name: coverage-codecov
# path: coverage/codecov
rpc_error_schema:
name: "RPC Schema"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
with:
tool: just
- run: just check-rpc-errors-schema
# lychee_checks:
# name: "Lychee Lints"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: lycheeverse/lychee-action@2ac9f030ccdea0033e2510a23a67da2a2da98492
# with:
# fail: true
check_fmt:
name: "Cargo Fmt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
with:
tool: just
- run: just check-cargo-fmt
# check_clippy:
# name: "Cargo Clippy"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
# with:
# tool: just
# - run: just check-cargo-clippy
doctests:
name: "Rust Doctests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
with:
tool: just
- run: just doctests
# check_cargo_deny:
# name: "Cargo Deny"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
# with:
# tool: just,cargo-deny
# - run: just check-cargo-deny
check-crates-publish-checker:
name: "Crates Publish Checker"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
with:
tool: just
- run: just check-crates-publish-checker
check_non_default:
name: "Non-default Configuration Builds"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
with:
tool: just
- run: just check-non-default
# check_udeps:
# name: "Unused Dependencies"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
# with:
# tool: just,cargo-udeps
# - run: just check-cargo-udeps
# cargo_audit:
# name: "Cargo Audit"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff
# with:
# tool: cargo-audit
# - run: cargo audit -D warnings
build:
runs-on: ubuntu-latest
needs: [rpc_error_schema, check_fmt, doctests, check_non_default]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: |
~/.cache/
~/.cargo/bin/sccache*
key: ${{ runner.OS }}-sccache-bin-${{ env.CARGO_SCCACHE_COMMIT }}-v1
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev valgrind git clang curl libssl-dev protobuf-compiler unzip python3-pip
- name: Setup Rust toolchain
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
rustup show
- name: Set PATH for cargo
run: |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "SCCACHE_DIR=${HOME}/.cache/sccache" >> $GITHUB_ENV
- name: SCCache
run: |
# We altered the path to avoid old actions to overwrite it
if [ ! -f ~/.cargo/bin/sccache ]; then
cargo install sccache \
--git https://github.com/purestake/sccache.git \
--rev $CARGO_SCCACHE_COMMIT \
--force --no-default-features --features=dist-client
fi
if [[ -z `pgrep sccache` ]]; then
chmod +x ~/.cargo/bin/sccache
sccache --start-server
fi
sccache -s
echo "RUSTC_WRAPPER=${HOME}/.cargo/bin/sccache" >> $GITHUB_ENV
- name: Build node
run: cargo build --release -p unc-node
- name: Upload unc-node binary
uses: actions/upload-artifact@v2
with:
name: unc-node
path: target/release/unc-node
- name: Display SCCache Stats
run: sccache --show-stats
================================================
FILE: .github/workflows/gh_pages.yml
================================================
name: Book Pages
on:
push:
branches:
- main
pull_request:
paths:
- 'docs/**'
- '.github/workflows/book.yml'
jobs:
book:
name: Book
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: '0.4.21'
steps:
- uses: actions/checkout@v2
- name: Install mdbook
run: |
curl -L https://github.com/rust-lang/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.cargo/bin
- name: Build
run: mdbook build
working-directory: docs
- uses: actions/upload-artifact@v2
with:
name: book
path: target/book
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: write
needs: book
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v2
with:
name: book
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
force_orphan: true
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
cname: docs.xyz666.org
user_name: zwong91
user_email: yzbingchuan@gmail.com
================================================
FILE: .github/workflows/issue_metrics.yml
================================================
name: Monthly issue metrics
on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'
permissions:
issues: write
pull-requests: read
jobs:
monthly-issue-metrics:
name: past month issue metrics
runs-on: ubuntu-latest
steps:
- name: Get dates for last month
shell: bash
id: last-month
run: |
# Calculate the first day of the previous month
first_day=$(date -d "last month" +%Y-%m-01)
# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
#Set an environment variable with the date range
echo "$first_day..$last_day"
echo "LAST_MONTH=$first_day..$last_day" >> $GITHUB_OUTPUT
- name: Run issue-metrics tool
uses: github/issue-metrics@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:utnet-org/utility is:issue created:${{ steps.last-month.outputs.LAST_MONTH }}'
- name: Create issue
uses: peter-evans/create-issue-from-file@v4
with:
title: Monthly issue metrics report
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md
================================================
FILE: .github/workflows/release_binaries.yml
================================================
name: Release Binaries
on:
push:
branches-ignore:
- '**'
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Calculate the next release
run: .github/workflows/calculate-alpha-release.bash
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
id: git-cliff
with:
config: ./cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
build_binaries:
runs-on: ubuntu-latest
needs: changelog
strategy:
matrix:
include:
- command: ENGINE=podman DISTRO=ubuntu-2004 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-ubuntu-2004-unc-node.tar.gz
- command: ENGINE=podman DISTRO=ubuntu-2204 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-ubuntu-2204-unc-node.tar.gz
- command: ENGINE=podman DISTRO=ubuntu-2404 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-ubuntu-2404-unc-node.tar.gz
- command: ENGINE=podman DISTRO=debian-11 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-debian-11-unc-node.tar.gz
- command: ENGINE=podman DISTRO=debian-12 ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-debian-12-unc-node.tar.gz
- command: ENGINE=podman DISTRO=arch ZIP=1 ./scripts/binaries/build.sh
output_file: output/zips/x86_64-arch-unc-node.tar.gz
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: install podman
run: sudo apt-get update && sudo apt install podman -y
- uses: nick-fields/retry@v3
with:
timeout_minutes: 60
max_attempts: 3
command: ${{ matrix.command }}
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "tag_name=${TAG}" >> $GITHUB_OUTPUT
- name: publish binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.output_file }}
release_name: ${{ steps.prepare.outputs.tag_name }}
tag: ${{ steps.prepare.outputs.tag_name }}
body: ${{ needs.changelog.outputs.release_body }}
overwrite: true
================================================
FILE: .github/workflows/release_docker.yml
================================================
name: Release Docker
# Trigger on all push events, new semantic version tags, and all PRs
on:
push:
branches-ignore:
- '**'
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
pull_request:
workflow_dispatch:
env:
GITHUB_REG: ghcr.io
MAINTAINER: ${{ github.repository_owner }}
DESCRIPTION: "${{ github.repository_owner }} repository ${{ github.repository }}"
jobs:
prepare-env:
runs-on: "ubuntu-latest"
outputs:
repo_owner: ${{ steps.setting_env.outputs.repo_owner }}
output_short_sha: ${{ steps.setting_env.outputs.short_sha }}
output_image_name: ${{ steps.setting_env.outputs.image_name }}
build_for_pr: ${{ steps.setting_logic.outputs.build_for_pr }}
build_for_merge: ${{ steps.setting_logic.outputs.build_for_merge }}
not_a_fork: ${{ steps.setting_logic.outputs.not_a_fork }}
steps:
- name: Checkout
uses: "actions/checkout@v4"
- name: Add vars to ENV
id: setting_env
run: |
# Extract both the repository owner and repository name
# According to docs, github.repository is in the format of owner/repo, not just repo
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
REPO_OWNER=$(echo "${{ github.repository }}" | awk -F'/' '{print $1}' | tr '[:upper:]' '[:lower:]')
REPO_NAME=$(echo "${{ github.repository }}" | awk -F'/' '{print $2}' | tr '[:upper:]' '[:lower:]')
# Check repo name for .github use to test this workflow
if [[ $REPO_NAME == ".github" ]]; then
# Remove the leading . to avoid failing the character check
REPO_NAME="github"
fi
# Log variables for debugging
echo "Repository Owner: $REPO_OWNER"
echo "Repository Name: $REPO_NAME"
echo "INPUT PACKAGE NAME: ${{ inputs.packageName }}"
# Set environment variables and outputs
echo "REPO_OWNER=$REPO_OWNER" >> $GITHUB_ENV
echo "repo_owner=$REPO_OWNER" >> "$GITHUB_OUTPUT"
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
echo "short_sha=`echo ${GITHUB_SHA} | cut -c1-8`" >> "$GITHUB_OUTPUT"
if [[ "${{ inputs.packageName }}" == "${{ github.repository }}" ]]; then
# If a user submitted package name that has the naming containing
# both the repository owner and repository name, we fail
# e.g: inputs.packageName = "utnet-org/unc-node" is not allowed
echo "------------------------------------------------------------"
echo "ERROR: Package name not valid! => [ ${{ inputs.packageName }} ]"
echo "Don't use the repository owner and repository name in the package name."
echo "------------------------------------------------------------"
exit 1
fi
# Set the default package name to the repository name
PACKAGE_NAME=$REPO_NAME
# If there is a user submitted package name, use it
if [[ -n "${{ inputs.packageName }}" ]]; then
PACKAGE_NAME=$(echo "${{ inputs.packageName }}" | tr '[:upper:]' '[:lower:]')
fi
# validate the package name characters
if [[ ! $PACKAGE_NAME =~ ^[A-Za-z0-9\-]+$ ]]; then
echo "------------------------------------------------------------"
echo "ERROR: Package name not valid! => [ $PACKAGE_NAME ]"
echo "ONLY can use: A-Za-z0-9\-"
echo "------------------------------------------------------------"
exit 1
fi
# Log the package name for debugging
echo "PACKAGE_NAME: $PACKAGE_NAME"
# Set environment variables and outputs
echo "IMAGE_NAME=$PACKAGE_NAME" >> $GITHUB_ENV
echo "image_name=$PACKAGE_NAME" >> "$GITHUB_OUTPUT"
# The key logic that we want to determine is whether or not we are working
# on a fork and if this is a pull request or merge to main.
#
# We care about forks because of github's security policies that prevent
# forks from pushing images. So we only want to build images on forks
#
# The distinction between pull requests and merges to main is that on pull
# requests we want a single image available quickly for testing. On merges
# to main we want all the images built and are ok waiting longer to ensure
# there are not bugs.
- name: Add logic to ENV
id: setting_logic
run: |
# yamllint disable
echo "build_for_pr=${{ github.event_name == 'pull_request' }}" >> "$GITHUB_OUTPUT"
echo "build_for_merge=${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }}" >> "$GITHUB_OUTPUT"
echo "not_a_fork=${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}" >> "$GITHUB_OUTPUT"
# yamllint enable
# Log the key inputs to the logic as well a the outputs. We check that
# build_for_pr and build_for_merge are never equal when they are true as that
# would indicate a bug. If they are both false, this is ok, as this is the
# case on pushing commits to a PR.
logic-check:
needs: prepare-env
runs-on: "ubuntu-latest"
steps:
- name: Log logic
run: |
echo "github.event_name: ${{ github.event_name }}"
echo "github.ref: ${{ github.ref }}"
echo "head repo: ${{ github.event.pull_request.head.repo.full_name }}"
echo "base repo: ${{ github.event.pull_request.base.repo.full_name }}"
echo "build_for_pr: ${{ needs.prepare-env.outputs.build_for_pr }}"
echo "build_for_merge: ${{ needs.prepare-env.outputs.build_for_merge }}"
echo "not_a_fork: ${{ needs.prepare-env.outputs.not_a_fork }}"
- name: Check logic
if: |
(needs.prepare-env.outputs.build_for_pr == needs.prepare-env.outputs.build_for_merge)
&& needs.prepare-env.outputs.build_for_pr != 'false'
run: |
echo "Failing step due to build_for_pr == build_for_merge"
exit 1
docker-security:
needs: ["prepare-env", "logic-check"]
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: "actions/checkout@v4"
- name: Build
uses: docker/build-push-action@v5
env:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
OUTPUT_IMAGE_NAME: ${{ needs.prepare-env.outputs.output_image_name }}
with:
context: .
push: false
platforms: linux/amd64
# we're building the container before the scan, use the short sha tag
# for referring to it later
tags: ${{ env.OUTPUT_IMAGE_NAME }}:${{ env.OUTPUT_SHORT_SHA }}
file: ./Dockerfile
- name: Run Trivy vulnerability scanner
# source: https://github.com/aquasecurity/trivy-action
# https://github.com/marketplace/actions/aqua-security-trivy
uses: aquasecurity/trivy-action@master
env:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
OUTPUT_IMAGE_NAME: ${{ needs.prepare-env.outputs.output_image_name }}
with:
# here we use the local tag that we've built before
image-ref: "${{ env.OUTPUT_IMAGE_NAME }}:${{ env.OUTPUT_SHORT_SHA }}"
format: "table"
#exit-code: '1' # uncomment to stop the CI if the scanner fails
ignore-unfixed: true
vuln-type: "os,library"
severity: "CRITICAL,HIGH"
docker-build:
name: docker-build (${{ matrix.registry.name }}; ${{ matrix.registry.registry-url }}/${{ matrix.registry.registry-owner }}/${{ needs.prepare-env.outputs.output_image_name }})
runs-on: "ubuntu-latest"
# wait until the jobs are finished.
needs: ["prepare-env", "logic-check", "docker-security"]
# We only want to run this step if one of the build flags is true. We don't
# run if both logic flags are false. This is the case for push events on PR
# commits. The logic-check job protects us from the case of both build flags
# being equal to true.
if: |
needs.prepare-env.outputs.build_for_pr == 'true'
|| needs.prepare-env.outputs.build_for_merge == 'true'
permissions:
contents: write
packages: write
strategy:
matrix:
# run-on-pr is used to skip running registries that are expected to fail
# due to github permission issues with org wide secrets.
registry:
# - name: DockerHub
# user-secret: DOCKERHUB_USERNAME
# token-secret: DOCKER_PAT_TOKEN
# registry-url: docker.io
# registry-owner: utnet-org
# run-on-pr: "false"
- name: GHCR
user-secret: ${{ github.repository_owner }}
token-secret: GITHUB_TOKEN
registry-url: ghcr.io
registry-owner: ${{ needs.prepare-env.outputs.repo_owner }}
run-on-pr: "true"
fail-fast: false
steps:
- name: Check run conditions
id: run_check
# We only want to run when the registry is able to run on PR or if it is a merge event
run: echo "run=${{ matrix.registry.run-on-pr == needs.prepare-env.outputs.build_for_pr || needs.prepare-env.outputs.build_for_merge == 'true'}}" >> "$GITHUB_OUTPUT"
- name: Checkout
if: ${{ steps.run_check.outputs.run == 'true'}}
uses: "actions/checkout@v4"
- name: Login to ${{ matrix.registry.name }}
if: ${{ steps.run_check.outputs.run == 'true'}}
uses: docker/login-action@v3
with:
registry: ${{ matrix.registry.registry-url }}
username: ${{ matrix.registry.registry-url == env.GITHUB_REG && matrix.registry.user-secret || secrets[matrix.registry.user-secret] }}
password: ${{ secrets[matrix.registry.token-secret] }}
- name: Extract Docker Metadata
if: ${{ steps.run_check.outputs.run == 'true'}}
id: meta
uses: docker/metadata-action@v5
env:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
OUTPUT_IMAGE_NAME: ${{ needs.prepare-env.outputs.output_image_name }}
with:
images: ${{ matrix.registry.registry-url }}/${{ matrix.registry.registry-owner }}/${{ env.OUTPUT_IMAGE_NAME }}
# yamllint disable
labels: |
maintainer=${{ env.MAINTAINER }}
commitUrl=https://github.com/${{ github.repository }}/commit/${{ github.sha }}
dockerPull=docker pull ${{ matrix.registry.registry-url }}/${{ matrix.registry.registry-owner }}/${{ env.OUTPUT_IMAGE_NAME }}:${{ env.OUTPUT_SHORT_SHA }}
org.opencontainers.image.description=${{ env.DESCRIPTION }}
tags: |
# output minimal (short sha)
type=raw,value={{sha}}
# output v0.2.1/v*-* (or sha of no tag)
type=semver,pattern={{raw}}
# pull request event
type=ref,enable=true,prefix=pr-,suffix=,event=pr
# yamllint enable
- name: Set up QEMU
if: ${{ steps.run_check.outputs.run == 'true'}}
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: ${{ steps.run_check.outputs.run == 'true'}}
uses: docker/setup-buildx-action@v3
# Build and Publish images on main, master, and versioned branches.
#
# The reason we split out these steps into 2 is for better handling of
# forks when building amd64 images and to enable faster availability of
# the amd64 image since building the arm64 image takes significantly
# longer.
- name: "Merge on Main Trigger: Build and Push All Docker Images"
if: ${{ needs.prepare-env.outputs.build_for_merge == 'true' && steps.run_check.outputs.run == 'true'}}
uses: docker/build-push-action@v5
env:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
OUTPUT_IMAGE_NAME: ${{ needs.prepare-env.outputs.output_image_name }}
with:
context: .
platforms: linux/arm64,linux/amd64
provenance: false
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile
# Build amd64 images always, and publish when it is not a fork. The Github
# security model prevents forks from pushing to the registry so we can
# only push if the branch/PR is not generated from a fork. Even though
# forks can't push, we still want to try and build the image to catch
# bugs. For testing purposes we only need an amd64 image.
- name: "Pull Request Trigger: Build and Push amd64 Docker Image"
if: ${{ needs.prepare-env.outputs.build_for_pr == 'true' && steps.run_check.outputs.run == 'true'}}
uses: docker/build-push-action@v5
env:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
OUTPUT_IMAGE_NAME: ${{ needs.prepare-env.outputs.output_image_name }}
with:
context: .
platforms: linux/amd64
provenance: false
# Only push if the head and base repos match, meaning it is not a fork
push: ${{ needs.prepare-env.outputs.not_a_fork == 'true' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile
================================================
FILE: .gitignore
================================================
# Generated by Cargo
# will have compiled files and executables
target
/target_expensive/
/sandbox
docker-build
/grafana-dashboard-testnet.json
/storage/
/test-utils/node/storage
/test-utils/ganache/storage
/node/service/storage
/keystore/
/chain/client/tmp_bench
testdir/
old_my_script.sh
# These are backup files generated by rustfmt
**/*.rs.bk
**/.ipynb_checkpoints/*
# Editor config files
.vscode
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
.idea
# Python env
.env
*.pyc
venv
# Node
**/node_modules/
# Integration tests
create-unc-app/
test-keys/
tmp/
# OS X
.DS_Store
# Logs
*.log
# Vim tmp files
*.swp
rusty-tags.vi
# logs from mocknet nodes
/pytest/logs/
# Estimator generated files
costs-*.txt
names-to-stats.txt
data_dump_*.bin!
*_key.json
/ops
pytest/myenv/
================================================
FILE: .gitmodules
================================================
[submodule "ops"]
path = ops
url = https://github.com/utnet-org/ops.git
================================================
FILE: .pre-commit-config.yaml
================================================
- repo: https://github.com/doublify/pre-commit-rust
rev: master
hooks:
- id: fmt
================================================
FILE: .style.yapf
================================================
[style]
based_on_style = google
indent_width = 4
column_limit = 80
================================================
FILE: ATTRIBUTIONS.md
================================================
# Utility Client Attributions
We have taken inspiration and few pieces of code from:
* [OpenEthereum](https://github.com/openethereum/openethereum)
* [Parity Substrate](https://github.com/paritytech/substrate)
* [Parity Trie](https://github.com/paritytech/trie)
* [Grin](https://github.com/mimblewimble/grin/)
* [Near](https://github.com/near/nearcore)
## Licenses
### OpenEthereum, Parity Substrate
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and`show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
### Parity Trie
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
### Grin
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
### Near
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
================================================
FILE: CODEOWNERS
================================================
# CODEOWNERS: https://help.github.com/articles/about-codeowners/
* @utnet-org/utility-codeowners
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <social@unc.com>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
<https://www.contributor-covenant.org/faq>
================================================
FILE: CONTRIBUTING.md
================================================
Thank you for your interest in contributing to the Utility reference client! We
welcome contributions from everyone. Below are various bits of information to
help you get started. If you require additional help, please reach out to us on
our [zulip channel](https://unc.zulipchat.com/).
## Quick Start
utility is a fairly standard Rust project, so building is as easy as
```console
cargo build
```
Building utility requires a fairly recent Rust compiler (get it
[here](https://rustup.rs)), as well as `clang` and `cmake` to build RocksDB
(`sudo apt install cmake clang`).
Sadly at the moment utility is only compatible with Linux and MacOS, Windows is
not supported yet.
To run a local UNC network with one node, use
```console
cargo run -p unc-node -- init # generates various configs in ~/.unc
cargo run -p unc-node -- run
```
You can now use your own node's HTTP RPC API (e.g.
[httpie](https://httpie.io/docs/cli/installation))
```console
$ http get http://localhost:3030/status
$ http post http://localhost:3030/ method=query jsonrpc=2.0 id=1 \
params:='{"request_type": "view_account", "finality": "final", "account_id": "test.unc"}'
```
The RPC is documented [here](https://docs.unc.org/api/rpc/introduction), and
can be conveniently accessed from the command line [UNC
CLI](https://docs.unc.org/tools/unc-cli) utility.
## Next Steps
To learn more about how utility works, skim through our guide to utility
development:
<https://utnet-org.github.io/utility/>
If you are looking for relatively simple tasks to familiarise yourself with
`utility`, please check out issues labeled with the `C-good-first-issue` label
[here](https://github.com/utnet-org/utility/labels/C-good-first-issue). If you see
one that looks interesting and is unassigned or has not been actively worked on
in some time, please ask to have the issue assigned to you and someone from
the team should help you get started. We do not always keep the issue tracker
up-to-date, so if you do not find an interesting task to work on, please ask for
help on our zulip channel.
## Pull Requests
All the contributions to `utility` happen via Pull Requests. Please follow the
following steps when creating a PR:
1. Fork the `utility` repository and create a new branch there to do your work.
2. The branch can contain any number of commits. When merged, all commits will
be squashed into a single commit.
3. The changes should be thoroughly tested. Please refer to [this
document](https://github.com/utnet-org/utility/blob/master/docs/practices/testing/README.md)
for our testing guidelines and an overview of the testing unc-infra.tructure.
4. When ready, send a pull request against the `master` branch of the `utility`
repository.
5. Feel free to submit draft PRs to get early feedback and to make sure you are
on the right track.
6. The PR name should follow the template: `<type>: <name>`. Where `type` is:
- `fix` for bug fixes;
- `feat` for new features;
- `refactor` for changes that reorganize code without adding new content;
- `doc` for changes that change documentation or comments;
- `test` for changes that introduce new tests;
- `chore` for grunt tasks like updating dependencies.
7. The PR should also contain a description when appropriate to provide
additional information to help the reviewer inspect the proposed change.
8. If your PR introduces a user-observable change (e.g. a new protocol feature,
new configuration option, new Prometheus metric etc.) please document it in
[CHANGELOG.md](CHANGELOG.md) in the `[unreleased]` section.
9. It is important to select the `Allow edits and access to secrets by
maintainers` checkbox on the PR. Without this option, the merge bot will not
have sufficient rights to be able to merge the PR when it is approved. It
also allows the maintainers to make trivial changes to the PR as necessary.
Please see
[these](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)
[links](https://stackoverflow.com/questions/63341296/github-pull-request-allow-edits-by-maintainers)
for the implications of selecting the checkbox.
## After the PR is submitted
1. We have a CI process configured to run various tests on each PR. All tests
need to pass before a PR can be merged.
2. When all the comments from the reviewer(s) have been addressed, they should
approve the PR allowing a PR to be merged.
3. Before merging a PR, the code should be reviewed properly. In particular, the
person who clicks "Merge when ready" has specific duties, exposed in the last
paragraph of the "Code review process" section below.
4. An approved PR can be merged by clicking the "Merge when ready" button. The
button can be clicked by the author if they have the appropriate access, or by a
reviewer otherwise. PR authors can also click the button immediately after filing
a PR; removing an additional round-trip after the PR gets approved. The PR author
will be notified by email by github if the PR fails to land, once it has entered
the merge queue (ie. after it has passed PR CI and gotten an approving review).
## Code review process
We have two groups of code reviewers: Super owners and normal owners. When a
PR is created:
- a super owner will be automatically assigned to review.
- they may choose to review the PR themselves or they may delegate to someone else
who belongs either to the super owners or the normal owners group.
- the delegate will perform the review and as needed engage other reviewers as
well. They will review your tests, and make sure that they can convince
themselves the test coverage is adequate before they even look into the
change, so make sure you tested all the corner cases.
- it is normal to sometimes require multiple rounds of reviews to get a PR
merged. If your PR received some feedback from a reviewer, use the [github
UI](https://stackoverflow.com/questions/40893008/how-to-resume-review-process-after-updating-pull-request-at-github)
to re-request a review.
The author is also free to directly request reviews from specific persons
[through the github
ui](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review).
In this case, the automatically selected super owner will ensure that the
selected reviewer is sufficient or additional reviewers are needed.
The process for becoming a code reviewer is relatively straightforward.
The candidate should have a good understanding of the codebase and then
the existing super owners will discuss and approve the addition. These
discussions take place on zulip so if you are interested in becoming a
code reviewer, please reach out to us there.
The person who clicks the "Merge when ready" button is the one who
guarantees that no unreviewed code was added between the approving review
and the commit that is being landed. They must be especially careful of
commits that might have happened before the review, but not have been
reviewed (eg. because the review was already in progress), as they will
show above the review line on the GitHub UI. In addition, not refreshing
the page might lead to these commits just not displaying, so the reviewer
should refresh the page both before and after clicking "Merge when ready,"
and confirm that the commits are as expected.
## Release Schedule
Once your change ends up in master, it will be released with the rest of the
changes by other contributors on the regular release schedules.
On [betanet](https://docs.unc.org/docs/concepts/networks#testnet) we run
nightly build from master with all the nightly protocol features enabled. Every
five weeks, we stabilize some protocol features and make a release candidate for
testnet. The process for feature stabilization can be found in [this
document](docs/practices/protocol_upgrade.md). After the release candidate has been
running on testnet for four weeks and no issues are observed, we stabilize and
publish the release for mainnet.
================================================
FILE: Cargo.toml
================================================
[workspace.package]
version = "0.0.0" # managed by cargo-workspaces, see below
authors = ["Hello Inc <hello@utnet.org>"]
edition = "2021"
rust-version = "1.78.0"
repository = "https://github.com/utnet-org/utility"
license = "GPL-2.0-or-later"
[workspace.metadata.workspaces]
# Shared version of all public crates in the workspace.
# This is only used for crates that are not stable.
# Most crates are not stable on purpose, as maintaining API compatibility is a
# significant developer time expense. Please think thoroughly before adding
# anything to the list of stable crates.
version = "0.12.2"
exclude = ["node"]
[workspace]
resolver = "2"
members = [
"chain/chain",
"chain/chunks",
"chain/client",
"chain/client-primitives",
"chain/epoch-manager",
"chain/indexer",
"chain/indexer-primitives",
"chain/jsonrpc",
"chain/jsonrpc-adversarial-primitives",
"chain/jsonrpc-primitives",
"chain/jsonrpc/client",
"chain/jsonrpc/fuzz",
"chain/jsonrpc/jsonrpc-tests",
"chain/network",
"chain/pool",
"chain/telemetry",
"core/async",
"core/chain-configs",
"core/crypto",
"core/dyn-configs",
"core/o11y",
"core/parameters",
"core/primitives",
"core/primitives-core",
"core/store",
"genesis-tools/genesis-csv-to-json",
"genesis-tools/genesis-populate",
"genesis-tools/keypair-generator",
"infra",
"integration-tests",
"runtime/unc-vm/test-api",
"runtime/unc-vm/compiler",
"runtime/unc-vm/compiler-singlepass",
"runtime/unc-vm/engine",
"runtime/unc-vm/vm",
"runtime/unc-vm/types",
"runtime/unc-vm/wast",
"runtime/unc-vm/compiler-test-derive",
"runtime/unc-vm-runner",
"runtime/unc-vm-runner/fuzz",
"runtime/unc-wallet-contract",
"runtime/runtime",
"runtime/runtime-params-estimator",
"runtime/runtime-params-estimator/estimator-warehouse",
"test-utils/actix-test-utils",
"test-utils/runtime-tester",
"test-utils/runtime-tester/fuzz",
"test-utils/store-validator",
"test-utils/testlib",
"tools/database",
"tools/chainsync-loadtest",
"tools/fork-network",
"tools/indexer/example",
"tools/mirror",
"tools/mock-node",
"tools/ping",
"tools/re-pledged",
"tools/rpctypegen/core",
"tools/rpctypegen/macro",
"tools/speedy_sync",
"tools/state-parts",
"tools/state-parts-dump-check",
"tools/state-viewer",
"tools/storage-usage-delta-calculator",
"tools/crates-publish-checker",
"tools/undo-block",
"utils/config",
"utils/fmt",
"utils/mainnet-res",
"utils/unc-cache",
"utils/stdx",
"node",
]
[workspace.lints.rust]
warnings = "deny"
[workspace.lints.clippy]
all = { level = "allow", priority = -100 }
correctness = { level = "deny", priority = -50 }
suspicious = { level = "deny", priority = -50 }
perf = { level = "deny", priority = -50 }
# overrides clippy::perf = "deny": https://github.com/rust-lang/rust-clippy/issues/8111
single_char_pattern = "allow"
clone_on_copy = "deny"
derivable_impls = "deny"
redundant_clone = "deny"
len_zero = "deny"
[workspace.dependencies]
actix = "0.13.0"
actix-cors = "0.6.1"
actix-http = "3.3"
actix-rt = "2"
actix-web = "4.1"
anyhow = "1.0.62"
arbitrary = { version = "1.2.3", features = ["derive"] }
arc-swap = "1.5"
assert_matches = "1.5.0"
async-recursion = "1.0.4"
async-trait = "0.1.58"
awc = { version = "3", features = ["openssl"] }
backtrace = "0.3"
base64 = "0.21"
bencher = "0.1.5"
bitflags = "1.2"
blake2 = "0.9.1"
bn = { package = "zeropool-bn", version = "0.5.11", default-features = false }
bolero = { version = "0.10.1", features = ["arbitrary"] }
borsh = { version = "1.0.0", features = ["derive", "rc"] }
bs58 = "0.4"
bytes = "1"
bytesize = { version = "1.1", features = ["serde"] }
c2-chacha = "0.3"
cargo_metadata = "0.18.1"
cc = "1.0"
cfg-if = "1.0"
chrono = { version = "0.4.37", features = ["serde"] }
clap = { version = "4.2.0", features = ["derive", "env", "string"] }
cloud-storage = "0.11.1"
conqueue = "0.4.0"
cpu-time = "1.0"
criterion = { version = "0.5.1", default_features = false, features = ["html_reports", "cargo_bench_support"] }
crossbeam = "0.8"
crossbeam-channel = "0.5.8"
crossbeam-queue = "0.3.8"
csv = "1.2.1"
curve25519-dalek = { version = "4.1.1", default-features = false, features = ["alloc", "precomputed-tables", "rand_core"] }
derive-enum-from-into = "0.1.1"
derive_more = "0.99.9"
dirs = "4"
dynasm = "2.0"
dynasmrt = "2.0"
easy-ext = "0.2"
ed25519-dalek = { version = "2.1.0", default-features = false, features = ["hazmat", "rand_core"] }
elastic-array = "0.11"
enum-map = "2.1.0"
enumset = "1.0"
expect-test = "1.3.0"
finite-wasm = "0.5.0"
flate2 = "1.0.22"
fs2 = "0.4"
futures = "0.3.5"
futures-util = "0.3"
genesis-populate = { path = "genesis-tools/genesis-populate" }
hashbrown = "0.14.2"
hex = { version = "0.4.2", features = ["serde"] }
hex-literal = "0.2"
hkdf = "0.12.3"
hyper = { version = "0.14", features = ["full"] }
hyper-tls = "0.5.0"
im = "15"
indexmap = "1.6"
indicatif = { version = "0.15.0", features = ["with_rayon"] }
insta = { version = "1.34.0", features = ["json", "yaml", "redactions"] }
integration-tests = { path = "integration-tests" }
itertools = "0.12.1"
itoa = "1.0"
json_comments = "0.2.1"
lazy_static = "1.4"
leb128 = "0.2"
libc = "0.2.81"
libfuzzer-sys = { version = "0.4", features = ["arbitrary-derive"] }
log = "0.4"
loupe = "0.1"
lru = "0.7.2"
memmap2 = "0.5"
memoffset = "0.8"
more-asserts = "0.2"
unc-account-id = { version = "0.7.2", features = ["internal_unstable", "serde", "borsh"] }
unc-actix-test-utils = { path = "test-utils/actix-test-utils" }
unc-amend-genesis = { path = "tools/amend-genesis" }
unc-database-tool= { path = "tools/database" }
unc-async = { path = "core/async" }
unc-cache = { path = "utils/unc-cache" }
unc-chain = { path = "chain/chain" }
unc-chain-configs = { path = "core/chain-configs" }
unc-chain-primitives = { path = "chain/chain-primitives" }
unc-chunks = { path = "chain/chunks" }
unc-chunks-primitives = { path = "chain/chunks-primitives" }
unc-client = { path = "chain/client" }
unc-client-primitives = { path = "chain/client-primitives" }
unc-cold-store-tool = { path = "tools/cold-store", package = "cold-store-tool" }
unc-config-utils = { path = "utils/config" }
unc-infra = { path = "infra" }
unc-crypto = { path = "core/crypto" }
unc-dyn-configs = { path = "core/dyn-configs" }
unc-epoch-manager = { path = "chain/epoch-manager" }
unc-epoch-sync-tool = { path = "tools/epoch-sync"}
unc-flat-storage = { path = "tools/flat-storage" }
unc-fork-network = { path = "tools/fork-network" }
unc-fmt = { path = "utils/fmt" }
unc-indexer = { path = "chain/indexer" }
unc-indexer-primitives = { path = "chain/indexer-primitives" }
unc-jsonrpc = { path = "chain/jsonrpc" }
unc-jsonrpc-adversarial-primitives = { path = "chain/jsonrpc-adversarial-primitives" }
unc-jsonrpc-client = { path = "chain/jsonrpc/client" }
unc-jsonrpc-primitives = { path = "chain/jsonrpc-primitives", features = ["full"] }
unc-jsonrpc-tests = { path = "chain/jsonrpc/jsonrpc-tests" }
unc-mainnet-res = { path = "utils/mainnet-res" }
unc-mirror = { path = "tools/mirror" }
unc-network = { path = "chain/network" }
unc-o11y = { path = "core/o11y" }
unc-parameters = { path = "core/parameters" }
unc-performance-metrics = { path = "utils/unc-performance-metrics" }
unc-performance-metrics-macros = { path = "utils/unc-performance-metrics-macros" }
unc-ping = { path = "tools/ping" }
unc-pool = { path = "chain/pool" }
unc-primitives = { path = "core/primitives" }
unc-primitives-core = { path = "core/primitives-core" }
unc-rpc-error-core = { path = "tools/rpctypegen/core" }
unc-rpc-error-macro = { path = "tools/rpctypegen/macro" }
unc-stable-hasher = { path = "utils/unc-stable-hasher" }
unc-state-parts = { path = "tools/state-parts" }
unc-state-parts-dump-check = { path = "tools/state-parts-dump-check" }
unc-state-viewer = { path = "tools/state-viewer", package = "state-viewer" }
unc-store = { path = "core/store" }
unc-telemetry = { path = "chain/telemetry" }
unc-test-contracts = { path = "runtime/unc-test-contracts" }
unc-undo-block = { path = "tools/undo-block" }
unc-vm-test-api = { path = "runtime/unc-vm/test-api" }
unc-vm-compiler = { path = "runtime/unc-vm/compiler" }
unc-vm-compiler-singlepass = { path = "runtime/unc-vm/compiler-singlepass" }
unc-vm-compiler-test-derive = { path = "runtime/unc-vm/compiler-test-derive" }
unc-vm-engine = { path = "runtime/unc-vm/engine" }
unc-vm-engine-universal = { path = "runtime/unc-vm/engine-universal" }
unc-vm-runner = { path = "runtime/unc-vm-runner" }
unc-vm-test-generator = { path = "runtime/unc-vm/test-generator" }
unc-vm-types = { path = "runtime/unc-vm/types" }
unc-vm-vm = { path = "runtime/unc-vm/vm" }
unc-vm-wast = { path = "runtime/unc-vm/wast" }
unc-wallet-contract = { path = "runtime/unc-wallet-contract" }
nix = "0.24"
node-runtime = { path = "runtime/runtime" }
num-bigint = "0.3"
num_cpus = "1.11"
num-rational = { version = "0.3.1", features = ["serde"] }
num-traits = "0.2.15"
once_cell = "1.13.1"
openssl = { version = "0.10.60", features = ["vendored"] }
openssl-probe = "0.1.4"
opentelemetry = { version = "0.17.0", features = ["rt-tokio", "trace"] }
opentelemetry-otlp = "0.10.0"
opentelemetry-semantic-conventions = "0.9.0"
paperclip = { version = "0.8.0", features = ["actix4"] }
parity-wasm = { version = "0.42", default-features = false }
parity-wasm_41 = { package = "parity-wasm", version = "0.41" }
parking_lot = "0.12.1"
percent-encoding = "2.2.0"
pin-project = "1.0"
prefix-sum-vec = "0.1.2"
pretty_assertions = "1.2"
primitive-types = { version = "0.10", default-features = false }
proc-macro2 = "1.0.64"
prometheus = "0.13.1"
protobuf = "3.0.1"
protobuf-codegen = "3.0.1"
pwasm-utils_12 = { package = "pwasm-utils", version = "0.12" }
quote = "1.0"
rand = "0.8.5"
rand_chacha = "0.3.1"
rand_core = "0.5"
rand_hc = "0.3.1"
rand_xorshift = "0.3"
rayon = "1.5"
redis = "0.23.0"
reed-solomon-erasure = "4"
regex = "1.7.1"
region = "3.0"
reqwest = { version = "0.12.2", features = ["blocking"] }
ripemd = "0.1.1"
rkyv = "0.7.31"
rlimit = "0.7"
rlp = "0.5.2"
rocksdb = { version = "0.21.0", default-features = false, features = ["snappy", "lz4", "zstd", "zlib", "jemalloc"] }
runtime-tester = { path = "test-utils/runtime-tester" }
rusqlite = { version = "0.31.0", features = ["bundled", "chrono", "functions"] }
rustc-demangle = "0.1"
rust-s3 = { version = "0.33.0", features = ["blocking"] }
rustix = "0.37"
rsa = { version = "0.9.6", features = ["sha2", "getrandom"] }
secp256k1 = { version = "0.27.0", features = ["recovery", "rand-std"] }
semver = "1.0.4"
serde = { version = "1.0.136", features = ["alloc", "derive", "rc"] }
serde_ignored = "0.1"
serde_json = "1.0.68"
serde_repr = "0.1.8"
serde_with = { version = "3.0", features = ["base64"] }
serde_yaml = "0.9"
serial_test = "0.5"
sha2 = "0.10"
sha3 = "0.10"
shell-escape = "0.1.5"
smallvec = "1.6"
smart-default = "0.6"
smartstring = "1.0.1"
strum = { version = "0.24", features = ["derive"] }
stun = "0.4"
subtle = "2.2"
syn = { version = "2.0.4", features = ["extra-traits", "full"] }
sysinfo = "0.24.5"
tar = "0.4.38"
target-lexicon = { version = "0.12.2", default-features = false }
tempfile = "3.3"
testlib = { path = "test-utils/testlib" }
test-log = { version = "0.2", default-features = false, features = ["trace"] }
thiserror = "1.0.30"
tikv-jemallocator = "0.5.0"
time = { version = "0.3.9", features = ["parsing", "serde"] }
tokio = { version = "1.28", features = [
"fs",
"macros",
"net",
"rt-multi-thread",
"sync",
"time",
] }
tokio-stream = { version = "0.1.2", features = ["net"] }
tokio-util = { version = "0.7.1", features = ["codec", "io"] }
toml = "0.8.12"
tqdm = "0.4.4"
tracing = { version = "0.1.36", features = ["std"] }
tracing-appender = "0.2.2"
tracing-opentelemetry = "0.17.0"
tracing-span-tree = "0.1"
tracing-subscriber = { version = "0.3.15", features = ["env-filter", "fmt", "registry", "std"] }
trybuild = "1.0.11"
turn = "0.6"
validator = "0.12"
wasm-encoder = "0.27.0"
wasmer-compiler = { package = "wasmer-compiler-x", version = "=2.4.1" }
wasmer-compiler-singlepass = { package = "wasmer-compiler-singlepass-x", version = "=2.4.1" }
wasmer-engine = { package = "wasmer-engine-x", version = "=2.4.1" }
wasmer-engine-universal = { package = "wasmer-engine-universal-x", version = "=2.4.1", features = ["compiler"] }
wasmer-runtime = { version = "0.18.0", package = "wasmer-runtime-x", features = ["default-backend-singlepass"], default-features = false }
wasmer-runtime-core = { version = "0.18.3", package = "wasmer-runtime-core-x" }
wasmer-types = { package = "wasmer-types-x", version = "=2.4.1" }
wasmer-vm = { package = "wasmer-vm-x", version = "=2.4.1" }
wasmparser = "0.99"
wasmprinter = "0.2"
wasm-smith = "0.10"
wasmtime = { version = "14.0.4", default-features = false, features = ["cranelift"] }
wast = "40.0"
wat = "1.0.40"
webrtc-util = "0.7"
winapi = { version = "0.3", features = ["winbase", "memoryapi", "errhandlingapi", "winnt", "impl-default"] }
xshell = "0.2.1"
xz2 = "0.1.6"
yansi = "0.5.1"
stdx = { package = "unc-stdx", path = "utils/stdx" }
[patch.crates-io]
# Note that "bench" profile inherits from "release" profile and
# "test" profile inherits from "dev" profile.
# https://doc.rust-lang.org/cargo/reference/profiles.html#test
[profile.dev]
panic = 'abort'
[profile.release]
overflow-checks = true
panic = 'abort'
lto = "fat"
codegen-units = 1
# A much faster to compile version of `release`, for development use.
[profile.dev-release]
inherits = "release"
lto = false
codegen-units = 16
debug-assertions = true
# Used for fuzzing, LTO is ill-supported as of 2023-09 and so should not be enabled.
[profile.fuzz]
inherits = "dev"
opt-level = 3
incremental = false
codegen-units = 1
# Compile some dependencies with optimizations to speed up tests.
[profile.dev.package.hex]
opt-level = 3
[profile.dev.package.rand]
opt-level = 3
[profile.dev.package.bs58]
opt-level = 3
[profile.dev.package.sha2]
opt-level = 3
[profile.dev.package.curve25519-dalek]
opt-level = 3
[profile.dev.package.unsafe-libyaml]
opt-level = 3
[profile.dev.package.hashbrown]
opt-level = 3
[profile.dev.package.dynasmrt]
opt-level = 3
[profile.dev.package."*"]
opt-level = 1
================================================
FILE: Dockerfile
================================================
# syntax=docker/dockerfile-upstream:experimental
FROM ubuntu:22.04 as build
RUN apt-get update -qq && apt-get install -y \
git \
cmake \
g++ \
pkg-config \
libssl-dev \
curl \
llvm \
clang \
&& rm -rf /var/lib/apt/lists/*
COPY ./rust-toolchain.toml /tmp/rust-toolchain.toml
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- -y --no-modify-path --default-toolchain none
VOLUME [ /workdir ]
WORKDIR /workdir
COPY . .
ENV PORTABLE=ON
ARG make_target=unc-node-release
RUN make CARGO_TARGET_DIR=/tmp/target \
"${make_target:?make_target not set}"
# Docker image
FROM ubuntu:22.04
EXPOSE 3030 12345
RUN apt-get update -qq && apt-get install -y \
libssl-dev ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/run_docker.sh /usr/local/bin/run.sh
COPY --from=build /tmp/target/release/unc-node /usr/local/bin/unc-node
RUN chmod +x /usr/local/bin/unc-node
# Opencontainers annotations
LABEL org.opencontainers.image.authors="The Utility Project Team" \
org.opencontainers.image.url="https://www.utnet.org/" \
org.opencontainers.image.source="https://github.com/utnet-org/utility" \
org.opencontainers.image.version="0.10.0" \
org.opencontainers.image.revision="1" \
org.opencontainers.image.vendor="The Utility Project" \
org.opencontainers.image.licenses="GPL-2.0-or-later" \
org.opencontainers.image.title="Utility Node" \
org.opencontainers.image.description="Utility Chain Docker Node"
CMD ["/usr/local/bin/run.sh"]
================================================
FILE: Justfile
================================================
# FIXME: some of these tests don't work very well on MacOS at the moment. Should fix
# them at earliest convenience :)
# Also in addition to this, the `nextest-integration` test is currently disabled on macos
with_macos_excludes := if os() == "macos" {
"--exclude node-runtime --exclude runtime-params-estimator --exclude unc-network --exclude estimator-warehouse"
} else {
""
}
nightly_flags := "--features nightly,test_features"
export RUST_BACKTRACE := env("RUST_BACKTRACE", "short")
ci_hack_nextest_profile := if env("CI_HACKS", "0") == "1" { "--profile ci" } else { "" }
# all the tests, as close to CI as possible
test *FLAGS: (test-ci FLAGS) test-extra
# only the tests that are exactly the same as the ones in CI
test-ci *FLAGS: check-cargo-fmt \
python-style-checks \
check-cargo-deny \
check-crates-publish-checker \
check-cargo-clippy \
check-non-default \
check-cargo-udeps \
(nextest "stable" FLAGS) \
(nextest "nightly" FLAGS) \
doctests
# tests that are as close to CI as possible, but not exactly the same code
test-extra: check-lychee
# all cargo tests, TYPE is "stable" or "nightly"
nextest TYPE *FLAGS: (nextest-unit TYPE FLAGS) (nextest-integration TYPE FLAGS)
# cargo unit tests, TYPE is "stable" or "nightly"
nextest-unit TYPE *FLAGS:
RUSTFLAGS="-D warnings" \
cargo nextest run \
--locked \
--workspace \
--exclude integration-tests \
--cargo-profile dev-release \
{{ ci_hack_nextest_profile }} \
{{ with_macos_excludes }} \
{{ if TYPE == "nightly" { nightly_flags } \
else if TYPE == "stable" { "" } \
else { error("TYPE is neighter 'nightly' nor 'stable'") } }} \
{{ FLAGS }}
# cargo integration tests, TYPE is "stable" or "nightly"
[linux]
nextest-integration TYPE *FLAGS:
RUSTFLAGS="-D warnings" \
cargo nextest run \
--locked \
--package integration-tests \
--cargo-profile dev-release \
{{ ci_hack_nextest_profile }} \
{{ if TYPE == "nightly" { nightly_flags } \
else if TYPE == "stable" { "" } \
else { error("TYPE is neither 'nightly' nor 'stable'") } }} \
{{ FLAGS }}
# Note: when re-enabling this on macos, ci.yml will need to be adjusted to report code coverage again
[macos]
nextest-integration TYPE *FLAGS:
@echo "Nextest integration tests are currently disabled on macos!"
doctests:
cargo test --doc
# check various build configurations compile as anticipated
check-non-default:
# Ensure that unc-vm-runner always builds without default features enabled
RUSTFLAGS="-D warnings" \
cargo check -p unc-vm-runner --no-default-features
# check rust formatting
check-cargo-fmt:
cargo fmt -- --check
# check clippy lints
check-cargo-clippy:
CARGO_TARGET_DIR="target/clippy" \
RUSTFLAGS="-D warnings" \
cargo clippy --all-features --all-targets --locked
# check cargo deny lints
check-cargo-deny:
cargo deny --all-features --locked check bans
# crates-publish-checker-based checks
check-crates-publish-checker:
env CARGO_TARGET_DIR="target/crates-publish-checker" cargo run --locked -p crates-publish-checker
# generate a codecov report for RULE
codecov RULE:
#!/usr/bin/env bash
set -euxo pipefail
# Note: macos seems to not support `source <()` as a way to set environment variables, but
# this variant seems to work on both linux and macos.
# TODO: remove the RUSTFLAGS hack, see also https://github.com/rust-lang/cargo/issues/13040
cargo llvm-cov show-env --export-prefix | grep -v RUSTFLAGS= > env
source ./env
export RUSTC_WORKSPACE_WRAPPER="{{ absolute_path("scripts/coverage-wrapper-rustc") }}"
{{ just_executable() }} {{ RULE }}
mkdir -p coverage/codecov
cargo llvm-cov report --profile dev-release --codecov --output-path coverage/codecov/new.json
# generate a codecov report for RULE, CI version
codecov-ci RULE:
#!/usr/bin/env bash
set -euxo pipefail
{{ just_executable() }} codecov "{{ RULE }}"
pushd target
tar -c --zstd -f ../coverage/profraw/new.tar.zst *.profraw
popd
rm -rf target/*.profraw
# generate a tarball with all the binaries for coverage CI
tar-bins-for-coverage-ci:
#!/usr/bin/env bash
find target/dev-release/ \( -name incremental -or -name .fingerprint -or -name out \) -exec rm -rf '{}' \; || true
find target/dev-release/ -not -executable -delete || true
find target/dev-release/ -name 'build*script*build*' -delete || true
tar -c --zstd -f coverage/profraw/binaries/new.tar.zst target/dev-release/
# style checks from python scripts
python-style-checks:
python3 scripts/check_nightly.py
python3 scripts/check_pytests.py
python3 scripts/fix_nightly_feature_flags.py
./scripts/formatting --check
# verify there is no unused dependency specified in a Cargo.toml
check-cargo-udeps:
rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
env CARGO_TARGET_DIR={{justfile_directory()}}/target/udeps RUSTFLAGS='--cfg=udeps --cap-lints=allow' cargo +nightly udeps
# lychee-based url validity checks
check-lychee:
# This is not actually run in CI. GITHUB_TOKEN can still be set locally by people who want
# to reproduce CI behavior in a better way.
git ls-files | grep 'md$\|mkd$\|html\?$' | xargs lychee {{ if env("GITHUB_TOKEN", "") != "" { "" } else { "-a 429" } }}
@echo {{ if env("GITHUB_TOKEN", "") != "" { "" } \
else { "Note: 'Too Many Requests' errors are allowed here but not in CI, set GITHUB_TOKEN to check them" } }}
# build target/rpc_errors_schema.json
build-rpc-errors-schema:
rm -f target/rpc_errors_schema.json
cargo check -p unc-jsonrpc --features dump_errors_schema
# update chain/jsonrpc/res/rpc_errors_schema.json
update-rpc-errors-schema: build-rpc-errors-schema
cp target/rpc_errors_schema.json chain/jsonrpc/res/rpc_errors_schema.json
# check chain/jsonrpc/res/rpc_errors_schema.json
check-rpc-errors-schema: build-rpc-errors-schema
diff target/rpc_errors_schema.json chain/jsonrpc/res/rpc_errors_schema.json
================================================
FILE: LICENSE-GPL2
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and`show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and`show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
================================================
FILE: LICENSE-GPL2.1
================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
================================================
FILE: Makefile
================================================
export DOCKER_BUILDKIT = 1
export CARGO_BUILD_RUSTFLAGS = -D warnings
export UNC_RELEASE_BUILD = no
export CARGO_TARGET_DIR = target
# By default, build a regular release
all: release
docker-utility: DOCKER_TAG ?= utility
docker-utility:
docker build -t $(DOCKER_TAG) -f Dockerfile --build-arg=make_target=unc-node-release --progress=plain .
docker-utility-sandbox: DOCKER_TAG ?= utility-sandbox
docker-utility-sandbox:
docker build -t $(DOCKER_TAG) -f Dockerfile --build-arg=make_target=unc-node-sandbox-release --progress=plain .
docker-utility-nightly: DOCKER_TAG ?= utility-nightly
docker-utility-nightly:
docker build -t $(DOCKER_TAG) -f Dockerfile --build-arg=make_target=unc-node-nightly-release --progress=plain .
release: unc-node-release
cargo build -p store-validator --release
cargo build -p genesis-populate --release
$(MAKE) sandbox-release
unc-node: unc-node-release
@echo 'unc-node binary ready in ./target/release/unc-node'
unc-node-release: UNC_RELEASE_BUILD=release
unc-node-release:
cargo build -p unc-node --release
unc-node-debug:
cargo build -p unc-node
debug: unc-node-debug
cargo build -p store-validator
cargo build -p genesis-populate
$(MAKE) sandbox
perf-release: UNC_RELEASE_BUILD=release
perf-release:
CARGO_PROFILE_RELEASE_DEBUG=true cargo build -p unc-node --release --features performance_stats
cargo build -p store-validator --release --features unc-infra.performance_stats
perf-debug:
cargo build -p unc-node --features performance_stats
cargo build -p store-validator --features unc-infra.performance_stats
nightly-release: unc-node-nightly-release
cargo build -p store-validator --release --features unc-infra/nightly,unc-infra.performance_stats
cargo build -p genesis-populate --release --features unc-infra/nightly,unc-infra.performance_stats
unc-node-nightly-release:
cargo build -p unc-node --release --features nightly,performance_stats
nightly-debug:
cargo build -p unc-node --features nightly,performance_stats
cargo build -p store-validator --features unc-infra/nightly,unc-infra.performance_stats
cargo build -p genesis-populate --features unc-infra/nightly,unc-infra.performance_stats
assertions-release: UNC_RELEASE_BUILD=release
assertions-release:
CARGO_PROFILE_RELEASE_DEBUG=true CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=true cargo build -p unc-node --release --features performance_stats
sandbox: CARGO_TARGET_DIR=sandbox
sandbox: unc-node-sandbox
mkdir -p target/debug
ln -f sandbox/debug/unc-node target/debug/unc-node-sandbox
@ln -f sandbox/debug/unc-node target/debug/unc-sandbox
unc-node-sandbox:
cargo build -p unc-node --features sandbox
sandbox-release: CARGO_TARGET_DIR=sandbox
sandbox-release: unc-node-sandbox-release
mkdir -p target/release
ln -f sandbox/release/unc-node target/release/unc-node-sandbox
@ln -f sandbox/release/unc-node target/release/unc-sandbox
unc-node-sandbox-release:
cargo build -p unc-node --features sandbox --release
.PHONY: docker-utility docker-utility-nightly release unc-node debug
.PHONY: perf-release perf-debug nightly-release nightly-debug assertions-release sandbox
.PHONY: sandbox-release
================================================
FILE: README.md
================================================
<br />
<br />
<p align="center">
<img src="docs/images/logo.gif" width="240">
</p>
<br />
<br />

![Stable Status][stable-release]
![Prerelease Status][prerelease]
[![codecov][codecov-badge]][codecov-url]
[![Discord chat][discord-badge]][discord-url]
[![Telegram Group][telegram-badge]][telegram-url]
[stable-release]: https://img.shields.io/github/v/release/utnet-org/utility?label=stable
[prerelease]: https://img.shields.io/github/v/release/utnet-org/utility?include_prereleases&label=prerelease
[codecov-badge]: https://codecov.io/gh/utnet-org/utility/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/utnet-org/utility
[discord-badge]: https://img.shields.io/discord/490367152054992913.svg
[discord-url]: https://unc.chat
[telegram-badge]: https://cdn.jsdelivr.net/gh/Patrolavia/telegram-badge@8fe3382b3fd3a1c533ba270e608035a27e430c2e/chat.svg
[telegram-url]: https://t.me/cryptounc
## Table of Contents
- [About Utility](#about-utility)
- [Installation](#installation)
- [Directory Structure](#directory-structure)
- [Contributing](#contributing)
- [Security](#security)
## About Utility
Utility's mission is to stimulate community-led innovation for the benefit of people worldwide.
To realize this mission, *Utility* provides a platform where developers and entrepreneurs can build applications that put users back in control of their data and assets. This is a core tenet of the ["Open Web" movement][open-web-url].
A key component of *utnet* is utility, a blockchain-powered unc-infra.tructure for serverless applications and smart contracts. Utility aims to offer the ease-of-use and scalability of modern PaaS like Firebase, but at a fraction of the cost of blockchains like Ethereum.
## Installation
The easiest way to join the network, is by using the `make release` command or download release binaries, which you can install as follows:
```sh
# testnet node init directly use binaries
unc-node --home ~/.unc init --chain-id testnet --download-genesis --download-config
# download snapshot data (optional)
## install rclone 1.66.0 or beyond
```sh
# Mac
$ brew install rclone
# Linux
$ sudo apt install rclone
$ mkdir -p ~/.config/rclone
$ touch ~/.config/rclone/rclone.conf
## rclone config
[unc_cf]
type = s3
provider = Cloudflare
endpoint= https://ec9b597fa02615ca6a0e62b7ff35d0cc.r2.cloudflarestorage.com
access_key_id = 2ff213c3730df215a7cc56e28914092e
secret_access_key = b28609e3869b43339c1267b59cf25aa5deff4097737d3848e1491e0729c3ff6c
acl = public-read
## download data
$ rclone copy --no-check-certificate unc_cf:unc/latest ./
$ latest=$(cat latest)
$ rclone copy --no-check-certificate --progress --transfers=6 unc_cf:unc/${latest:?}.tar.gz /tmp
## un archive snapshot
tar -zxvf /tmp/${latest:?}.tar.gz -C /tmp && mv /tmp/${latest:?}/data ~/.unc
## on ~/.unc dir touch file `validator_key.json` (optional)
{
"account_id": "miner-addr"
"public_key":"ed25519:2yMvZrTtjgFMtcpE12G3tdt7KsYKdKE6jufRnz4Yyxw3",
"private_key":"ed25519:3NVx4sHxBJciEH2wZoMig8YiMx1Q84Ur2RWTd2GQ7JNfWdyDxwwYrUR6XtJR3YcYeWh9NzVEmsnYe2keB97mVExZ"
}
# node run
$ unc-node --home ~/.unc run
```
To learn how to become validator, checkout [documentation](https://docs.xyz666.org).
## Directory Structure
<pre>
├── <a href="./chain/">chain</a>: Consensus chain interaction utilities.
│ ├── <a href="./chain/chain/">bindings</a>: block chain validate and rocksdb column.
│ ├── <a href="./chain/client/">src</a>: peer node bootstrap.
│ └── <a href="./chain/network/">network</a>: libp2p network discover.
├── <a href="./docs/">docs</a>: Documentation resources, including images and diagrams.
├── <a href="./core/">core</a>: Components for utility primitives.
│ ├── <a href="./core/crypto/">crypto</a>: Crypto libs rsa2048, secp256k1.
│ ├── <a href="./core/primitives/">primitives</a>: Chain relatives base data structure.
│ └── <a href="./core/store/">store</a>: rocksdb store data structure.
├── <a href="./infra/">infra</a>: The Utility instance, including application logic and attestation mechanisms.
│ ├── <a href="./infra/src/">infra</a>: Node initialize for Utility.
│ └── <a href="./infra/tests/">test</a>: Command-line tools and utilities.
├── <a href="./runtime/">runtime</a>: Core libraries for various protocol functionalities.
│ ├── <a href="./runtime/runtime/">runtime</a>: Chain state apply, contracts executor.
│ └── <a href="./runtime/unc-vm-runner/">runner</a>: Rust bindings for smart contracts.
├── <a href="./node/">node</a>: Node service for chain messages and transactions.
│ └── <a href="./node/src/">node</a>: Application logic for the node service.
├── <a href="./scripts/">scripts</a>: Utility scripts for development and operational tasks.
└── <a href="./integration-test/">test</a>: Testing suite for end-to-end, smoke, and utility testing.
</pre>
## Contributing
For detailed instructions on how to contribute, including our coding standards, testing practices, and how to submit pull requests, please see [the contribution guidelines](CONTRIBUTING.md)
## Security
Please refer to [SECURITY.md](./SECURITY.md).
================================================
FILE: SECURITY.md
================================================
# Security Policy
Reference client for UNC is held to the highest security standard.
This document defines the policy on how to report vulnerabilities and receive updates when security patches are released.
If you have any suggestions or comments about the security policy, please email the [UNC Security Team](mailto:security@unc.org) at security@unc.org
## Reporting a vulnerability
All security issues should be submitted on [hackenproof](https://hackenproof.com/unc). The team will review the submissions and decide whether they are eligible for bounty payouts. For more details, please check out the program description on the hackenproof website.
## Handling & disclosure process
1. Security report is received and assigned to an owner. This person will coordinate the process of evaluating, fixing, releasing and disclosing the issue.
2. After initial report is received, the evaluation process is performed. It's identified if the issue exists, its severity and which version / components of the code is affected. Additional review to identify similar issues also happens.
3. Fixes are implemented for all supported releases. These fixes are not publicly communicated but held in a private repo of the Security Team or locally.
4. A suggested announcement date for this vulnerability is chosen. The notification is drafted and includes patches to all supported versions and affected components.
5. On the announcement date, the [UNC Security Update newsletter](https://groups.google.com/a/unc.org/g/security-updates) is sent an announcement. The changes are fast tracked and merged into the public repository. At least 6 hours after the mailing list is notified, a copy of the advisory will be published across social channels.
This process may take time, especially when coordinating with network participants and maintainers of other components in the ecosystem.
The goal will be to address issues in as short of a period as possible, but it's important that the process described above to ensure that disclosures are handled in a consistent manner.
*Note:* If the Security Team identifies that an issue is mission-critical and requires a subset of network participants to update prior to newsletter announcement - this will be done in a manual way by communicating via direct channels.
## Reward
The discovery of the security vulnerabilities that include but are not limited to the following categories will be rewarded proportionally to their severity:
* Algorithmic, implementation, and economic issues that violate safety of the blockchain;
* Algorithmic, implementation, and economic issues that stall the blockchain or significantly throttle liveness;
* Algorithmic, implementation, and economic issues in the standard contracts developed by UNC;
* Issues that expose the private data of the users, the developers, or the validators;
The following are the necessary conditions for the reward:
* The vulnerability is disclosed to UNC before it is disclosed publicly and UNC is given sufficient time to fix it;
* The vulnerability is not disclosed to anyone else except the finder and UNC before it is fixed;
* The vulnerability is not exploited until it is fixed.
### Rewards platform
We are using https://gitcoin.co/ to reward tokens. Meaning that every security vulnerability that you submit to us will be processed like a general work-item by an external contributor. To receive the reward, you would need to register on https://gitcoin.co/ and be able to receive the reward through it. Example of a reward for a security vulnerability finding: https://gitcoin.co/issue/utility/community/5/4359
## Receive Security Updates
If you want to be informed about security vulnerabilities, please subscribe to the [UNC Security Update newsletter](https://groups.google.com/a/unc.org/g/security-updates).
The newsletter is very low traffic and only sent out where public disclosure of a vulnerability happens.
================================================
FILE: buf.yaml
================================================
version: v1
breaking:
use:
- WIRE
================================================
FILE: chain/chain/Cargo.toml
================================================
[package]
name = "unc-chain"
version.workspace = true
authors.workspace = true
edition.workspace = true
publish = false
[lints]
workspace = true
[dependencies]
actix.workspace = true
assert_matches.workspace = true
borsh.workspace = true
bytesize.workspace = true
chrono.workspace = true
crossbeam-channel.workspace = true
enum-map.workspace = true
itertools.workspace = true
itoa.workspace = true
lru.workspace = true
num-rational.workspace = true
once_cell.workspace = true
rand.workspace = true
rand_chacha.workspace = true
rayon.workspace = true
strum.workspace = true
thiserror.workspace = true
tracing.workspace = true
yansi.workspace = true
unc-async.workspace = true
unc-cache.workspace = true
unc-chain-configs.workspace = true
unc-chain-primitives.workspace = true
unc-client-primitives.workspace = true
unc-crypto.workspace = true
unc-epoch-manager.workspace = true
unc-network.workspace = true
unc-o11y.workspace = true
unc-performance-metrics.workspace = true
unc-performance-metrics-macros.workspace = true
unc-pool.workspace = true
unc-primitives.workspace = true
unc-store.workspace = true
[dev-dependencies]
insta.workspace = true
assert_matches.workspace = true
[features]
# if enabled, we assert in most situations that are impossible unless some byzantine behavior is observed.
byzantine_asserts = []
expensive_tests = []
test_features = []
no_cache = ["unc-store/no_cache"]
new_epoch_sync = ["unc-store/new_epoch_sync", "unc-primitives/new_epoch_sync", "unc-epoch-manager/new_epoch_sync", "unc-chain-primitives/new_epoch_sync"]
protocol_feature_reject_blocks_with_outdated_protocol_version = [
"unc-primitives/protocol_feature_reject_blocks_with_outdated_protocol_version",
]
nightly = [
"nightly_protocol",
"protocol_feature_reject_blocks_with_outdated_protocol_version",
"unc-async/nightly",
"unc-chain-configs/nightly",
"unc-client-primitives/nightly",
"unc-epoch-manager/nightly",
"unc-network/nightly",
"unc-o11y/nightly",
"unc-pool/nightly",
"unc-primitives/nightly",
"unc-store/nightly",
]
nightly_protocol = [
"unc-async/nightly_protocol",
"unc-chain-configs/nightly_protocol",
"unc-client-primitives/nightly_protocol",
"unc-epoch-manager/nightly_protocol",
"unc-network/nightly_protocol",
"unc-o11y/nightly_protocol",
"unc-pool/nightly_protocol",
"unc-primitives/nightly_protocol",
"unc-store/nightly_protocol",
]
sandbox = ["unc-primitives/sandbox"]
================================================
FILE: chain/chain/src/block_processing_utils.rs
================================================
use crate::chain::BlockMissingChunks;
use crate::orphan::OrphanMissingChunks;
use crate::unc_chain_primitives::error::BlockKnownError::KnownInProcessing;
use crate::Provenance;
use once_cell::sync::OnceCell;
use std::collections::HashMap;
use std::sync::Arc;
use std::time::Instant;
use unc_primitives::block::Block;
use unc_primitives::challenge::{ChallengeBody, ChallengesResult};
use unc_primitives::hash::CryptoHash;
use unc_primitives::sharding::{ReceiptProof, ShardChunkHeader, StateSyncInfo};
use unc_primitives::types::ShardId;
/// Max number of blocks that can be in the pool at once.
/// This number will likely never be hit unless there are many forks in the chain.
pub(crate) const MAX_PROCESSING_BLOCKS: usize = 5;
/// Contains information from preprocessing a block
pub(crate) struct BlockPreprocessInfo {
pub(crate) is_caught_up: bool,
pub(crate) state_sync_info: Option<StateSyncInfo>,
pub(crate) incoming_receipts: HashMap<ShardId, Vec<ReceiptProof>>,
pub(crate) challenges_result: ChallengesResult,
pub(crate) challenged_blocks: Vec<CryptoHash>,
pub(crate) provenance: Provenance,
/// This field will be set when the apply_chunks has finished.
/// This is used to provide a way for caller to wait for the finishing of applying chunks of
/// a block
pub(crate) apply_chunks_done: Arc<OnceCell<()>>,
/// This is used to calculate block processing time metric
pub(crate) block_start_processing_time: Instant,
}
/// Blocks which finished pre-processing and are now being applied asynchronously
pub(crate) struct BlocksInProcessing {
// A map that stores all blocks in processing
preprocessed_blocks: HashMap<CryptoHash, (Block, BlockPreprocessInfo)>,
}
#[derive(Debug)]
pub(crate) enum AddError {
ExceedingPoolSize,
BlockAlreadyInPool,
}
impl From<AddError> for unc_chain_primitives::Error {
fn from(err: AddError) -> Self {
match err {
AddError::ExceedingPoolSize => unc_chain_primitives::Error::TooManyProcessingBlocks,
AddError::BlockAlreadyInPool => {
unc_chain_primitives::Error::BlockKnown(KnownInProcessing)
}
}
}
}
/// Results from processing a block that are useful for client and client actor to use
/// for steps after a block is processed that can't be finished inside Chain after a block is processed
/// (for example, sending requests for missing chunks or challenges).
/// This struct is passed to Chain::process_block as an argument instead of returned as Result,
/// because the information stored here need to returned whether process_block succeeds or returns an error.
#[derive(Default)]
pub struct BlockProcessingArtifact {
pub orphans_missing_chunks: Vec<OrphanMissingChunks>,
pub blocks_missing_chunks: Vec<BlockMissingChunks>,
pub challenges: Vec<ChallengeBody>,
pub invalid_chunks: Vec<ShardChunkHeader>,
}
/// This struct defines the callback function that will be called after apply chunks are finished
/// for each block. Multiple functions that might trigger the start processing of new blocks has
/// this as an argument. Caller of these functions must note that this callback can be called multiple
/// times, for different blocks, because these functions may trigger the processing of more than
/// one block.
pub type DoneApplyChunkCallback = Arc<dyn Fn(CryptoHash) -> () + Send + Sync + 'static>;
#[derive(Debug)]
pub struct BlockNotInPoolError;
impl BlocksInProcessing {
pub(crate) fn new() -> Self {
BlocksInProcessing { preprocessed_blocks: HashMap::new() }
}
pub(crate) fn len(&self) -> usize {
self.preprocessed_blocks.len()
}
/// Add a preprocessed block to the pool. Return Error::ExceedingPoolSize if the pool already
/// reaches its max size.
pub(crate) fn add(
&mut self,
block: Block,
preprocess_info: BlockPreprocessInfo,
) -> Result<(), AddError> {
self.add_dry_run(block.hash())?;
self.preprocessed_blocks.insert(*block.hash(), (block, preprocess_info));
Ok(())
}
pub(crate) fn contains(&self, block_hash: &CryptoHash) -> bool {
self.preprocessed_blocks.contains_key(block_hash)
}
pub(crate) fn remove(
&mut self,
block_hash: &CryptoHash,
) -> Option<(Block, BlockPreprocessInfo)> {
self.preprocessed_blocks.remove(block_hash)
}
/// This function does NOT add the block, it simply checks if the block can be added
pub(crate) fn add_dry_run(&self, block_hash: &CryptoHash) -> Result<(), AddError> {
// We set a limit to the max number of blocks that we will be processing at the same time.
// Since processing a block requires that the its previous block is processed, this limit
// is likely never hit, unless there are many forks in the chain.
// In this case, we will simply drop the block.
if self.preprocessed_blocks.len() >= MAX_PROCESSING_BLOCKS {
Err(AddError::ExceedingPoolSize)
} else if self.preprocessed_blocks.contains_key(block_hash) {
Err(AddError::BlockAlreadyInPool)
} else {
Ok(())
}
}
pub(crate) fn has_blocks_to_catch_up(&self, prev_hash: &CryptoHash) -> bool {
self.preprocessed_blocks
.iter()
.any(|(_, (block, _))| block.header().prev_hash() == prev_hash)
}
/// This function waits until apply_chunks_done is marked as true for all blocks in the pool
/// Returns true if new blocks are done applying chunks
pub(crate) fn wait_for_all_blocks(&self) -> bool {
for (_, (_, block_preprocess_info)) in self.preprocessed_blocks.iter() {
let _ = block_preprocess_info.apply_chunks_done.wait();
}
!self.preprocessed_blocks.is_empty()
}
/// This function waits until apply_chunks_done is marked as true for block `block_hash`
pub(crate) fn wait_for_block(
&self,
block_hash: &CryptoHash,
) -> Result<(), BlockNotInPoolError> {
let _ = self
.preprocessed_blocks
.get(block_hash)
.ok_or(BlockNotInPoolError)?
.1
.apply_chunks_done
.wait();
Ok(())
}
}
================================================
FILE: chain/chain/src/blocks_delay_tracker.rs
================================================
use chrono::DateTime;
use std::collections::{hash_map::Entry, BTreeMap, HashMap};
use std::mem;
use std::time::Instant;
use tracing::error;
use unc_epoch_manager::EpochManagerAdapter;
use unc_primitives::block::{Block, Tip};
use unc_primitives::hash::CryptoHash;
use unc_primitives::sharding::{ChunkHash, ShardChunkHeader};
use unc_primit
gitextract_ayheqwxv/
├── .cargo/
│ ├── audit.toml
│ └── config.toml
├── .config/
│ └── nextest.toml
├── .dockerignore
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── 01_BUG_REPORT.md
│ │ └── 02_FEATURE_REQUEST.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── RELEASE_TEMPLATE.md
│ └── workflows/
│ ├── calculate-alpha-release.bash
│ ├── crates_publish.yml
│ ├── default.yml
│ ├── gh_pages.yml
│ ├── issue_metrics.yml
│ ├── release_binaries.yml
│ └── release_docker.yml
├── .gitignore
├── .gitmodules
├── .pre-commit-config.yaml
├── .style.yapf
├── ATTRIBUTIONS.md
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── Dockerfile
├── Justfile
├── LICENSE-GPL2
├── LICENSE-GPL2.1
├── Makefile
├── README.md
├── SECURITY.md
├── buf.yaml
├── chain/
│ ├── chain/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── block_processing_utils.rs
│ │ ├── blocks_delay_tracker.rs
│ │ ├── chain.rs
│ │ ├── chain_update.rs
│ │ ├── chunks_store.rs
│ │ ├── crypto_hash_timer.rs
│ │ ├── doomslug.rs
│ │ ├── flat_storage_creator.rs
│ │ ├── garbage_collection.rs
│ │ ├── lib.rs
│ │ ├── lightclient.rs
│ │ ├── metrics.rs
│ │ ├── migrations.rs
│ │ ├── missing_chunks.rs
│ │ ├── orphan.rs
│ │ ├── resharding.rs
│ │ ├── sharding.rs
│ │ ├── state_request_tracker.rs
│ │ ├── state_snapshot_actor.rs
│ │ ├── store.rs
│ │ ├── store_validator/
│ │ │ └── validate.rs
│ │ ├── store_validator.rs
│ │ ├── test_utils/
│ │ │ ├── kv_runtime.rs
│ │ │ └── validator_schedule.rs
│ │ ├── test_utils.rs
│ │ ├── tests/
│ │ │ ├── challenges.rs
│ │ │ ├── doomslug.rs
│ │ │ ├── garbage_collection.rs
│ │ │ ├── mod.rs
│ │ │ ├── simple_chain.rs
│ │ │ └── sync_chain.rs
│ │ ├── types.rs
│ │ ├── update_shard.rs
│ │ └── validate.rs
│ ├── chain-primitives/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── error.rs
│ │ └── lib.rs
│ ├── chunks/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── adapter.rs
│ │ ├── chunk_cache.rs
│ │ ├── client.rs
│ │ ├── lib.rs
│ │ ├── logic.rs
│ │ ├── metrics.rs
│ │ ├── shards_manager_actor.rs
│ │ ├── test/
│ │ │ ├── basic.rs
│ │ │ └── multi.rs
│ │ ├── test_loop.rs
│ │ └── test_utils.rs
│ ├── chunks-primitives/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── error.rs
│ │ └── lib.rs
│ ├── client/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── adapter.rs
│ │ ├── adversarial.rs
│ │ ├── chunk_validation.rs
│ │ ├── client.rs
│ │ ├── client_actor.rs
│ │ ├── config_updater.rs
│ │ ├── debug.rs
│ │ ├── info.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── sync/
│ │ │ ├── adapter.rs
│ │ │ ├── block.rs
│ │ │ ├── epoch.rs
│ │ │ ├── external.rs
│ │ │ ├── header.rs
│ │ │ ├── mod.rs
│ │ │ ├── state.rs
│ │ │ └── sync_actor.rs
│ │ ├── sync_jobs_actor.rs
│ │ ├── test_utils/
│ │ │ ├── block_stats.rs
│ │ │ ├── client.rs
│ │ │ ├── mod.rs
│ │ │ ├── peer_manager_mock.rs
│ │ │ ├── setup.rs
│ │ │ ├── test_env.rs
│ │ │ └── test_env_builder.rs
│ │ ├── tests/
│ │ │ ├── bug_repros.rs
│ │ │ ├── catching_up.rs
│ │ │ ├── chunks_management.rs
│ │ │ ├── consensus.rs
│ │ │ ├── cross_shard_tx.rs
│ │ │ ├── doomslug.rs
│ │ │ ├── maintenance_windows.rs
│ │ │ ├── mod.rs
│ │ │ ├── process_blocks.rs
│ │ │ └── query_client.rs
│ │ └── view_client.rs
│ ├── client-primitives/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── debug.rs
│ │ ├── lib.rs
│ │ └── types.rs
│ ├── epoch-manager/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── adapter.rs
│ │ ├── lib.rs
│ │ ├── proposals.rs
│ │ ├── reward_calculator.rs
│ │ ├── shard_assignment.rs
│ │ ├── shard_tracker.rs
│ │ ├── test_utils.rs
│ │ ├── tests/
│ │ │ ├── mod.rs
│ │ │ └── random_epochs.rs
│ │ ├── types.rs
│ │ └── validator_selection.rs
│ ├── indexer/
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── lib.rs
│ │ └── streamer/
│ │ ├── errors.rs
│ │ ├── fetchers.rs
│ │ ├── metrics.rs
│ │ ├── mod.rs
│ │ └── utils.rs
│ ├── indexer-primitives/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── lib.rs
│ ├── jsonrpc/
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── client/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── fuzz/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ └── fuzz_targets_disabled/
│ │ │ └── fuzz_target_1.rs
│ │ ├── jsonrpc-tests/
│ │ │ ├── Cargo.toml
│ │ │ ├── res/
│ │ │ │ └── genesis_config.json
│ │ │ ├── src/
│ │ │ │ └── lib.rs
│ │ │ └── tests/
│ │ │ ├── http_query.rs
│ │ │ ├── rpc_query.rs
│ │ │ └── rpc_transactions.rs
│ │ ├── res/
│ │ │ ├── chain_n_chunk_info.css
│ │ │ ├── chain_n_chunk_info.html
│ │ │ ├── debug.html
│ │ │ ├── epoch_info.css
│ │ │ ├── epoch_info.html
│ │ │ ├── last_blocks.css
│ │ │ ├── last_blocks.html
│ │ │ ├── last_blocks.js
│ │ │ ├── network_info.css
│ │ │ ├── network_info.html
│ │ │ ├── network_info.js
│ │ │ ├── rpc_errors_schema.json
│ │ │ ├── split_store.html
│ │ │ ├── sync.css
│ │ │ ├── sync.html
│ │ │ ├── tier1_network_info.html
│ │ │ ├── validator.css
│ │ │ └── validator.html
│ │ └── src/
│ │ ├── api/
│ │ │ ├── all_miners.rs
│ │ │ ├── blocks.rs
│ │ │ ├── changes.rs
│ │ │ ├── chunks.rs
│ │ │ ├── client_config.rs
│ │ │ ├── config.rs
│ │ │ ├── gas_price.rs
│ │ │ ├── light_client.rs
│ │ │ ├── maintenance.rs
│ │ │ ├── mod.rs
│ │ │ ├── network_info.rs
│ │ │ ├── provider.rs
│ │ │ ├── query.rs
│ │ │ ├── receipts.rs
│ │ │ ├── sandbox.rs
│ │ │ ├── split_storage.rs
│ │ │ ├── status.rs
│ │ │ ├── transactions.rs
│ │ │ └── validator.rs
│ │ ├── lib.rs
│ │ └── metrics.rs
│ ├── jsonrpc-adversarial-primitives/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── jsonrpc-primitives/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── errors.rs
│ │ ├── lib.rs
│ │ ├── message.rs
│ │ └── types/
│ │ ├── all_miners.rs
│ │ ├── blocks.rs
│ │ ├── changes.rs
│ │ ├── chunks.rs
│ │ ├── client_config.rs
│ │ ├── config.rs
│ │ ├── entity_debug.rs
│ │ ├── gas_price.rs
│ │ ├── light_client.rs
│ │ ├── maintenance.rs
│ │ ├── mod.rs
│ │ ├── network_info.rs
│ │ ├── provider.rs
│ │ ├── query.rs
│ │ ├── receipts.rs
│ │ ├── sandbox.rs
│ │ ├── split_storage.rs
│ │ ├── status.rs
│ │ ├── transactions.rs
│ │ └── validator.rs
│ ├── network/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ ├── accounts_data/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── actix.rs
│ │ ├── announce_accounts/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── blacklist.rs
│ │ ├── broadcast/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── client.rs
│ │ ├── concurrency/
│ │ │ ├── arc_mutex.rs
│ │ │ ├── atomic_cell.rs
│ │ │ ├── ctx/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── tests.rs
│ │ │ │ └── time.rs
│ │ │ ├── demux.rs
│ │ │ ├── mod.rs
│ │ │ ├── rate.rs
│ │ │ ├── rayon.rs
│ │ │ ├── runtime.rs
│ │ │ ├── scope/
│ │ │ │ ├── mod.rs
│ │ │ │ └── tests.rs
│ │ │ ├── signal.rs
│ │ │ └── tests.rs
│ │ ├── config.rs
│ │ ├── config_json.rs
│ │ ├── debug.rs
│ │ ├── lib.rs
│ │ ├── network_protocol/
│ │ │ ├── borsh.rs
│ │ │ ├── borsh_conv.rs
│ │ │ ├── edge.rs
│ │ │ ├── mod.rs
│ │ │ ├── network.proto
│ │ │ ├── peer.rs
│ │ │ ├── proto_conv/
│ │ │ │ ├── account_key.rs
│ │ │ │ ├── crypto.rs
│ │ │ │ ├── handshake.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── net.rs
│ │ │ │ ├── peer_message.rs
│ │ │ │ ├── time.rs
│ │ │ │ ├── trace_context.rs
│ │ │ │ └── util.rs
│ │ │ ├── state_sync.rs
│ │ │ ├── testonly.rs
│ │ │ └── tests.rs
│ │ ├── peer/
│ │ │ ├── mod.rs
│ │ │ ├── peer_actor.rs
│ │ │ ├── stream.rs
│ │ │ ├── testonly.rs
│ │ │ ├── tests/
│ │ │ │ ├── communication.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── stream.rs
│ │ │ ├── tracker.rs
│ │ │ └── transfer_stats.rs
│ │ ├── peer_manager/
│ │ │ ├── connection/
│ │ │ │ ├── mod.rs
│ │ │ │ └── tests.rs
│ │ │ ├── connection_store/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ ├── mod.rs
│ │ │ ├── network_state/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── routing.rs
│ │ │ │ └── tier1.rs
│ │ │ ├── peer_manager_actor.rs
│ │ │ ├── peer_store/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ ├── testonly.rs
│ │ │ └── tests/
│ │ │ ├── accounts_data.rs
│ │ │ ├── connection_pool.rs
│ │ │ ├── mod.rs
│ │ │ ├── nonce.rs
│ │ │ ├── routing.rs
│ │ │ ├── snapshot_hosts.rs
│ │ │ ├── tier1.rs
│ │ │ └── tier2.rs
│ │ ├── private_actix.rs
│ │ ├── raw/
│ │ │ ├── connection.rs
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── routing/
│ │ │ ├── bfs.rs
│ │ │ ├── edge.rs
│ │ │ ├── edge_cache/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ ├── graph/
│ │ │ │ ├── mod.rs
│ │ │ │ └── tests.rs
│ │ │ ├── graph_v2/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ ├── mod.rs
│ │ │ ├── route_back_cache.rs
│ │ │ └── routing_table_view/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── shards_manager.rs
│ │ ├── sink.rs
│ │ ├── snapshot_hosts/
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── state_sync.rs
│ │ ├── stats/
│ │ │ ├── metrics.rs
│ │ │ └── mod.rs
│ │ ├── store/
│ │ │ ├── mod.rs
│ │ │ ├── schema/
│ │ │ │ ├── mod.rs
│ │ │ │ ├── testonly.rs
│ │ │ │ └── tests.rs
│ │ │ └── testonly.rs
│ │ ├── stun/
│ │ │ ├── mod.rs
│ │ │ ├── testonly.rs
│ │ │ └── tests.rs
│ │ ├── tcp.rs
│ │ ├── test_loop.rs
│ │ ├── test_utils.rs
│ │ ├── testonly/
│ │ │ ├── fake_client.rs
│ │ │ ├── mod.rs
│ │ │ └── stream.rs
│ │ └── types.rs
│ ├── pool/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ └── types.rs
│ └── telemetry/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── lib.rs
│ └── metrics.rs
├── cliff.toml
├── codecov.yml
├── core/
│ ├── async/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── actix.rs
│ │ ├── examples/
│ │ │ ├── async_component.rs
│ │ │ ├── async_component_test.rs
│ │ │ ├── mod.rs
│ │ │ ├── multi_instance_test.rs
│ │ │ ├── sum_numbers.rs
│ │ │ ├── sum_numbers_test.rs
│ │ │ ├── timed_component.rs
│ │ │ └── timed_component_test.rs
│ │ ├── futures.rs
│ │ ├── lib.rs
│ │ ├── messaging.rs
│ │ ├── test_loop/
│ │ │ ├── adhoc.rs
│ │ │ ├── delay_sender.rs
│ │ │ ├── event_handler.rs
│ │ │ ├── futures.rs
│ │ │ └── multi_instance.rs
│ │ ├── test_loop.rs
│ │ └── time.rs
│ ├── chain-configs/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── client_config.rs
│ │ ├── genesis_config.rs
│ │ ├── genesis_validate.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ └── updateable_config.rs
│ ├── crypto/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── errors.rs
│ │ ├── hash.rs
│ │ ├── key_conversion.rs
│ │ ├── key_file.rs
│ │ ├── lib.rs
│ │ ├── signature.rs
│ │ ├── signer.rs
│ │ ├── test_utils.rs
│ │ ├── traits.rs
│ │ ├── util.rs
│ │ └── vrf.rs
│ ├── dyn-configs/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── lib.rs
│ │ └── metrics.rs
│ ├── o11y/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── benches/
│ │ │ └── metrics.rs
│ │ └── src/
│ │ ├── context.rs
│ │ ├── delay_detector.rs
│ │ ├── env_filter.rs
│ │ ├── io_tracer.rs
│ │ ├── lib.rs
│ │ ├── log_config.rs
│ │ ├── log_counter.rs
│ │ ├── macros.rs
│ │ ├── metrics.rs
│ │ ├── opentelemetry.rs
│ │ ├── reload.rs
│ │ ├── span_duration_logger.rs
│ │ ├── subscriber.rs
│ │ ├── testonly/
│ │ │ └── tracing_capture.rs
│ │ └── testonly.rs
│ ├── parameters/
│ │ ├── Cargo.toml
│ │ ├── res/
│ │ │ ├── README.md
│ │ │ └── runtime_configs/
│ │ │ ├── 129.yaml
│ │ │ ├── 138.yaml
│ │ │ ├── 35.yaml
│ │ │ ├── 42.yaml
│ │ │ ├── 46.yaml
│ │ │ ├── 48.yaml
│ │ │ ├── 49.yaml
│ │ │ ├── 50.yaml
│ │ │ ├── 52.yaml
│ │ │ ├── 53.yaml
│ │ │ ├── 55.yaml
│ │ │ ├── 57.yaml
│ │ │ ├── 59.yaml
│ │ │ ├── 61.yaml
│ │ │ ├── 62.yaml
│ │ │ ├── 63.yaml
│ │ │ ├── 64.yaml
│ │ │ ├── parameters.snap
│ │ │ ├── parameters.yaml
│ │ │ └── parameters_testnet.yaml
│ │ └── src/
│ │ ├── config.rs
│ │ ├── config_store.rs
│ │ ├── cost.rs
│ │ ├── lib.rs
│ │ ├── parameter.rs
│ │ ├── parameter_table.rs
│ │ ├── snapshots/
│ │ │ ├── unc_parameters__config_store__tests__138.json.snap
│ │ │ ├── unc_parameters__config_store__tests__testnet_138.json.snap
│ │ │ └── unc_parameters__view__tests__runtime_config_view.snap
│ │ ├── view.rs
│ │ └── vm.rs
│ ├── primitives/
│ │ ├── Cargo.toml
│ │ ├── benches/
│ │ │ └── serialization.rs
│ │ └── src/
│ │ ├── action/
│ │ │ ├── delegate.rs
│ │ │ └── mod.rs
│ │ ├── block.rs
│ │ ├── block_header.rs
│ │ ├── challenge.rs
│ │ ├── chunk_validation.rs
│ │ ├── epoch_manager.rs
│ │ ├── epoch_sync.rs
│ │ ├── errors.rs
│ │ ├── lib.rs
│ │ ├── merkle.rs
│ │ ├── network.rs
│ │ ├── rand.rs
│ │ ├── receipt.rs
│ │ ├── runtime/
│ │ │ ├── apply_state.rs
│ │ │ ├── migration_data.rs
│ │ │ └── mod.rs
│ │ ├── sandbox.rs
│ │ ├── shard_layout.rs
│ │ ├── sharding/
│ │ │ └── shard_chunk_header_inner.rs
│ │ ├── sharding.rs
│ │ ├── signable_message.rs
│ │ ├── snapshots/
│ │ │ ├── unc_primitives__views__tests__exec_metadata_v1_view.snap
│ │ │ ├── unc_primitives__views__tests__exec_metadata_v2_view.snap
│ │ │ ├── unc_primitives__views__tests__exec_metadata_v3_view.snap
│ │ │ └── unc_primitives__views__tests__runtime_config_view.snap
│ │ ├── state.rs
│ │ ├── state_part.rs
│ │ ├── state_record.rs
│ │ ├── state_sync.rs
│ │ ├── static_clock.rs
│ │ ├── telemetry.rs
│ │ ├── test_utils.rs
│ │ ├── transaction.rs
│ │ ├── trie_key.rs
│ │ ├── types.rs
│ │ ├── upgrade_schedule.rs
│ │ ├── utils/
│ │ │ └── min_heap.rs
│ │ ├── utils.rs
│ │ ├── validator_mandates.rs
│ │ ├── validator_signer.rs
│ │ ├── version.rs
│ │ └── views.rs
│ ├── primitives-core/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── account.rs
│ │ ├── chains.rs
│ │ ├── config.rs
│ │ ├── hash.rs
│ │ ├── lib.rs
│ │ ├── serialize.rs
│ │ ├── types.rs
│ │ └── version.rs
│ └── store/
│ ├── Cargo.toml
│ ├── benches/
│ │ ├── finalize_bench.rs
│ │ ├── store_bench.rs
│ │ └── trie_bench.rs
│ └── src/
│ ├── cold_storage.rs
│ ├── columns.rs
│ ├── config.rs
│ ├── db/
│ │ ├── colddb.rs
│ │ ├── database_tests.rs
│ │ ├── refcount.rs
│ │ ├── rocksdb/
│ │ │ ├── instance_tracker.rs
│ │ │ └── snapshot.rs
│ │ ├── rocksdb.rs
│ │ ├── slice.rs
│ │ ├── splitdb.rs
│ │ └── testdb.rs
│ ├── db.rs
│ ├── flat/
│ │ ├── chunk_view.rs
│ │ ├── delta.rs
│ │ ├── inlining_migration.rs
│ │ ├── manager.rs
│ │ ├── metrics.rs
│ │ ├── mod.rs
│ │ ├── storage.rs
│ │ ├── store_helper.rs
│ │ ├── test_utils.rs
│ │ └── types.rs
│ ├── genesis/
│ │ ├── initialization.rs
│ │ ├── mod.rs
│ │ └── state_applier.rs
│ ├── lib.rs
│ ├── metadata.rs
│ ├── metrics.rs
│ ├── migrations.rs
│ ├── opener.rs
│ ├── rocksdb_metrics.rs
│ ├── sync_utils.rs
│ ├── test_utils.rs
│ └── trie/
│ ├── accounting_cache.rs
│ ├── config.rs
│ ├── from_flat.rs
│ ├── insert_delete.rs
│ ├── iterator.rs
│ ├── mem/
│ │ ├── arena/
│ │ │ ├── alloc.rs
│ │ │ ├── metrics.rs
│ │ │ └── mod.rs
│ │ ├── construction.rs
│ │ ├── flexible_data/
│ │ │ ├── children.rs
│ │ │ ├── encoding.rs
│ │ │ ├── extension.rs
│ │ │ ├── mod.rs
│ │ │ └── value.rs
│ │ ├── loading.rs
│ │ ├── lookup.rs
│ │ ├── metrics.rs
│ │ ├── mod.rs
│ │ ├── node/
│ │ │ ├── encoding.rs
│ │ │ ├── mod.rs
│ │ │ ├── mutation.rs
│ │ │ ├── tests.rs
│ │ │ └── view.rs
│ │ └── updating.rs
│ ├── mod.rs
│ ├── nibble_slice.rs
│ ├── prefetching_trie_storage.rs
│ ├── raw_node.rs
│ ├── resharding.rs
│ ├── shard_tries.rs
│ ├── state_parts.rs
│ ├── state_snapshot.rs
│ ├── trie_recording.rs
│ ├── trie_storage.rs
│ ├── trie_tests.rs
│ ├── update/
│ │ └── iterator.rs
│ └── update.rs
├── deny.toml
├── docs/
│ ├── README.md
│ ├── SUMMARY.md
│ ├── advanced_configuration/
│ │ └── networking.md
│ ├── architecture/
│ │ ├── README.md
│ │ ├── gas/
│ │ │ ├── README.md
│ │ │ ├── estimator.md
│ │ │ ├── gas_profile.md
│ │ │ └── parameter_definition.md
│ │ ├── how/
│ │ │ ├── README.md
│ │ │ ├── epoch.md
│ │ │ ├── gas.md
│ │ │ ├── gc.md
│ │ │ ├── meta-tx.md
│ │ │ ├── proofs.md
│ │ │ ├── serialization.md
│ │ │ ├── sync.md
│ │ │ ├── tx_receipts.md
│ │ │ └── tx_routing.md
│ │ ├── network.md
│ │ ├── next/
│ │ │ ├── README.md
│ │ │ ├── catchup_and_state_sync.md
│ │ │ └── malicious_chunk_producer_and_phase2.md
│ │ ├── storage/
│ │ │ ├── database.md
│ │ │ ├── flat_storage.md
│ │ │ ├── flow.md
│ │ │ └── trie.md
│ │ └── storage.md
│ ├── book.toml
│ ├── misc/
│ │ ├── README.md
│ │ ├── state_sync_dump.md
│ │ └── state_sync_from_external_storage.md
│ ├── practices/
│ │ ├── README.md
│ │ ├── docs.md
│ │ ├── engaging_and_effective_communication.md
│ │ ├── fast_builds.md
│ │ ├── protocol_upgrade.md
│ │ ├── rust.md
│ │ ├── security_vulnerabilities.md
│ │ ├── style.md
│ │ ├── testing/
│ │ │ ├── README.md
│ │ │ ├── python_tests.md
│ │ │ └── test_utils.md
│ │ ├── tracking_issues.md
│ │ ├── when_to_use_private_repository.md
│ │ └── workflows/
│ │ ├── README.md
│ │ ├── deploy_a_contract.md
│ │ ├── gas_estimations.md
│ │ ├── io_trace.md
│ │ ├── localnet_on_many_machines.md
│ │ └── run_a_node.md
│ └── test_networks/
│ └── mainnet_spoon.md
├── genesis-tools/
│ ├── README.md
│ ├── genesis-csv-to-json/
│ │ ├── Cargo.toml
│ │ ├── res/
│ │ │ └── test_accounts.csv
│ │ └── src/
│ │ ├── csv_parser.rs
│ │ ├── csv_to_json_configs.rs
│ │ ├── main.rs
│ │ └── serde_with.rs
│ ├── genesis-populate/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ └── state_dump.rs
│ └── keypair-generator/
│ ├── Cargo.toml
│ └── src/
│ └── main.rs
├── infra/
│ ├── Cargo.toml
│ ├── benches/
│ │ └── store.rs
│ ├── res/
│ │ ├── example-config-gc.json
│ │ └── example-config-no-gc.json
│ ├── src/
│ │ ├── append_only_map.rs
│ │ ├── cold_storage.rs
│ │ ├── config.rs
│ │ ├── config_validate.rs
│ │ ├── download_file.rs
│ │ ├── dyn_config.rs
│ │ ├── entity_debug.rs
│ │ ├── entity_debug_serializer.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── migrations.rs
│ │ ├── runtime/
│ │ │ ├── errors.rs
│ │ │ ├── mod.rs
│ │ │ └── tests.rs
│ │ ├── state_sync.rs
│ │ └── test_utils.rs
│ └── tests/
│ └── economics.rs
├── integration-tests/
│ ├── Cargo.toml
│ └── src/
│ ├── genesis_helpers.rs
│ ├── lib.rs
│ ├── node/
│ │ ├── mod.rs
│ │ ├── process_node.rs
│ │ ├── runtime_node.rs
│ │ └── thread_node.rs
│ ├── runtime_utils.rs
│ ├── test_helpers.rs
│ ├── tests/
│ │ ├── client/
│ │ │ ├── access_key_nonce_for_implicit_accounts.rs
│ │ │ ├── account_id_in_function_call_permission.rs
│ │ │ ├── adversarial_behaviors.rs
│ │ │ ├── benchmarks.rs
│ │ │ ├── block_corruption.rs
│ │ │ ├── cap_max_gas_price.rs
│ │ │ ├── challenges.rs
│ │ │ ├── chunk_nodes_cache.rs
│ │ │ ├── chunk_validation.rs
│ │ │ ├── chunks_management.rs
│ │ │ ├── cold_storage.rs
│ │ │ ├── epoch_sync.rs
│ │ │ ├── fix_contract_loading_cost.rs
│ │ │ ├── fix_storage_usage.rs
│ │ │ ├── flat_storage.rs
│ │ │ ├── in_memory_tries.rs
│ │ │ ├── increase_deployment_cost.rs
│ │ │ ├── increase_storage_compute_cost.rs
│ │ │ ├── limit_contract_functions_number.rs
│ │ │ ├── lower_storage_key_limit.rs
│ │ │ ├── mod.rs
│ │ │ ├── process_blocks.rs
│ │ │ ├── restore_receipts_after_fix_apply_chunks.rs
│ │ │ ├── runtimes.rs
│ │ │ ├── sandbox.rs
│ │ │ ├── state_dump.rs
│ │ │ ├── state_snapshot.rs
│ │ │ ├── sync_state_nodes.rs
│ │ │ ├── uncvm.rs
│ │ │ ├── undo_block.rs
│ │ │ ├── wallet_contract.rs
│ │ │ └── zero_balance_account.rs
│ │ ├── framework/
│ │ │ ├── mod.rs
│ │ │ ├── node_cluster.rs
│ │ │ ├── pledge_nodes.rs
│ │ │ ├── rpc_error_structs.rs
│ │ │ ├── rpc_nodes.rs
│ │ │ ├── run_nodes.rs
│ │ │ ├── sync_nodes.rs
│ │ │ └── track_shards.rs
│ │ ├── mod.rs
│ │ ├── network/
│ │ │ ├── churn_attack.rs
│ │ │ ├── full_network.rs
│ │ │ ├── mod.rs
│ │ │ ├── peer_handshake.rs
│ │ │ ├── runner.rs
│ │ │ └── stress_network.rs
│ │ ├── runtime/
│ │ │ ├── deployment.rs
│ │ │ ├── mod.rs
│ │ │ ├── sanity_checks.rs
│ │ │ ├── snapshots/
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nightly.snap
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nondeterministic.snap
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nondeterministic_nightly.snap
│ │ │ │ ├── integration_tests__tests__runtime__sanity_checks__receipts_status.snap
│ │ │ │ └── integration_tests__tests__runtime__sanity_checks__receipts_status_nondeterministic.snap
│ │ │ ├── state_viewer.rs
│ │ │ └── test_evil_contracts.rs
│ │ ├── standard_cases/
│ │ │ ├── mod.rs
│ │ │ ├── rpc.rs
│ │ │ └── runtime.rs
│ │ ├── test_catchup.rs
│ │ ├── test_errors.rs
│ │ ├── test_overflows.rs
│ │ ├── test_simple.rs
│ │ └── test_tps_regression.rs
│ ├── unc_utils.rs
│ └── user/
│ ├── mod.rs
│ ├── rpc_user.rs
│ └── runtime_user.rs
├── lychee.toml
├── node/
│ ├── Cargo.toml
│ ├── build.rs
│ ├── res/
│ │ ├── invalid_proof.json
│ │ └── proof_example.json
│ └── src/
│ ├── cli.rs
│ └── main.rs
├── pytest/
│ ├── Pipfile
│ ├── README.md
│ ├── __init__.py
│ ├── debug_scripts/
│ │ ├── Pipfile
│ │ ├── READEME.md
│ │ ├── __init__.py
│ │ ├── request_chain_info.py
│ │ ├── send_validator_logs.py
│ │ └── tests/
│ │ ├── __init__.py
│ │ ├── data/
│ │ │ └── node0.logs
│ │ └── send_validator_logs_test.py
│ ├── endtoend/
│ │ ├── __init__.py
│ │ └── endtoend.py
│ ├── lib/
│ │ ├── __init__.py
│ │ ├── account.py
│ │ ├── branches.py
│ │ ├── cluster.py
│ │ ├── configured_logger.py
│ │ ├── data.py
│ │ ├── key.py
│ │ ├── lightclient.py
│ │ ├── messages/
│ │ │ ├── __init__.py
│ │ │ ├── block.py
│ │ │ ├── bridge.py
│ │ │ ├── crypto.py
│ │ │ ├── network.py
│ │ │ ├── shard.py
│ │ │ └── tx.py
│ │ ├── metrics.py
│ │ ├── mocknet.py
│ │ ├── mocknet_helpers.py
│ │ ├── network.py
│ │ ├── peer.py
│ │ ├── populate.py
│ │ ├── proxy.py
│ │ ├── proxy_instances.py
│ │ ├── resharding_lib.py
│ │ ├── serializer.py
│ │ ├── state_sync_lib.py
│ │ ├── transaction.py
│ │ └── utils.py
│ ├── remote.json
│ ├── requirements.txt
│ ├── tests/
│ │ ├── __init__.py
│ │ ├── delete_remote_nodes.py
│ │ └── loadtest/
│ │ ├── README.md
│ │ ├── contract/
│ │ │ ├── Cargo.toml
│ │ │ ├── build.sh
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── loadtest.py
│ │ ├── loadtest2.py
│ │ ├── locust/
│ │ │ ├── README.md
│ │ │ ├── common/
│ │ │ │ ├── base.py
│ │ │ │ ├── congestion.py
│ │ │ │ ├── ft.py
│ │ │ │ └── social.py
│ │ │ ├── locustfiles/
│ │ │ │ ├── congestion.py
│ │ │ │ ├── ft.py
│ │ │ │ └── social.py
│ │ │ └── res/
│ │ │ └── social_db.wasm
│ │ └── setup.py
│ └── tools/
│ ├── mirror/
│ │ ├── contract/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── mirror_utils.py
│ │ ├── offline_test.py
│ │ └── online_test.py
│ └── prober/
│ ├── prober.py
│ ├── prober_split.py
│ └── prober_util.py
├── runtime/
│ ├── runtime/
│ │ ├── Cargo.toml
│ │ ├── src/
│ │ │ ├── actions.rs
│ │ │ ├── adapter.rs
│ │ │ ├── balance_checker.rs
│ │ │ ├── config.rs
│ │ │ ├── ext.rs
│ │ │ ├── lib.rs
│ │ │ ├── metrics.rs
│ │ │ ├── prefetch.rs
│ │ │ ├── receipt_manager.rs
│ │ │ ├── state_viewer/
│ │ │ │ ├── errors.rs
│ │ │ │ └── mod.rs
│ │ │ └── verifier.rs
│ │ └── tests/
│ │ ├── runtime_group_tools/
│ │ │ ├── mod.rs
│ │ │ └── random_config.rs
│ │ └── test_async_calls.rs
│ ├── runtime-params-estimator/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── compiler.sh
│ │ ├── costs.txt
│ │ ├── emu-cost/
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── build.sh
│ │ │ ├── counter_plugin/
│ │ │ │ ├── 0001-linux-user-fix-page-table-trashing-when-mmap-munmap-.patch
│ │ │ │ ├── 0002-linux-user-strace-better-format-mmap-logs-support-mr.patch
│ │ │ │ ├── 0003-plugins-avoid-failing-plugin-when-CPU-is-inited-seve.patch
│ │ │ │ ├── Makefile
│ │ │ │ ├── counter.c
│ │ │ │ ├── qemu-x86_64
│ │ │ │ └── test.c
│ │ │ ├── data_builder.py
│ │ │ ├── io_cost.sh
│ │ │ └── run.sh
│ │ ├── estimate.sh
│ │ ├── estimator-warehouse/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── src/
│ │ │ ├── check.rs
│ │ │ ├── db.rs
│ │ │ ├── estimate.rs
│ │ │ ├── import.rs
│ │ │ ├── init.sql
│ │ │ ├── main.rs
│ │ │ ├── snapshots/
│ │ │ │ ├── estimator_warehouse__check__tests__check_command-2.snap
│ │ │ │ ├── estimator_warehouse__check__tests__check_command-3.snap
│ │ │ │ ├── estimator_warehouse__check__tests__check_command-4.snap
│ │ │ │ ├── estimator_warehouse__check__tests__check_command.snap
│ │ │ │ └── estimator_warehouse__tests__stats.snap
│ │ │ └── zulip.rs
│ │ ├── res/
│ │ │ ├── 75220100-75220101.s0.io_trace
│ │ │ ├── fungible_token.wasm
│ │ │ ├── lockup_contract.wasm
│ │ │ ├── mission_control.wasm
│ │ │ ├── staking_pool.wasm
│ │ │ ├── status_message.wasm
│ │ │ ├── voting_contract.wasm
│ │ │ └── whitelist.wasm
│ │ ├── setup.sh
│ │ └── src/
│ │ ├── action_costs.rs
│ │ ├── config.rs
│ │ ├── cost.rs
│ │ ├── cost_table.rs
│ │ ├── costs_to_runtime_config.rs
│ │ ├── estimator_context.rs
│ │ ├── estimator_params.rs
│ │ ├── function_call.rs
│ │ ├── gas_cost.rs
│ │ ├── gas_metering.rs
│ │ ├── least_squares.rs
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ ├── qemu.rs
│ │ ├── replay/
│ │ │ ├── cache_stats.rs
│ │ │ ├── fold_db_ops.rs
│ │ │ └── gas_charges.rs
│ │ ├── replay.rs
│ │ ├── rocksdb.rs
│ │ ├── snapshots/
│ │ │ ├── runtime_params_estimator__replay__tests__CacheStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__CacheStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__CacheStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__CacheStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkCacheStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkCacheStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkCacheStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkCacheStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkDbStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkDbStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkDbStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ChunkDbStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__GasCharges-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__GasCharges-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__GasCharges-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__GasCharges-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptCacheStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptCacheStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptCacheStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptCacheStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptDbStats-75220100-75220101.s0.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptDbStats-75220100-75220101.s1.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptDbStats-75220100-75220101.s2.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__ReceiptDbStats-75220100-75220101.s3.io_trace.snap
│ │ │ ├── runtime_params_estimator__replay__tests__account_filter_CacheStats.snap
│ │ │ ├── runtime_params_estimator__replay__tests__account_filter_ReceiptCacheStats.snap
│ │ │ └── runtime_params_estimator__replay__tests__account_filter_ReceiptDbStats.snap
│ │ ├── transaction_builder.rs
│ │ ├── trie.rs
│ │ ├── utils.rs
│ │ └── vm_estimator.rs
│ ├── unc-test-contracts/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── contract-for-fuzzing-rs/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── estimator-contract/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ ├── res/
│ │ │ ├── .gitignore
│ │ │ ├── test_contract_ts.wasm
│ │ │ └── unc_evm.wasm
│ │ ├── src/
│ │ │ └── lib.rs
│ │ └── test-contract-rs/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── unc-vm/
│ │ ├── .gitignore
│ │ ├── ATTRIBUTIONS.md
│ │ ├── README.md
│ │ ├── compiler/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── src/
│ │ │ ├── address_map.rs
│ │ │ ├── compiler.rs
│ │ │ ├── error.rs
│ │ │ ├── function.rs
│ │ │ ├── jump_table.rs
│ │ │ ├── lib.rs
│ │ │ ├── module.rs
│ │ │ ├── relocation.rs
│ │ │ ├── section.rs
│ │ │ ├── sourceloc.rs
│ │ │ ├── target.rs
│ │ │ ├── translator/
│ │ │ │ ├── environ.rs
│ │ │ │ ├── error.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── module.rs
│ │ │ │ ├── sections.rs
│ │ │ │ └── state.rs
│ │ │ └── trap.rs
│ │ ├── compiler-singlepass/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── src/
│ │ │ ├── address_map.rs
│ │ │ ├── codegen_x64.rs
│ │ │ ├── compiler.rs
│ │ │ ├── config.rs
│ │ │ ├── emitter_x64.rs
│ │ │ ├── lib.rs
│ │ │ ├── machine.rs
│ │ │ └── x64_decl.rs
│ │ ├── compiler-test-derive/
│ │ │ ├── Cargo.toml
│ │ │ ├── build.rs
│ │ │ └── src/
│ │ │ ├── ignores.rs
│ │ │ └── lib.rs
│ │ ├── engine/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── src/
│ │ │ ├── engine.rs
│ │ │ ├── error.rs
│ │ │ ├── export.rs
│ │ │ ├── lib.rs
│ │ │ ├── resolver.rs
│ │ │ ├── trap/
│ │ │ │ ├── error.rs
│ │ │ │ ├── frame_info.rs
│ │ │ │ └── mod.rs
│ │ │ └── universal/
│ │ │ ├── artifact.rs
│ │ │ ├── builder.rs
│ │ │ ├── code_memory.rs
│ │ │ ├── engine.rs
│ │ │ ├── executable.rs
│ │ │ ├── link.rs
│ │ │ └── mod.rs
│ │ ├── test-api/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ └── src/
│ │ │ ├── lib.rs
│ │ │ └── sys/
│ │ │ ├── env.rs
│ │ │ ├── exports.rs
│ │ │ ├── externals/
│ │ │ │ ├── function.rs
│ │ │ │ ├── global.rs
│ │ │ │ ├── memory.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── table.rs
│ │ │ ├── import_object.rs
│ │ │ ├── instance.rs
│ │ │ ├── mod.rs
│ │ │ ├── module.rs
│ │ │ ├── native.rs
│ │ │ ├── ptr.rs
│ │ │ ├── store.rs
│ │ │ ├── tunables.rs
│ │ │ └── types.rs
│ │ ├── test-generator/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ ├── lib.rs
│ │ │ └── processors.rs
│ │ ├── tests/
│ │ │ ├── compilers/
│ │ │ │ ├── compilation.rs
│ │ │ │ ├── config.rs
│ │ │ │ ├── deterministic.rs
│ │ │ │ ├── imports.rs
│ │ │ │ ├── issues.rs
│ │ │ │ ├── main.rs
│ │ │ │ ├── multi_value_imports.rs
│ │ │ │ ├── native_functions.rs
│ │ │ │ ├── serialize.rs
│ │ │ │ ├── stack_limiter.rs
│ │ │ │ ├── traps.rs
│ │ │ │ └── wast.rs
│ │ │ ├── deprecated/
│ │ │ │ └── README.md
│ │ │ ├── deprecated.rs
│ │ │ ├── examples/
│ │ │ │ ├── add.wat
│ │ │ │ ├── call_indirect.wat
│ │ │ │ ├── fac.wat
│ │ │ │ ├── fib.wat
│ │ │ │ ├── global.wat
│ │ │ │ ├── invalid.wat
│ │ │ │ ├── memory.wat
│ │ │ │ ├── no_start.wat
│ │ │ │ └── trap.wat
│ │ │ ├── ignores.txt
│ │ │ ├── lib/
│ │ │ │ └── compiler-test-derive/
│ │ │ │ └── src/
│ │ │ │ └── lib.rs.orig
│ │ │ └── wast/
│ │ │ ├── README.md
│ │ │ ├── spec/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Contributing.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── address.wast
│ │ │ │ ├── align.wast
│ │ │ │ ├── binary-leb128.wast
│ │ │ │ ├── binary.wast
│ │ │ │ ├── block.wast
│ │ │ │ ├── br.wast
│ │ │ │ ├── br_if.wast
│ │ │ │ ├── br_table.wast
│ │ │ │ ├── bulk.wast
│ │ │ │ ├── call.wast
│ │ │ │ ├── call_indirect.wast
│ │ │ │ ├── comments.wast
│ │ │ │ ├── const.wast
│ │ │ │ ├── conversions.wast
│ │ │ │ ├── custom.wast
│ │ │ │ ├── data.wast
│ │ │ │ ├── elem.wast
│ │ │ │ ├── endianness.wast
│ │ │ │ ├── exports.wast
│ │ │ │ ├── extract-parts.sh
│ │ │ │ ├── f32.wast
│ │ │ │ ├── f32_bitwise.wast
│ │ │ │ ├── f32_cmp.wast
│ │ │ │ ├── f64.wast
│ │ │ │ ├── f64_bitwise.wast
│ │ │ │ ├── f64_cmp.wast
│ │ │ │ ├── fac.wast
│ │ │ │ ├── float_exprs.wast
│ │ │ │ ├── float_literals.wast
│ │ │ │ ├── float_memory.wast
│ │ │ │ ├── float_misc.wast
│ │ │ │ ├── forward.wast
│ │ │ │ ├── func.wast
│ │ │ │ ├── func_ptrs.wast
│ │ │ │ ├── global.wast
│ │ │ │ ├── i32.wast
│ │ │ │ ├── i64.wast
│ │ │ │ ├── if.wast
│ │ │ │ ├── imports.wast
│ │ │ │ ├── inline-module.wast
│ │ │ │ ├── int_exprs.wast
│ │ │ │ ├── int_literals.wast
│ │ │ │ ├── labels.wast
│ │ │ │ ├── left-to-right.wast
│ │ │ │ ├── linking.wast
│ │ │ │ ├── load.wast
│ │ │ │ ├── local_get.wast
│ │ │ │ ├── local_set.wast
│ │ │ │ ├── local_tee.wast
│ │ │ │ ├── loop.wast
│ │ │ │ ├── memory.wast
│ │ │ │ ├── memory_copy.wast
│ │ │ │ ├── memory_fill.wast
│ │ │ │ ├── memory_grow.wast
│ │ │ │ ├── memory_init.wast
│ │ │ │ ├── memory_redundancy.wast
│ │ │ │ ├── memory_size.wast
│ │ │ │ ├── memory_trap.wast
│ │ │ │ ├── names.wast
│ │ │ │ ├── nop.wast
│ │ │ │ ├── proposals/
│ │ │ │ │ ├── annotations/
│ │ │ │ │ │ └── annotations.wast
│ │ │ │ │ ├── bulk-memory-operations/
│ │ │ │ │ │ ├── binary.wast
│ │ │ │ │ │ ├── bulk.wast
│ │ │ │ │ │ ├── custom.wast
│ │ │ │ │ │ ├── data.wast
│ │ │ │ │ │ ├── elem.wast
│ │ │ │ │ │ ├── imports.wast
│ │ │ │ │ │ ├── linking.wast
│ │ │ │ │ │ ├── memory_copy.wast
│ │ │ │ │ │ ├── memory_fill.wast
│ │ │ │ │ │ ├── memory_init.wast
│ │ │ │ │ │ ├── table_copy.wast
│ │ │ │ │ │ └── table_init.wast
│ │ │ │ │ ├── gc/
│ │ │ │ │ │ ├── array.wast
│ │ │ │ │ │ ├── binary.wast
│ │ │ │ │ │ ├── br_on.wast
│ │ │ │ │ │ ├── br_on_cast.wast
│ │ │ │ │ │ ├── br_on_null.wast
│ │ │ │ │ │ ├── br_table.wast
│ │ │ │ │ │ ├── call_ref.wast
│ │ │ │ │ │ ├── func.wast
│ │ │ │ │ │ ├── func_bind.wast
│ │ │ │ │ │ ├── i31.wast
│ │ │ │ │ │ ├── if.wast
│ │ │ │ │ │ ├── let.wast
│ │ │ │ │ │ ├── linking.wast
│ │ │ │ │ │ ├── ref.wast
│ │ │ │ │ │ ├── ref_as.wast
│ │ │ │ │ │ ├── ref_as_non_null.wast
│ │ │ │ │ │ ├── ref_cast.wast
│ │ │ │ │ │ ├── ref_eq.wast
│ │ │ │ │ │ ├── ref_is.wast
│ │ │ │ │ │ ├── ref_is_null.wast
│ │ │ │ │ │ ├── ref_null.wast
│ │ │ │ │ │ ├── ref_test.wast
│ │ │ │ │ │ ├── return_call_ref.wast
│ │ │ │ │ │ ├── select.wast
│ │ │ │ │ │ ├── struct.wast
│ │ │ │ │ │ ├── table-sub.wast
│ │ │ │ │ │ ├── table.wast
│ │ │ │ │ │ ├── type-equivalence.wast
│ │ │ │ │ │ └── unreached-invalid.wast
│ │ │ │ │ ├── multi-value/
│ │ │ │ │ │ ├── binary.wast
│ │ │ │ │ │ ├── block.wast
│ │ │ │ │ │ ├── br.wast
│ │ │ │ │ │ ├── call.wast
│ │ │ │ │ │ ├── call_indirect.wast
│ │ │ │ │ │ ├── fac.wast
│ │ │ │ │ │ ├── func.wast
│ │ │ │ │ │ ├── if.wast
│ │ │ │ │ │ ├── loop.wast
│ │ │ │ │ │ └── type.wast
│ │ │ │ │ ├── mutable-global/
│ │ │ │ │ │ ├── globals.wast
│ │ │ │ │ │ └── linking.wast
│ │ │ │ │ ├── nontrapping-float-to-int-conversions/
│ │ │ │ │ │ └── conversions.wast
│ │ │ │ │ ├── reference-types/
│ │ │ │ │ │ ├── binary.wast
│ │ │ │ │ │ ├── br_table.wast
│ │ │ │ │ │ ├── bulk.wast
│ │ │ │ │ │ ├── custom.wast
│ │ │ │ │ │ ├── data.wast
│ │ │ │ │ │ ├── elem.wast
│ │ │ │ │ │ ├── exports.wast
│ │ │ │ │ │ ├── globals.wast
│ │ │ │ │ │ ├── imports.wast
│ │ │ │ │ │ ├── linking.wast
│ │ │ │ │ │ ├── memory_copy.wast
│ │ │ │ │ │ ├── memory_fill.wast
│ │ │ │ │ │ ├── memory_grow.wast
│ │ │ │ │ │ ├── memory_init.wast
│ │ │ │ │ │ ├── ref_func.wast
│ │ │ │ │ │ ├── ref_is_null.wast
│ │ │ │ │ │ ├── ref_null.wast
│ │ │ │ │ │ ├── select.wast
│ │ │ │ │ │ ├── table-sub.wast
│ │ │ │ │ │ ├── table_copy.wast
│ │ │ │ │ │ ├── table_fill.wast
│ │ │ │ │ │ ├── table_get.wast
│ │ │ │ │ │ ├── table_grow.wast
│ │ │ │ │ │ ├── table_init.wast
│ │ │ │ │ │ ├── table_set.wast
│ │ │ │ │ │ ├── table_size.wast
│ │ │ │ │ │ └── unreached-invalid.wast
│ │ │ │ │ ├── sign-extension-ops/
│ │ │ │ │ │ ├── i32.wast
│ │ │ │ │ │ └── i64.wast
│ │ │ │ │ ├── simd/
│ │ │ │ │ │ ├── simd_address.wast
│ │ │ │ │ │ ├── simd_align.wast
│ │ │ │ │ │ ├── simd_bit_shift.wast
│ │ │ │ │ │ ├── simd_bitwise.wast
│ │ │ │ │ │ ├── simd_boolean.wast
│ │ │ │ │ │ ├── simd_const.wast
│ │ │ │ │ │ ├── simd_conversions.wast
│ │ │ │ │ │ ├── simd_f32x4.wast
│ │ │ │ │ │ ├── simd_f32x4_arith.wast
│ │ │ │ │ │ ├── simd_f32x4_cmp.wast
│ │ │ │ │ │ ├── simd_f32x4_pmin_pmax.wast
│ │ │ │ │ │ ├── simd_f32x4_rounding.wast
│ │ │ │ │ │ ├── simd_f64x2.wast
│ │ │ │ │ │ ├── simd_f64x2_arith.wast
│ │ │ │ │ │ ├── simd_f64x2_cmp.wast
│ │ │ │ │ │ ├── simd_f64x2_pmin_pmax.wast
│ │ │ │ │ │ ├── simd_f64x2_rounding.wast
│ │ │ │ │ │ ├── simd_i16x8_arith.wast
│ │ │ │ │ │ ├── simd_i16x8_arith2.wast
│ │ │ │ │ │ ├── simd_i16x8_cmp.wast
│ │ │ │ │ │ ├── simd_i16x8_extadd_pairwise_i8x16.wast
│ │ │ │ │ │ ├── simd_i16x8_extmul_i8x16.wast
│ │ │ │ │ │ ├── simd_i16x8_q15mulr_sat_s.wast
│ │ │ │ │ │ ├── simd_i16x8_sat_arith.wast
│ │ │ │ │ │ ├── simd_i32x4_arith.wast
│ │ │ │ │ │ ├── simd_i32x4_arith2.wast
│ │ │ │ │ │ ├── simd_i32x4_cmp.wast
│ │ │ │ │ │ ├── simd_i32x4_dot_i16x8.wast
│ │ │ │ │ │ ├── simd_i32x4_extadd_pairwise_i16x8.wast
│ │ │ │ │ │ ├── simd_i32x4_extmul_i16x8.wast
│ │ │ │ │ │ ├── simd_i32x4_trunc_sat_f32x4.wast
│ │ │ │ │ │ ├── simd_i32x4_trunc_sat_f64x2.wast
│ │ │ │ │ │ ├── simd_i64x2_arith.wast
│ │ │ │ │ │ ├── simd_i64x2_arith2.wast
│ │ │ │ │ │ ├── simd_i64x2_cmp.wast
│ │ │ │ │ │ ├── simd_i64x2_extmul_i32x4.wast
│ │ │ │ │ │ ├── simd_i8x16_arith.wast
│ │ │ │ │ │ ├── simd_i8x16_arith2.wast
│ │ │ │ │ │ ├── simd_i8x16_cmp.wast
│ │ │ │ │ │ ├── simd_i8x16_sat_arith.wast
│ │ │ │ │ │ ├── simd_int_to_int_extend.wast
│ │ │ │ │ │ ├── simd_lane.wast
│ │ │ │ │ │ ├── simd_load.wast
│ │ │ │ │ │ ├── simd_load16_lane.wast
│ │ │ │ │ │ ├── simd_load32_lane.wast
│ │ │ │ │ │ ├── simd_load64_lane.wast
│ │ │ │ │ │ ├── simd_load8_lane.wast
│ │ │ │ │ │ ├── simd_load_extend.wast
│ │ │ │ │ │ ├── simd_load_splat.wast
│ │ │ │ │ │ ├── simd_load_zero.wast
│ │ │ │ │ │ ├── simd_splat.wast
│ │ │ │ │ │ ├── simd_store.wast
│ │ │ │ │ │ ├── simd_store16_lane.wast
│ │ │ │ │ │ ├── simd_store32_lane.wast
│ │ │ │ │ │ ├── simd_store64_lane.wast
│ │ │ │ │ │ └── simd_store8_lane.wast
│ │ │ │ │ ├── tail-call/
│ │ │ │ │ │ ├── return_call.wast
│ │ │ │ │ │ └── return_call_indirect.wast
│ │ │ │ │ └── threads/
│ │ │ │ │ ├── atomic.wast
│ │ │ │ │ ├── exports.wast
│ │ │ │ │ ├── imports.wast
│ │ │ │ │ └── memory.wast
│ │ │ │ ├── ref_func.wast
│ │ │ │ ├── ref_is_null.wast
│ │ │ │ ├── ref_null.wast
│ │ │ │ ├── return.wast
│ │ │ │ ├── select.wast
│ │ │ │ ├── skip-stack-guard-page.wast
│ │ │ │ ├── stack.wast
│ │ │ │ ├── start.wast
│ │ │ │ ├── store.wast
│ │ │ │ ├── switch.wast
│ │ │ │ ├── table-sub.wast
│ │ │ │ ├── table.wast
│ │ │ │ ├── table_copy.wast
│ │ │ │ ├── table_fill.wast
│ │ │ │ ├── table_get.wast
│ │ │ │ ├── table_grow.wast
│ │ │ │ ├── table_init.wast
│ │ │ │ ├── table_set.wast
│ │ │ │ ├── table_size.wast
│ │ │ │ ├── token.wast
│ │ │ │ ├── traps.wast
│ │ │ │ ├── type.wast
│ │ │ │ ├── unreachable.wast
│ │ │ │ ├── unreached-invalid.wast
│ │ │ │ ├── unwind.wast
│ │ │ │ ├── update-testsuite.sh
│ │ │ │ ├── utf8-custom-section-id.wast
│ │ │ │ ├── utf8-import-field.wast
│ │ │ │ ├── utf8-import-module.wast
│ │ │ │ └── utf8-invalid-encoding.wast
│ │ │ └── wasmer/
│ │ │ ├── README.md
│ │ │ ├── call-indirect-spilled-stack.wast
│ │ │ ├── fac.wast
│ │ │ ├── int-extend-garbage.wast
│ │ │ ├── max_locals.wast
│ │ │ ├── max_size_of_memory.wast
│ │ │ ├── multiple-traps.wast
│ │ │ ├── nan-canonicalization-issue-2159.wast
│ │ │ ├── nan-canonicalization-issue-2347.wast
│ │ │ ├── nan-canonicalization.wast
│ │ │ ├── rotate-shift-overflow.wast
│ │ │ ├── stack-overflow-sret.wast
│ │ │ └── stack-overflow.wast
│ │ ├── types/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── src/
│ │ │ │ ├── archives.rs
│ │ │ │ ├── entity/
│ │ │ │ │ ├── boxed_slice.rs
│ │ │ │ │ ├── iter.rs
│ │ │ │ │ ├── keys.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ ├── packed_option.rs
│ │ │ │ │ ├── primary_map.rs
│ │ │ │ │ └── secondary_map.rs
│ │ │ │ ├── extern_ref.rs
│ │ │ │ ├── features.rs
│ │ │ │ ├── indexes.rs
│ │ │ │ ├── initializers.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── memory_view.rs
│ │ │ │ ├── module.rs
│ │ │ │ ├── native.rs
│ │ │ │ ├── partial_sum_map.rs
│ │ │ │ ├── types.rs
│ │ │ │ ├── units.rs
│ │ │ │ └── values.rs
│ │ │ └── tests/
│ │ │ └── partial-sum-map/
│ │ │ ├── corpus/
│ │ │ │ └── .gitkeep
│ │ │ ├── crashes/
│ │ │ │ └── .gitkeep
│ │ │ └── main.rs
│ │ ├── vm/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ └── src/
│ │ │ ├── artifact.rs
│ │ │ ├── export.rs
│ │ │ ├── func_data_registry.rs
│ │ │ ├── global.rs
│ │ │ ├── imports.rs
│ │ │ ├── instance/
│ │ │ │ ├── allocator.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── ref.rs
│ │ │ ├── lib.rs
│ │ │ ├── libcalls.rs
│ │ │ ├── memory.rs
│ │ │ ├── mmap.rs
│ │ │ ├── probestack.rs
│ │ │ ├── resolver.rs
│ │ │ ├── sig_registry.rs
│ │ │ ├── table.rs
│ │ │ ├── trap/
│ │ │ │ ├── handlers.c
│ │ │ │ ├── mod.rs
│ │ │ │ ├── trapcode.rs
│ │ │ │ └── traphandlers.rs
│ │ │ ├── tunables.rs
│ │ │ ├── vmcontext.rs
│ │ │ └── vmoffsets.rs
│ │ └── wast/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── error.rs
│ │ ├── lib.rs
│ │ ├── spectest.rs
│ │ └── wast.rs
│ ├── unc-vm-runner/
│ │ ├── Cargo.toml
│ │ ├── FAQ.md
│ │ ├── README.md
│ │ ├── RUNTIMES.md
│ │ ├── fuzz/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── fuzz_targets/
│ │ │ │ ├── diffrunner.rs
│ │ │ │ └── runner.rs
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ └── src/
│ │ ├── cache.rs
│ │ ├── code.rs
│ │ ├── errors.rs
│ │ ├── features.rs
│ │ ├── imports.rs
│ │ ├── instrument/
│ │ │ ├── gas/
│ │ │ │ ├── mod.rs
│ │ │ │ └── validation.rs
│ │ │ ├── rules.rs
│ │ │ └── stack_height/
│ │ │ ├── max_height.rs
│ │ │ ├── mod.rs
│ │ │ └── thunk.rs
│ │ ├── instrument.rs
│ │ ├── lib.rs
│ │ ├── logic/
│ │ │ ├── alt_bn128.rs
│ │ │ ├── context.rs
│ │ │ ├── dependencies.rs
│ │ │ ├── errors.rs
│ │ │ ├── gas_counter.rs
│ │ │ ├── logic.rs
│ │ │ ├── mocks/
│ │ │ │ ├── mock_external.rs
│ │ │ │ ├── mock_memory.rs
│ │ │ │ └── mod.rs
│ │ │ ├── mod.rs
│ │ │ ├── test_utils.rs
│ │ │ ├── tests/
│ │ │ │ ├── alt_bn128.rs
│ │ │ │ ├── context.rs
│ │ │ │ ├── ecrecover-tests.json
│ │ │ │ ├── ed25519_verify.rs
│ │ │ │ ├── gas_counter.rs
│ │ │ │ ├── helpers.rs
│ │ │ │ ├── iterators.rs
│ │ │ │ ├── logs.rs
│ │ │ │ ├── miscs.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── promises.rs
│ │ │ │ ├── registers.rs
│ │ │ │ ├── storage_read_write.rs
│ │ │ │ ├── storage_usage.rs
│ │ │ │ ├── view_method.rs
│ │ │ │ └── vm_logic_builder.rs
│ │ │ ├── types.rs
│ │ │ ├── utils.rs
│ │ │ └── vmstate.rs
│ │ ├── memory.rs
│ │ ├── prepare/
│ │ │ ├── prepare_v0.rs
│ │ │ ├── prepare_v1.rs
│ │ │ └── prepare_v2.rs
│ │ ├── prepare.rs
│ │ ├── profile/
│ │ │ └── profile_v2.rs
│ │ ├── profile.rs
│ │ ├── runner.rs
│ │ ├── tests/
│ │ │ ├── cache.rs
│ │ │ ├── compile_errors.rs
│ │ │ ├── fuzzers.rs
│ │ │ ├── regression_tests.rs
│ │ │ ├── rs_contract.rs
│ │ │ ├── runtime_errors.rs
│ │ │ ├── test_builder.rs
│ │ │ ├── ts_contract.rs
│ │ │ └── wasm_validation.rs
│ │ ├── tests.rs
│ │ ├── unc_vm_runner.rs
│ │ ├── utils.rs
│ │ ├── wasmer2_runner.rs
│ │ ├── wasmer_runner.rs
│ │ └── wasmtime_runner.rs
│ └── unc-wallet-contract/
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── res/
│ │ └── .gitignore
│ ├── src/
│ │ └── lib.rs
│ └── wallet-contract/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── rust-toolchain.toml
├── rustfmt.toml
├── scripts/
│ ├── __init__.py
│ ├── binaries/
│ │ ├── build.sh
│ │ ├── build_all.sh
│ │ └── x86_64/
│ │ ├── arch.Dockerfile
│ │ ├── debian-11.Dockerfile
│ │ ├── debian-12.Dockerfile
│ │ ├── shared.dockerignore
│ │ ├── ubuntu-2004.Dockerfile
│ │ ├── ubuntu-2204.Dockerfile
│ │ └── ubuntu-2404.Dockerfile
│ ├── check_nightly.py
│ ├── check_pytests.py
│ ├── coverage-wrapper-rustc
│ ├── fix_nightly_feature_flags.py
│ ├── flaky_test_check.py
│ ├── formatting
│ ├── install_precommit.sh
│ ├── parallel_coverage.py
│ ├── requirements_check.sh
│ ├── run_docker.sh
│ ├── setup_hooks.sh
│ ├── split_storage_migration.sh
│ ├── state/
│ │ ├── mega-migrate.py
│ │ ├── split-genesis.py
│ │ └── update_res.py
│ └── testlib.py
├── test-utils/
│ ├── actix-test-utils/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── logger/
│ │ └── Cargo.toml
│ ├── runtime-tester/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── fuzz/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ └── fuzz_targets_disabled/
│ │ │ └── runtime_fuzzer.rs
│ │ └── src/
│ │ ├── fuzzing.rs
│ │ ├── lib.rs
│ │ ├── run_test.rs
│ │ └── scenario_builder.rs
│ ├── store-validator/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ └── testlib/
│ ├── Cargo.toml
│ └── src/
│ ├── fees_utils.rs
│ ├── lib.rs
│ ├── process_blocks.rs
│ └── runtime_utils.rs
├── tools/
│ ├── amend-genesis/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ └── lib.rs
│ ├── chainsync-loadtest/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── concurrency/
│ │ │ ├── mod.rs
│ │ │ ├── once.rs
│ │ │ ├── rate_limiter.rs
│ │ │ └── weak_map.rs
│ │ ├── fetch_chain.rs
│ │ ├── main.rs
│ │ └── network.rs
│ ├── cold-store/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── cli.rs
│ │ └── lib.rs
│ ├── crates-publish-checker/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── main.rs
│ │ ├── rules.rs
│ │ ├── style.rs
│ │ ├── types.rs
│ │ └── utils.rs
│ ├── database/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── adjust_database.rs
│ │ ├── analyse_data_size_distribution.rs
│ │ ├── analyse_gas_usage.rs
│ │ ├── block_iterators/
│ │ │ ├── height_range.rs
│ │ │ ├── last_blocks.rs
│ │ │ └── mod.rs
│ │ ├── commands.rs
│ │ ├── compact.rs
│ │ ├── corrupt.rs
│ │ ├── lib.rs
│ │ ├── make_snapshot.rs
│ │ ├── memtrie.rs
│ │ ├── run_migrations.rs
│ │ ├── state_perf.rs
│ │ └── utils.rs
│ ├── debug-ui/
│ │ ├── .dockerignore
│ │ ├── .eslintrc.yml
│ │ ├── .gitignore
│ │ ├── .prettierrc.json
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── nginx.conf
│ │ ├── package.json
│ │ ├── public/
│ │ │ └── index.html
│ │ ├── src/
│ │ │ ├── App.scss
│ │ │ ├── App.tsx
│ │ │ ├── BlocksView.scss
│ │ │ ├── BlocksView.tsx
│ │ │ ├── ChainAndChunkInfoView.scss
│ │ │ ├── ChainAndChunkInfoView.tsx
│ │ │ ├── ChainInfoSummaryView.scss
│ │ │ ├── ChainInfoSummaryView.tsx
│ │ │ ├── ClusterNodeView.scss
│ │ │ ├── ClusterNodeView.tsx
│ │ │ ├── ClusterView.scss
│ │ │ ├── ClusterView.tsx
│ │ │ ├── ConnectionStorageView.scss
│ │ │ ├── ConnectionStorageView.tsx
│ │ │ ├── CurrentPeersView.scss
│ │ │ ├── CurrentPeersView.tsx
│ │ │ ├── EpochInfoView.scss
│ │ │ ├── EpochInfoView.tsx
│ │ │ ├── EpochShardsView.scss
│ │ │ ├── EpochShardsView.tsx
│ │ │ ├── EpochValidatorsView.scss
│ │ │ ├── EpochValidatorsView.tsx
│ │ │ ├── FloatingChunksView.scss
│ │ │ ├── FloatingChunksView.tsx
│ │ │ ├── HeaderBar.scss
│ │ │ ├── HeaderBar.tsx
│ │ │ ├── LandingPage.scss
│ │ │ ├── LandingPage.tsx
│ │ │ ├── LatestBlocksView.scss
│ │ │ ├── LatestBlocksView.tsx
│ │ │ ├── LogFileDrop.tsx
│ │ │ ├── NetworkInfoView.scss
│ │ │ ├── NetworkInfoView.tsx
│ │ │ ├── PeerStorageView.scss
│ │ │ ├── PeerStorageView.tsx
│ │ │ ├── RecentEpochsView.scss
│ │ │ ├── RecentEpochsView.tsx
│ │ │ ├── RoutingTableView.scss
│ │ │ ├── RoutingTableView.tsx
│ │ │ ├── SnapshotHostsView.scss
│ │ │ ├── SnapshotHostsView.tsx
│ │ │ ├── Tier1View.scss
│ │ │ ├── Tier1View.tsx
│ │ │ ├── api.tsx
│ │ │ ├── entity_debug/
│ │ │ │ ├── AllQueriesDisplay.scss
│ │ │ │ ├── AllQueriesDisplay.tsx
│ │ │ │ ├── EntityDataRootView.scss
│ │ │ │ ├── EntityDataRootView.tsx
│ │ │ │ ├── EntityDataValueView.scss
│ │ │ │ ├── EntityDataValueView.tsx
│ │ │ │ ├── EntityDebugView.scss
│ │ │ │ ├── EntityDebugView.tsx
│ │ │ │ ├── EntityQueryComposer.scss
│ │ │ │ ├── EntityQueryComposer.tsx
│ │ │ │ ├── KeyInput.scss
│ │ │ │ ├── KeyInput.tsx
│ │ │ │ ├── PinnedKeysView.scss
│ │ │ │ ├── PinnedKeysView.tsx
│ │ │ │ ├── all_queries.tsx
│ │ │ │ ├── composing_query.tsx
│ │ │ │ ├── fetcher.tsx
│ │ │ │ ├── fields.tsx
│ │ │ │ ├── keys.tsx
│ │ │ │ ├── pinned_keys.tsx
│ │ │ │ └── types.tsx
│ │ │ ├── index.css
│ │ │ ├── index.tsx
│ │ │ ├── log_visualizer/
│ │ │ │ ├── LogVisualizer.scss
│ │ │ │ ├── LogVisualizer.tsx
│ │ │ │ ├── arrows.ts
│ │ │ │ ├── events.ts
│ │ │ │ ├── interval.ts
│ │ │ │ └── layout.ts
│ │ │ ├── pretty-print.ts
│ │ │ ├── react-app-env.d.ts
│ │ │ └── utils.tsx
│ │ └── tsconfig.json
│ ├── epoch-sync/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ └── lib.rs
│ ├── flat-storage/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── commands.rs
│ │ └── lib.rs
│ ├── fork-network/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ ├── lib.rs
│ │ ├── single_shard_storage_mutator.rs
│ │ └── storage_mutator.rs
│ ├── indexer/
│ │ └── example/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── configs.rs
│ │ └── main.rs
│ ├── mirror/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── chain_tracker.rs
│ │ ├── cli.rs
│ │ ├── genesis.rs
│ │ ├── key_mapping.rs
│ │ ├── lib.rs
│ │ ├── metrics.rs
│ │ ├── offline.rs
│ │ ├── online.rs
│ │ └── secret.rs
│ ├── mock-node/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ └── setup.rs
│ ├── ping/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ ├── csv.rs
│ │ ├── lib.rs
│ │ └── metrics.rs
│ ├── re-pledged/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── rpctypegen/
│ │ ├── core/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── lib.rs
│ │ └── macro/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── lib.rs
│ ├── speedy_sync/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── state-parts/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ └── lib.rs
│ ├── state-parts-dump-check/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── cli.rs
│ │ ├── lib.rs
│ │ └── metrics.rs
│ ├── state-viewer/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── apply_chain_range.rs
│ │ ├── apply_chunk.rs
│ │ ├── cli.rs
│ │ ├── commands.rs
│ │ ├── contract_accounts.rs
│ │ ├── epoch_info.rs
│ │ ├── lib.rs
│ │ ├── rocksdb_stats.rs
│ │ ├── scan_db.rs
│ │ ├── state_changes.rs
│ │ ├── state_dump.rs
│ │ ├── state_parts.rs
│ │ ├── trie_iteration_benchmark.rs
│ │ └── tx_dump.rs
│ ├── storage-usage-delta-calculator/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ └── undo-block/
│ ├── Cargo.toml
│ └── src/
│ ├── cli.rs
│ └── lib.rs
└── utils/
├── config/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── fmt/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── lib.rs
├── mainnet-res/
│ ├── Cargo.toml
│ ├── README.md
│ ├── res/
│ │ ├── mainnet_genesis.json
│ │ ├── mainnet_restored_receipts.json
│ │ └── storage_usage_delta.json
│ ├── src/
│ │ └── lib.rs
│ └── tests/
│ └── load_genesis.rs
├── stdx/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── unc-cache/
│ ├── Cargo.toml
│ ├── README.md
│ ├── benches/
│ │ └── cache.rs
│ └── src/
│ ├── cell.rs
│ ├── lib.rs
│ └── sync.rs
├── unc-performance-metrics/
│ ├── Cargo.toml
│ └── src/
│ ├── actix_disabled.rs
│ ├── actix_enabled.rs
│ ├── lib.rs
│ ├── process.rs
│ ├── stats_disabled.rs
│ └── stats_enabled.rs
├── unc-performance-metrics-macros/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
└── unc-stable-hasher/
├── Cargo.toml
├── README.md
└── src/
└── lib.rs
Showing preview only (1,357K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (15643 symbols across 945 files)
FILE: chain/chain-primitives/src/error.rs
type QueryError (line 15) | pub enum QueryError {
type Error (line 69) | pub enum Error {
method is_bad_data (line 259) | pub fn is_bad_data(&self) -> bool {
method is_error (line 321) | pub fn is_error(&self) -> bool {
method prometheus_label_value (line 333) | pub fn prometheus_label_value(&self) -> &'static str {
method from (line 397) | fn from(error: EpochError) -> Self {
method from (line 408) | fn from(error: BlockError) -> Self {
method from (line 426) | fn from(error: ShardLayoutError) -> Self {
method from (line 434) | fn from(error: BlockValidityError) -> Self {
type LogTransientStorageError (line 245) | pub trait LogTransientStorageError {
method log_storage_error (line 246) | fn log_storage_error(self, message: &str) -> Self;
method log_storage_error (line 250) | fn log_storage_error(self, message: &str) -> Self {
type EpochErrorResultToChainError (line 415) | pub trait EpochErrorResultToChainError<T> {
method into_chain_error (line 416) | fn into_chain_error(self) -> Result<T, Error>;
function into_chain_error (line 420) | fn into_chain_error(self: Result<T, EpochError>) -> Result<T, Error> {
type BlockKnownError (line 447) | pub enum BlockKnownError {
type EpochSyncInfoError (line 467) | pub enum EpochSyncInfoError {
FILE: chain/chain/src/block_processing_utils.rs
constant MAX_PROCESSING_BLOCKS (line 17) | pub(crate) const MAX_PROCESSING_BLOCKS: usize = 5;
type BlockPreprocessInfo (line 20) | pub(crate) struct BlockPreprocessInfo {
type BlocksInProcessing (line 36) | pub(crate) struct BlocksInProcessing {
method new (line 82) | pub(crate) fn new() -> Self {
method len (line 86) | pub(crate) fn len(&self) -> usize {
method add (line 92) | pub(crate) fn add(
method contains (line 103) | pub(crate) fn contains(&self, block_hash: &CryptoHash) -> bool {
method remove (line 107) | pub(crate) fn remove(
method add_dry_run (line 115) | pub(crate) fn add_dry_run(&self, block_hash: &CryptoHash) -> Result<()...
method has_blocks_to_catch_up (line 129) | pub(crate) fn has_blocks_to_catch_up(&self, prev_hash: &CryptoHash) ->...
method wait_for_all_blocks (line 137) | pub(crate) fn wait_for_all_blocks(&self) -> bool {
method wait_for_block (line 145) | pub(crate) fn wait_for_block(
type AddError (line 42) | pub(crate) enum AddError {
function from (line 48) | fn from(err: AddError) -> Self {
type BlockProcessingArtifact (line 64) | pub struct BlockProcessingArtifact {
type DoneApplyChunkCallback (line 76) | pub type DoneApplyChunkCallback = Arc<dyn Fn(CryptoHash) -> () + Send + ...
type BlockNotInPoolError (line 79) | pub struct BlockNotInPoolError;
FILE: chain/chain/src/blocks_delay_tracker.rs
constant BLOCK_DELAY_TRACKING_COUNT (line 19) | const BLOCK_DELAY_TRACKING_COUNT: u64 = 50;
type BlocksDelayTracker (line 29) | pub struct BlocksDelayTracker {
method mark_block_received (line 135) | pub fn mark_block_received(
method mark_block_dropped (line 177) | pub fn mark_block_dropped(&mut self, block_hash: &CryptoHash, reason: ...
method mark_block_errored (line 185) | pub fn mark_block_errored(&mut self, block_hash: &CryptoHash, err: Str...
method mark_block_orphaned (line 193) | pub fn mark_block_orphaned(&mut self, block_hash: &CryptoHash, timesta...
method mark_block_unorphaned (line 201) | pub fn mark_block_unorphaned(&mut self, block_hash: &CryptoHash, times...
method mark_block_has_missing_chunks (line 209) | pub fn mark_block_has_missing_chunks(&mut self, block_hash: &CryptoHas...
method mark_block_completed_missing_chunks (line 217) | pub fn mark_block_completed_missing_chunks(
method mark_chunk_completed (line 229) | pub fn mark_chunk_completed(
method mark_chunk_requested (line 245) | pub fn mark_chunk_requested(
method update_head (line 261) | fn update_head(&mut self, head_height: BlockHeight) {
method finish_block_processing (line 299) | pub fn finish_block_processing(&mut self, block_hash: &CryptoHash, new...
method update_block_metrics (line 320) | fn update_block_metrics(&self, block: &BlockTrackingStats) {
method update_chunk_metrics (line 339) | fn update_chunk_metrics(&self, chunk: &ChunkTrackingStats, shard_id: S...
method get_block_processing_info (line 351) | fn get_block_processing_info(
type BlockTrackingStats (line 45) | pub struct BlockTrackingStats {
type ChunkTrackingStats (line 71) | pub struct ChunkTrackingStats {
method new (line 82) | fn new(chunk_header: &ShardChunkHeader) -> Self {
method to_chunk_processing_info (line 92) | fn to_chunk_processing_info(
method get_block_status (line 414) | fn get_block_status(
method get_chain_processing_info (line 440) | pub fn get_chain_processing_info(&self) -> ChainProcessingInfo {
FILE: chain/chain/src/chain.rs
constant INVALID_CHUNKS_POOL_SIZE (line 105) | pub const INVALID_CHUNKS_POOL_SIZE: usize = 5000;
constant ACCEPTABLE_TIME_DIFFERENCE (line 109) | const ACCEPTABLE_TIME_DIFFERENCE: i64 = 60 * 60 * 24 * 365 * 10000;
constant NUM_PARENTS_TO_CHECK_FINALITY (line 112) | const NUM_PARENTS_TO_CHECK_FINALITY: usize = 20;
constant ACCEPTABLE_TIME_DIFFERENCE (line 116) | const ACCEPTABLE_TIME_DIFFERENCE: i64 = 12 * 10;
constant UNC_BASE (line 119) | const UNC_BASE: Balance = 1_000_000_000_000_000_000_000_000;
type ApplyChunksMode (line 127) | enum ApplyChunksMode {
type BlockMissingChunks (line 134) | pub struct BlockMissingChunks {
method fmt (line 141) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
function check_header_known (line 153) | pub fn check_header_known(
function check_known_store (line 171) | fn check_known_store(
function check_known (line 188) | pub fn check_known(
type BlockApplyChunksResult (line 214) | type BlockApplyChunksResult = (CryptoHash, Vec<(ShardId, Result<ShardUpd...
type Chain (line 218) | pub struct Chain {
method make_genesis_block (line 300) | pub fn make_genesis_block(
method new_for_view_client (line 330) | pub fn new_for_view_client(
method new (line 375) | pub fn new(
method adv_disable_doomslug (line 556) | pub fn adv_disable_doomslug(&mut self) {
method compute_bp_hash (line 560) | pub fn compute_bp_hash(
method get_last_time_head_updated (line 577) | pub fn get_last_time_head_updated(&self) -> Instant {
method create_light_client_block (line 586) | pub fn create_light_client_block(
method save_block (line 617) | pub fn save_block(&mut self, block: MaybeValidated<Block>) -> Result<(...
method save_block_height_processed (line 631) | fn save_block_height_processed(&mut self, block_height: BlockHeight) -...
method maybe_mark_block_invalid (line 640) | fn maybe_mark_block_invalid(&mut self, block_hash: CryptoHash, error: ...
method get_state_sync_info (line 654) | fn get_state_sync_info(
method validate_block (line 707) | pub fn validate_block(&self, block: &MaybeValidated<Block>) -> Result<...
method validate_block_impl (line 716) | fn validate_block_impl(
method partial_verify_orphan_header_signature (line 756) | fn partial_verify_orphan_header_signature(&self, header: &BlockHeader)...
method check_if_finalizable (line 775) | fn check_if_finalizable(&self, header: &BlockHeader) -> Result<(), Err...
method validate_header (line 806) | fn validate_header(
method process_block_header (line 983) | pub fn process_block_header(
method verify_block_hash_and_signature (line 1000) | pub fn verify_block_hash_and_signature(
method verify_challenges (line 1048) | pub fn verify_challenges(
method validate_chunk_headers (line 1094) | fn validate_chunk_headers(&self, block: &Block, prev_block: &Block) ->...
method check_if_challenged_block_on_chain (line 1162) | fn check_if_challenged_block_on_chain(&self, block_header: &BlockHeade...
method ping_missing_chunks (line 1185) | pub fn ping_missing_chunks(
method care_about_any_shard_or_part (line 1240) | fn care_about_any_shard_or_part(
method collect_incoming_receipts_from_block (line 1273) | pub fn collect_incoming_receipts_from_block(
method start_process_block_async (line 1320) | pub fn start_process_block_async(
method postprocess_ready_blocks (line 1364) | pub fn postprocess_ready_blocks(
method process_challenge (line 1394) | pub fn process_challenge(&mut self, challenge: &Challenge) {
method sync_block_headers (line 1416) | pub fn sync_block_headers(
method is_on_current_chain (line 1492) | fn is_on_current_chain(&self, header: &BlockHeader) -> Result<bool, Er...
method find_common_header (line 1498) | pub fn find_common_header(&self, hashes: &[CryptoHash]) -> Option<Bloc...
method determine_status (line 1511) | fn determine_status(&self, head: Option<Tip>, prev_head: Tip) -> Block...
method reset_heads_post_state_sync (line 1535) | pub fn reset_heads_post_state_sync(
method start_process_block_impl (line 1571) | fn start_process_block_impl(
method schedule_apply_chunks (line 1710) | fn schedule_apply_chunks(
method postprocess_block_only (line 1740) | fn postprocess_block_only(
method postprocess_block (line 1757) | fn postprocess_block(
method garbage_collect_memtrie_roots (line 1889) | fn garbage_collect_memtrie_roots(&self, block: &Block, shard_uid: Shar...
method preprocess_block (line 1903) | pub(crate) fn preprocess_block(
method get_catchup_and_state_sync_infos (line 2077) | fn get_catchup_and_state_sync_infos(
method prev_block_is_caught_up (line 2104) | pub fn prev_block_is_caught_up(
method get_shards_to_state_sync (line 2124) | fn get_shards_to_state_sync(
method should_catch_up_shard (line 2145) | fn should_catch_up_shard(
method check_blocks_with_missing_chunks (line 2176) | pub fn check_blocks_with_missing_chunks(
method get_outgoing_receipts_for_shard (line 2210) | pub fn get_outgoing_receipts_for_shard(
method compute_state_response_header (line 2225) | pub fn compute_state_response_header(
method get_state_response_header (line 2393) | pub fn get_state_response_header(
method get_state_response_part (line 2414) | pub fn get_state_response_part(
method set_state_header (line 2483) | pub fn set_state_header(
method get_state_header (line 2642) | pub fn get_state_header(
method set_state_part (line 2650) | pub fn set_state_part(
method schedule_apply_state_parts (line 2676) | pub fn schedule_apply_state_parts(
method set_state_finalize (line 2701) | pub fn set_state_finalize(
method clear_downloaded_parts (line 2774) | pub fn clear_downloaded_parts(
method catchup_blocks_step (line 2785) | pub fn catchup_blocks_step(
method validate_chunk_transactions (line 2864) | fn validate_chunk_transactions(
method get_apply_chunk_block_context (line 2900) | fn get_apply_chunk_block_context(
method block_catch_up_postprocess (line 2921) | fn block_catch_up_postprocess(
method finish_catchup_blocks (line 2959) | pub fn finish_catchup_blocks(
method get_transaction_execution_result (line 3003) | pub fn get_transaction_execution_result(
method get_recursive_transaction_results (line 3010) | fn get_recursive_transaction_results(
method get_final_transaction_result (line 3024) | pub fn get_final_transaction_result(
method get_final_transaction_result_with_receipt (line 3066) | pub fn get_final_transaction_result_with_receipt(
method check_blocks_final_and_canonical (line 3094) | pub fn check_blocks_final_and_canonical(
method create_chunk_state_challenge (line 3108) | pub fn create_chunk_state_challenge(
method get_resharding_state_roots (line 3178) | fn get_resharding_state_roots(
method get_blocks_until_height (line 3207) | fn get_blocks_until_height(
method apply_chunks_preprocessing (line 3235) | fn apply_chunks_preprocessing(
method get_shard_context (line 3304) | fn get_shard_context(
method get_update_shard_job (line 3335) | fn get_update_shard_job(
method get_blocks_range_with_missing_chunks (line 3504) | fn get_blocks_range_with_missing_chunks(
method get_stateless_validation_job (line 3567) | fn get_stateless_validation_job(
method process_snapshot (line 3776) | fn process_snapshot(&mut self) -> Result<(), Error> {
method should_make_or_delete_snapshot (line 3804) | fn should_make_or_delete_snapshot(&mut self) -> Result<(bool, bool), E...
method get_cached_state_parts (line 3833) | pub fn get_cached_state_parts(
method combine_maybe_hashes (line 3903) | fn combine_maybe_hashes(
method chain_update (line 3918) | fn chain_update(&mut self) -> ChainUpdate {
method get_merkle_tree_node (line 3930) | fn get_merkle_tree_node(
method reconstruct_merkle_tree_node (line 3988) | fn reconstruct_merkle_tree_node(
method get_block_proof (line 4031) | pub fn get_block_proof(
method head (line 4089) | pub fn head(&self) -> Result<Tip, Error> {
method tail (line 4095) | pub fn tail(&self) -> Result<BlockHeight, Error> {
method header_head (line 4101) | pub fn header_head(&self) -> Result<Tip, Error> {
method head_header (line 4107) | pub fn head_header(&self) -> Result<BlockHeader, Error> {
method final_head (line 4113) | pub fn final_head(&self) -> Result<Tip, Error> {
method get_block (line 4119) | pub fn get_block(&self, hash: &CryptoHash) -> Result<Block, Error> {
method get_head_block (line 4124) | pub fn get_head_block(&self) -> Result<Block, Error> {
method get_chunk (line 4131) | pub fn get_chunk(&self, chunk_hash: &ChunkHash) -> Result<Arc<ShardChu...
method get_chunk_clone_from_header (line 4137) | pub fn get_chunk_clone_from_header(
method get_block_by_height (line 4146) | pub fn get_block_by_height(&self, height: BlockHeight) -> Result<Block...
method get_block_hash_by_height (line 4153) | pub fn get_block_hash_by_height(&self, height: BlockHeight) -> Result<...
method get_block_header (line 4159) | pub fn get_block_header(&self, hash: &CryptoHash) -> Result<BlockHeade...
method get_block_header_by_height (line 4165) | pub fn get_block_header_by_height(&self, height: BlockHeight) -> Resul...
method get_block_header_on_chain_by_height (line 4171) | pub fn get_block_header_on_chain_by_height(
method get_previous_header (line 4181) | pub fn get_previous_header(&self, header: &BlockHeader) -> Result<Bloc...
method get_earliest_block_hash (line 4189) | pub fn get_earliest_block_hash(&self) -> Result<Option<CryptoHash>, Er...
method block_exists (line 4195) | pub fn block_exists(&self, hash: &CryptoHash) -> Result<bool, Error> {
method get_block_extra (line 4201) | pub fn get_block_extra(&self, block_hash: &CryptoHash) -> Result<Arc<B...
method get_chunk_extra (line 4207) | pub fn get_chunk_extra(
method get_shard_id_for_receipt_id (line 4217) | pub fn get_shard_id_for_receipt_id(&self, receipt_id: &CryptoHash) -> ...
method get_next_block_hash_with_new_chunk (line 4225) | pub fn get_next_block_hash_with_new_chunk(
method chain_store (line 4270) | pub fn chain_store(&self) -> &ChainStore {
method mut_chain_store (line 4276) | pub fn mut_chain_store(&mut self) -> &mut ChainStore {
method genesis_block (line 4282) | pub fn genesis_block(&self) -> &Block {
method genesis (line 4288) | pub fn genesis(&self) -> &BlockHeader {
method blocks_with_missing_chunks_len (line 4294) | pub fn blocks_with_missing_chunks_len(&self) -> usize {
method blocks_in_processing_len (line 4299) | pub fn blocks_in_processing_len(&self) -> usize {
method is_chunk_orphan (line 4305) | pub fn is_chunk_orphan(&self, hash: &CryptoHash) -> bool {
method is_in_processing (line 4311) | pub fn is_in_processing(&self, hash: &CryptoHash) -> bool {
method is_height_processed (line 4316) | pub fn is_height_processed(&self, height: BlockHeight) -> Result<bool,...
method is_block_invalid (line 4321) | pub fn is_block_invalid(&self, hash: &CryptoHash) -> bool {
method check_sync_hash_validity (line 4326) | pub fn check_sync_hash_validity(&self, sync_hash: &CryptoHash) -> Resu...
method get_execution_outcome (line 4346) | pub fn get_execution_outcome(
method retrieve_headers (line 4365) | pub fn retrieve_headers(
method get_prev_chunk_headers (line 4402) | pub fn get_prev_chunk_headers(
method get_prev_chunk_header (line 4416) | pub fn get_prev_chunk_header(
method group_receipts_by_shard (line 4425) | pub fn group_receipts_by_shard(
method build_receipts_hashes (line 4438) | pub fn build_receipts_hashes(
method patch_state (line 4472) | pub fn patch_state(&mut self, patch: SandboxStatePatch) {
method patch_state_in_progress (line 4476) | pub fn patch_state_in_progress(&self) -> bool {
method validate_and_record_epoch_sync_info (line 4485) | pub fn validate_and_record_epoch_sync_info(
method get_block_catchup_status (line 4718) | pub fn get_block_catchup_status(
method drop (line 277) | fn drop(&mut self) {
type UpdateShardJob (line 284) | type UpdateShardJob =
type PreprocessBlockResult (line 289) | type PreprocessBlockResult = (Vec<UpdateShardJob>, BlockPreprocessInfo);
type VerifyBlockHashAndSignatureResult (line 293) | pub enum VerifyBlockHashAndSignatureResult {
function shard_id_out_of_bounds (line 3868) | fn shard_id_out_of_bounds(shard_id: ShardId) -> Error {
function sync_hash_not_first_hash (line 3872) | fn sync_hash_not_first_hash(sync_hash: CryptoHash) -> Error {
function get_should_apply_chunk (line 3883) | fn get_should_apply_chunk(
function do_apply_chunks (line 4575) | pub fn do_apply_chunks(
function collect_receipts (line 4592) | pub fn collect_receipts<'a, T>(receipt_proofs: T) -> Vec<Receipt>
function collect_receipts_from_response (line 4599) | pub fn collect_receipts_from_response(
type ApplyStatePartsRequest (line 4609) | pub struct ApplyStatePartsRequest {
method fmt (line 4621) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
type ApplyStatePartsResponse (line 4635) | pub struct ApplyStatePartsResponse {
type BlockCatchUpRequest (line 4643) | pub struct BlockCatchUpRequest {
method fmt (line 4652) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
type BlockCatchUpResponse (line 4664) | pub struct BlockCatchUpResponse {
type BlocksCatchUpState (line 4681) | pub struct BlocksCatchUpState {
method new (line 4698) | pub fn new(first_block_hash: CryptoHash, epoch_id: EpochId) -> Self {
method is_finished (line 4709) | pub fn is_finished(&self) -> bool {
FILE: chain/chain/src/chain_update.rs
type ChainUpdate (line 42) | pub struct ChainUpdate<'a> {
function new (line 53) | pub fn new(
function new_impl (line 72) | fn new_impl(
function commit (line 91) | pub fn commit(self) -> Result<(), Error> {
function save_receipt_id_to_shard_id_for_block (line 103) | fn save_receipt_id_to_shard_id_for_block(
function get_receipt_id_to_shard_id (line 125) | fn get_receipt_id_to_shard_id(
function apply_chunk_postprocessing (line 146) | pub(crate) fn apply_chunk_postprocessing(
function process_resharding_results (line 179) | fn process_resharding_results(
function process_apply_chunk_result (line 334) | fn process_apply_chunk_result(
function postprocess_block (line 437) | pub(crate) fn postprocess_block(
function create_light_client_block (line 548) | pub fn create_light_client_block(
function verify_orphan_header_approvals (line 563) | fn verify_orphan_header_approvals(&mut self, header: &BlockHeader) -> Re...
function update_header_head_if_not_challenged (line 593) | pub(crate) fn update_header_head_if_not_challenged(
function update_final_head_from_block (line 610) | fn update_final_head_from_block(&mut self, header: &BlockHeader) -> Resu...
function update_head (line 629) | fn update_head(&mut self, header: &BlockHeader) -> Result<Option<Tip>, E...
function mark_block_as_challenged (line 648) | pub(crate) fn mark_block_as_challenged(
function set_state_finalize (line 707) | pub fn set_state_finalize(
function set_state_finalize_on_height (line 827) | pub fn set_state_finalize_on_height(
function save_epoch_sync_info_if_finalised (line 890) | pub(crate) fn save_epoch_sync_info_if_finalised(
function save_epoch_sync_info_impl (line 943) | fn save_epoch_sync_info_impl(
function get_header_pair (line 963) | fn get_header_pair(
function get_epoch_sync_info_headers (line 995) | fn get_epoch_sync_info_headers(
function create_epoch_sync_info (line 1048) | pub fn create_epoch_sync_info(
FILE: chain/chain/src/chunks_store.rs
constant CHUNK_CACHE_SIZE (line 10) | const CHUNK_CACHE_SIZE: usize = 1024;
constant CHUNK_CACHE_SIZE (line 12) | const CHUNK_CACHE_SIZE: usize = 1;
type ReadOnlyChunksStore (line 14) | pub struct ReadOnlyChunksStore {
method new (line 21) | pub fn new(store: Store) -> Self {
method read_with_cache (line 29) | fn read_with_cache<'a, T: BorshDeserialize + Clone + 'a>(
method get_partial_chunk (line 44) | pub fn get_partial_chunk(
method get_chunk (line 54) | pub fn get_chunk(&self, chunk_hash: &ChunkHash) -> Result<Arc<ShardChu...
FILE: chain/chain/src/crypto_hash_timer.rs
type CryptoHashTimer (line 27) | pub struct CryptoHashTimer {
method new (line 33) | pub fn new(key: CryptoHash) -> Self {
method new_with_start (line 36) | pub fn new_with_start(key: CryptoHash, start: Instant) -> Self {
method get_timer_value (line 39) | pub fn get_timer_value(key: CryptoHash) -> Option<Duration> {
method drop (line 45) | fn drop(&mut self) {
function test_crypto_hash_timer (line 54) | fn test_crypto_hash_timer() {
FILE: chain/chain/src/doomslug.rs
constant MAX_TIMER_ITERS (line 18) | const MAX_TIMER_ITERS: usize = 20;
constant MAX_HEIGHTS_AHEAD_TO_STORE_APPROVALS (line 25) | const MAX_HEIGHTS_AHEAD_TO_STORE_APPROVALS: BlockHeight = 10_000;
constant MAX_HEIGHTS_BEFORE_TO_STORE_APPROVALS (line 28) | const MAX_HEIGHTS_BEFORE_TO_STORE_APPROVALS: u64 = 20;
constant MAX_HISTORY_SIZE (line 31) | const MAX_HISTORY_SIZE: usize = 1000;
type DoomslugThresholdMode (line 39) | pub enum DoomslugThresholdMode {
type DoomslugBlockProductionReadiness (line 46) | pub enum DoomslugBlockProductionReadiness {
type DoomslugTimer (line 51) | struct DoomslugTimer {
method get_delay (line 158) | pub fn get_delay(&self, n: BlockHeightDelta) -> Duration {
type DoomslugTip (line 61) | struct DoomslugTip {
type DoomslugApprovalsTracker (line 66) | struct DoomslugApprovalsTracker {
method new (line 165) | fn new(
method process_approval (line 196) | fn process_approval(
method withdraw_approval (line 222) | fn withdraw_approval(&mut self, account_id: &AccountId) {
method get_block_production_readiness (line 242) | fn get_block_production_readiness(&mut self, now: Instant) -> Doomslug...
method get_witnesses (line 258) | fn get_witnesses(&self) -> Vec<(AccountId, chrono::DateTime<chrono::Ut...
type TrackableBlockHeightValue (line 82) | pub struct TrackableBlockHeightValue(BlockHeight, &'static Lazy<IntGauge>);
method new (line 85) | pub fn new(value: BlockHeight, gauge: &'static Lazy<IntGauge>) -> Self {
method get (line 90) | pub fn get(&self) -> BlockHeight {
method set (line 94) | pub fn set(&mut self, new: BlockHeight) {
type DoomslugApprovalsTrackersAtHeight (line 115) | struct DoomslugApprovalsTrackersAtHeight {
method new (line 267) | fn new() -> Self {
method process_approval (line 286) | fn process_approval(
method status (line 334) | pub fn status(&self) -> ApprovalAtHeightStatus {
type Doomslug (line 123) | pub struct Doomslug {
method new (line 360) | pub fn new(
method adv_disable (line 402) | pub fn adv_disable(&mut self) {
method get_tip (line 407) | pub fn get_tip(&self) -> (CryptoHash, BlockHeight) {
method get_largest_height_crossing_threshold (line 414) | pub fn get_largest_height_crossing_threshold(&self) -> BlockHeight {
method get_largest_approval_height (line 419) | pub fn get_largest_approval_height(&self) -> BlockHeight {
method get_largest_final_height (line 423) | pub fn get_largest_final_height(&self) -> BlockHeight {
method get_largest_target_height (line 427) | pub fn get_largest_target_height(&self) -> BlockHeight {
method get_timer_height (line 431) | pub fn get_timer_height(&self) -> BlockHeight {
method get_timer_start (line 435) | pub fn get_timer_start(&self) -> Instant {
method get_approval_history (line 440) | pub fn get_approval_history(&self) -> Vec<ApprovalHistoryEntry> {
method update_history (line 445) | fn update_history(&mut self, entry: ApprovalHistoryEntry) {
method process_timer (line 468) | pub fn process_timer(&mut self, cur_time: Instant) -> Vec<Approval> {
method create_approval (line 536) | fn create_approval(&self, target_height: BlockHeight) -> Option<Approv...
method can_approved_block_be_produced (line 551) | pub fn can_approved_block_be_produced(
method get_witness (line 581) | pub fn get_witness(
method set_tip (line 607) | pub fn set_tip(
method on_approval_message_internal (line 633) | fn on_approval_message_internal(
method on_approval_message (line 660) | pub fn on_approval_message(
method approval_status_at_height (line 678) | pub fn approval_status_at_height(&self, height: &BlockHeight) -> Appro...
method ready_to_produce_block (line 698) | pub fn ready_to_produce_block(
function test_endorsements_and_skips_basic (line 793) | fn test_endorsements_and_skips_basic() {
function test_doomslug_approvals (line 921) | fn test_doomslug_approvals() {
function test_doomslug_one_approval_per_target_height (line 1050) | fn test_doomslug_one_approval_per_target_height() {
FILE: chain/chain/src/flat_storage_creator.rs
type FlatStorageShardCreator (line 38) | pub struct FlatStorageShardCreator {
constant CATCH_UP_BLOCKS (line 56) | const CATCH_UP_BLOCKS: usize = 50;
method new (line 58) | pub fn new(
method nibbles_to_hex (line 78) | fn nibbles_to_hex(key_nibbles: &[u8]) -> String {
method fetch_state_part (line 90) | fn fetch_state_part(
method update_status (line 147) | pub fn update_status(
type FlatStorageCreator (line 422) | pub struct FlatStorageCreator {
method new (line 431) | pub fn new(
method update_status (line 482) | pub fn update_status(&mut self, chain_store: &ChainStore) -> Result<bo...
FILE: chain/chain/src/garbage_collection.rs
type GCMode (line 21) | pub enum GCMode {
method fmt (line 28) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
method clear_data (line 113) | pub fn clear_data(&mut self, tries: ShardTries, gc_config: &GCConfig) ->...
method clear_archive_data (line 208) | pub fn clear_archive_data(&mut self, gc_height_limit: BlockHeightDelta) ...
method clear_forks_data (line 224) | fn clear_forks_data(
method reset_data_pre_state_sync (line 273) | pub fn reset_data_pre_state_sync(&mut self, sync_hash: CryptoHash) -> Re...
function clear_header_data_for_heights (line 341) | fn clear_header_data_for_heights(
function clear_chunk_data_and_headers (line 362) | fn clear_chunk_data_and_headers(&mut self, min_chunk_height: BlockHeight...
function clear_redundant_chunk_data (line 415) | fn clear_redundant_chunk_data(
function get_shard_uids_to_gc (line 441) | fn get_shard_uids_to_gc(
function clear_resharding_data (line 470) | fn clear_resharding_data(
function clear_block_data (line 520) | pub fn clear_block_data(
function clear_head_block_data (line 663) | pub fn clear_head_block_data(
function clear_chunk_data_at_height (line 743) | fn clear_chunk_data_at_height(&mut self, height: BlockHeight) -> Result<...
function gc_col_block_per_height (line 770) | fn gc_col_block_per_height(
function gc_col_state_parts (line 801) | pub fn gc_col_state_parts(
function gc_outgoing_receipts (line 814) | fn gc_outgoing_receipts(&mut self, block_hash: &CryptoHash, shard_id: Sh...
function gc_outcomes (line 846) | fn gc_outcomes(&mut self, block: &Block) -> Result<(), Error> {
function gc_col (line 867) | fn gc_col(&mut self, col: DBCol, key: &[u8]) {
FILE: chain/chain/src/lightclient.rs
function get_epoch_block_producers_view (line 11) | pub fn get_epoch_block_producers_view(
function create_light_client_block_view (line 36) | pub fn create_light_client_block_view(
FILE: chain/chain/src/metrics.rs
type ReshardingStatus (line 144) | pub(crate) enum ReshardingStatus {
function from (line 158) | fn from(value: ReshardingStatus) -> Self {
FILE: chain/chain/src/migrations.rs
function is_first_epoch_with_protocol_version (line 8) | fn is_first_epoch_with_protocol_version(
function check_if_block_is_first_with_chunk_of_version (line 21) | pub fn check_if_block_is_first_with_chunk_of_version(
FILE: chain/chain/src/missing_chunks.rs
type BlockHash (line 12) | type BlockHash = CryptoHash;
constant MAX_BLOCKS_MISSING_CHUNKS (line 14) | const MAX_BLOCKS_MISSING_CHUNKS: usize = 1024;
type BlockLike (line 16) | pub trait BlockLike {
method hash (line 17) | fn hash(&self) -> BlockHash;
method height (line 18) | fn height(&self) -> BlockHeight;
method hash (line 217) | fn hash(&self) -> BlockHash {
method height (line 221) | fn height(&self) -> u64 {
type HeightOrdered (line 22) | struct HeightOrdered<T>(T);
method eq (line 25) | fn eq(&self, other: &Self) -> bool {
method partial_cmp (line 31) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
method cmp (line 36) | fn cmp(&self, other: &Self) -> Ordering {
type MissingChunksPool (line 46) | pub struct MissingChunksPool<Block: BlockLike> {
function new (line 55) | pub fn new() -> Self {
function contains (line 65) | pub fn contains(&self, block_hash: &BlockHash) -> bool {
function get (line 69) | pub fn get(&self, block_hash: &BlockHash) -> Option<&Block> {
function len (line 73) | pub fn len(&self) -> usize {
function ready_blocks (line 77) | pub fn ready_blocks(&mut self) -> Vec<Block> {
function add_block_with_missing_chunks (line 85) | pub fn add_block_with_missing_chunks(&mut self, block: Block, missing_ch...
function accept_chunk (line 126) | pub fn accept_chunk(&mut self, chunk_hash: &ChunkHash) {
function mark_block_as_ready (line 151) | fn mark_block_as_ready(&mut self, block_hash: &BlockHash) {
function prune_blocks_below_height (line 165) | pub fn prune_blocks_below_height(&mut self, height: BlockHeight) {
function get_hash (line 198) | fn get_hash(idx: u64) -> CryptoHash {
function get_chunk_hash (line 202) | fn get_chunk_hash(idx: u64) -> ChunkHash {
type MockBlock (line 207) | struct MockBlock {
method new (line 212) | fn new(height: BlockHeight) -> Self {
function should_mark_blocks_as_ready_after_all_chunks_accepted (line 227) | fn should_mark_blocks_as_ready_after_all_chunks_accepted() {
function should_not_add_new_blocks_after_size_limit (line 249) | fn should_not_add_new_blocks_after_size_limit() {
function should_remove_old_blocks_when_prune_called (line 273) | fn should_remove_old_blocks_when_prune_called() {
FILE: chain/chain/src/orphan.rs
constant MAX_ORPHAN_SIZE (line 18) | const MAX_ORPHAN_SIZE: usize = 1024;
constant MAX_ORPHAN_AGE_SECS (line 21) | const MAX_ORPHAN_AGE_SECS: u64 = 300;
constant NUM_ORPHAN_ANCESTORS_CHECK (line 26) | pub const NUM_ORPHAN_ANCESTORS_CHECK: u64 = 1;
constant MAX_ORPHAN_MISSING_CHUNKS (line 33) | const MAX_ORPHAN_MISSING_CHUNKS: usize = 5;
type Orphan (line 39) | pub struct Orphan {
method prev_hash (line 56) | fn prev_hash(&self) -> &CryptoHash {
method hash (line 46) | fn hash(&self) -> CryptoHash {
method height (line 50) | fn height(&self) -> u64 {
type OrphanBlockPool (line 68) | pub struct OrphanBlockPool {
method new (line 87) | pub fn new() -> OrphanBlockPool {
method len (line 97) | pub fn len(&self) -> usize {
method len_evicted (line 101) | fn len_evicted(&self) -> usize {
method add (line 107) | fn add(&mut self, orphan: Orphan, requested_missing_chunks: bool) {
method contains (line 153) | pub fn contains(&self, hash: &CryptoHash) -> bool {
method get (line 157) | pub fn get(&self, hash: &CryptoHash) -> Option<&Orphan> {
method remove_by_prev_hash (line 173) | pub fn remove_by_prev_hash(&mut self, prev_hash: CryptoHash) -> Option...
method get_orphans_within_depth (line 193) | pub fn get_orphans_within_depth(
method can_request_missing_chunks_for_orphan (line 227) | fn can_request_missing_chunks_for_orphan(&self, block_hash: &CryptoHas...
method mark_missing_chunks_requested_for_orphan (line 232) | fn mark_missing_chunks_requested_for_orphan(&mut self, block_hash: Cry...
type OrphanMissingChunks (line 239) | pub struct OrphanMissingChunks {
method fmt (line 250) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
method save_orphan (line 260) | pub fn save_orphan(
method should_request_chunks_for_orphan (line 299) | pub fn should_request_chunks_for_orphan(
method check_orphan_partial_chunks_requested (line 351) | pub fn check_orphan_partial_chunks_requested(&self, block_hash: &CryptoH...
method check_orphans (line 363) | pub fn check_orphans(
method orphans_len (line 416) | pub fn orphans_len(&self) -> usize {
method orphans_evicted_len (line 422) | pub fn orphans_evicted_len(&self) -> usize {
method is_orphan (line 428) | pub fn is_orphan(&self, hash: &CryptoHash) -> bool {
FILE: chain/chain/src/resharding.rs
type ReshardingRequest (line 39) | pub struct ReshardingRequest {
method fmt (line 65) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
type ReshardingResponse (line 82) | pub struct ReshardingResponse {
function get_checked_account_id_to_shard_uid_fn (line 88) | fn get_checked_account_id_to_shard_uid_fn(
type TrieEntry (line 110) | type TrieEntry = (Vec<u8>, Option<Vec<u8>>);
type TrieUpdateBatch (line 112) | struct TrieUpdateBatch {
function get_trie_update_batch (line 119) | fn get_trie_update_batch(
function apply_delayed_receipts (line 140) | fn apply_delayed_receipts<'a>(
function set_flat_storage_state (line 170) | fn set_flat_storage_state(
function read_flat_state_value (line 189) | fn read_flat_state_value(
method build_state_for_resharding_preprocessing (line 200) | pub fn build_state_for_resharding_preprocessing(
method retry_build_state_for_split_shards (line 240) | pub fn retry_build_state_for_split_shards(resharding_request: &Reshardin...
method build_state_for_split_shards (line 267) | pub fn build_state_for_split_shards(
method build_state_for_split_shards_impl (line 286) | fn build_state_for_split_shards_impl(
method build_state_for_split_shards_postprocessing (line 423) | pub fn build_state_for_split_shards_postprocessing(
method initialize_flat_storage (line 455) | fn initialize_flat_storage(
FILE: chain/chain/src/sharding.rs
function shuffle_receipt_proofs (line 6) | pub fn shuffle_receipt_proofs<ReceiptProofType>(
function receipt_randomness_reproducibility (line 22) | pub fn receipt_randomness_reproducibility() {
FILE: chain/chain/src/state_request_tracker.rs
constant REQUESTED_STATE_PARTS_CACHE_SIZE (line 11) | const REQUESTED_STATE_PARTS_CACHE_SIZE: usize = 4;
type StateRequestTracker (line 18) | pub(crate) struct StateRequestTracker {
method new (line 23) | pub(crate) fn new() -> Self {
method save_state_part_elapsed (line 29) | pub(crate) fn save_state_part_elapsed(
method get_requested_state_parts (line 47) | pub fn get_requested_state_parts(&self) -> Vec<RequestedStatePartsView> {
FILE: chain/chain/src/state_snapshot_actor.rs
type StateSnapshotActor (line 19) | pub struct StateSnapshotActor {
method new (line 26) | pub fn new(
type Context (line 36) | type Context = Context<Self>;
type Result (line 64) | type Result = ();
method handle (line 67) | fn handle(
type Result (line 87) | type Result = ();
method handle (line 90) | fn handle(&mut self, msg: WithSpanContext<CreateSnapshotRequest>, cont...
type Result (line 132) | type Result = ();
method handle (line 135) | fn handle(&mut self, msg: WithSpanContext<CompactSnapshotRequest>, _: ...
type DeleteAndMaybeCreateSnapshotRequest (line 41) | struct DeleteAndMaybeCreateSnapshotRequest {
type CreateSnapshotRequest (line 48) | struct CreateSnapshotRequest {
type CompactSnapshotRequest (line 61) | struct CompactSnapshotRequest {}
type MakeSnapshotCallback (line 147) | type MakeSnapshotCallback =
type DeleteSnapshotCallback (line 150) | type DeleteSnapshotCallback = Arc<dyn Fn() -> () + Send + Sync + 'static>;
type SnapshotCallbacks (line 152) | pub struct SnapshotCallbacks {
function get_make_snapshot_callback (line 158) | pub fn get_make_snapshot_callback(
function get_delete_snapshot_callback (line 186) | pub fn get_delete_snapshot_callback(
FILE: chain/chain/src/store.rs
constant CACHE_SIZE (line 58) | const CACHE_SIZE: usize = 100;
constant CHUNK_CACHE_SIZE (line 60) | const CHUNK_CACHE_SIZE: usize = 1024;
constant CACHE_SIZE (line 63) | const CACHE_SIZE: usize = 1;
constant CHUNK_CACHE_SIZE (line 65) | const CHUNK_CACHE_SIZE: usize = 1;
type ChainStoreAccess (line 68) | pub trait ChainStoreAccess {
method chain_store (line 70) | fn chain_store(&self) -> &ChainStore;
method store (line 72) | fn store(&self) -> &Store;
method head (line 74) | fn head(&self) -> Result<Tip, Error>;
method tail (line 76) | fn tail(&self) -> Result<BlockHeight, Error>;
method chunk_tail (line 78) | fn chunk_tail(&self) -> Result<BlockHeight, Error>;
method fork_tail (line 80) | fn fork_tail(&self) -> Result<BlockHeight, Error>;
method header_head (line 82) | fn header_head(&self) -> Result<Tip, Error>;
method head_header (line 84) | fn head_header(&self) -> Result<BlockHeader, Error>;
method final_head (line 86) | fn final_head(&self) -> Result<Tip, Error>;
method largest_target_height (line 88) | fn largest_target_height(&self) -> Result<BlockHeight, Error>;
method get_block (line 90) | fn get_block(&self, h: &CryptoHash) -> Result<Block, Error>;
method get_chunk (line 92) | fn get_chunk(&self, chunk_hash: &ChunkHash) -> Result<Arc<ShardChunk>,...
method get_partial_chunk (line 94) | fn get_partial_chunk(&self, chunk_hash: &ChunkHash) -> Result<Arc<Part...
method get_chunk_clone_from_header (line 96) | fn get_chunk_clone_from_header(&self, header: &ShardChunkHeader) -> Re...
method block_exists (line 117) | fn block_exists(&self, h: &CryptoHash) -> Result<bool, Error>;
method chunk_exists (line 119) | fn chunk_exists(&self, h: &ChunkHash) -> Result<bool, Error>;
method get_previous_header (line 121) | fn get_previous_header(&self, header: &BlockHeader) -> Result<BlockHea...
method get_block_extra (line 123) | fn get_block_extra(&self, block_hash: &CryptoHash) -> Result<Arc<Block...
method get_chunk_extra (line 125) | fn get_chunk_extra(
method get_block_header (line 131) | fn get_block_header(&self, h: &CryptoHash) -> Result<BlockHeader, Error>;
method get_block_hash_by_height (line 133) | fn get_block_hash_by_height(&self, height: BlockHeight) -> Result<Cryp...
method get_earliest_block_hash (line 135) | fn get_earliest_block_hash(&self) -> Result<Option<CryptoHash>, Error> {
method get_block_header_by_height (line 162) | fn get_block_header_by_height(&self, height: BlockHeight) -> Result<Bl...
method get_next_block_hash (line 166) | fn get_next_block_hash(&self, hash: &CryptoHash) -> Result<CryptoHash,...
method get_epoch_light_client_block (line 167) | fn get_epoch_light_client_block(
method get_block_refcount (line 172) | fn get_block_refcount(&self, block_hash: &CryptoHash) -> Result<u64, E...
method get_block_header_on_chain_by_height (line 174) | fn get_block_header_on_chain_by_height(
method get_outgoing_receipts (line 192) | fn get_outgoing_receipts(
method get_incoming_receipts (line 198) | fn get_incoming_receipts(
method get_incoming_receipts_for_shard (line 208) | fn get_incoming_receipts_for_shard(
method is_block_challenged (line 293) | fn is_block_challenged(&self, hash: &CryptoHash) -> Result<bool, Error>;
method get_blocks_to_catchup (line 295) | fn get_blocks_to_catchup(&self, prev_hash: &CryptoHash) -> Result<Vec<...
method is_invalid_chunk (line 298) | fn is_invalid_chunk(
method get_shard_id_for_receipt_id (line 304) | fn get_shard_id_for_receipt_id(&self, receipt_id: &CryptoHash) -> Resu...
method get_transaction (line 306) | fn get_transaction(
method get_receipt (line 316) | fn get_receipt(&self, receipt_id: &CryptoHash) -> Result<Option<Arc<Re...
method get_genesis_height (line 318) | fn get_genesis_height(&self) -> BlockHeight;
method get_block_merkle_tree (line 320) | fn get_block_merkle_tree(
method get_block_hash_from_ordinal (line 325) | fn get_block_hash_from_ordinal(&self, block_ordinal: NumBlocks) -> Res...
method get_block_merkle_tree_from_ordinal (line 327) | fn get_block_merkle_tree_from_ordinal(
method is_height_processed (line 335) | fn is_height_processed(&self, height: BlockHeight) -> Result<bool, Err...
method get_block_height (line 337) | fn get_block_height(&self, hash: &CryptoHash) -> Result<BlockHeight, E...
method get_epoch_id_of_last_block_with_chunk (line 346) | fn get_epoch_id_of_last_block_with_chunk(
method chain_store (line 1100) | fn chain_store(&self) -> &ChainStore {
method store (line 1104) | fn store(&self) -> &Store {
method head (line 1108) | fn head(&self) -> Result<Tip, Error> {
method tail (line 1117) | fn tail(&self) -> Result<BlockHeight, Error> {
method chunk_tail (line 1129) | fn chunk_tail(&self) -> Result<BlockHeight, Error> {
method fork_tail (line 1136) | fn fork_tail(&self) -> Result<BlockHeight, Error> {
method head_header (line 1144) | fn head_header(&self) -> Result<BlockHeader, Error> {
method largest_target_height (line 1149) | fn largest_target_height(&self) -> Result<BlockHeight, Error> {
method header_head (line 1158) | fn header_head(&self) -> Result<Tip, Error> {
method final_head (line 1163) | fn final_head(&self) -> Result<Tip, Error> {
method get_block (line 1168) | fn get_block(&self, h: &CryptoHash) -> Result<Block, Error> {
method get_chunk (line 1176) | fn get_chunk(&self, chunk_hash: &ChunkHash) -> Result<Arc<ShardChunk>,...
method get_partial_chunk (line 1184) | fn get_partial_chunk(&self, chunk_hash: &ChunkHash) -> Result<Arc<Part...
method block_exists (line 1193) | fn block_exists(&self, h: &CryptoHash) -> Result<bool, Error> {
method chunk_exists (line 1197) | fn chunk_exists(&self, h: &ChunkHash) -> Result<bool, Error> {
method get_previous_header (line 1206) | fn get_previous_header(&self, header: &BlockHeader) -> Result<BlockHea...
method get_block_extra (line 1211) | fn get_block_extra(&self, block_hash: &CryptoHash) -> Result<Arc<Block...
method get_chunk_extra (line 1219) | fn get_chunk_extra(
method get_block_header (line 1235) | fn get_block_header(&self, h: &CryptoHash) -> Result<BlockHeader, Erro...
method get_block_hash_by_height (line 1243) | fn get_block_hash_by_height(&self, height: BlockHeight) -> Result<Cryp...
method get_next_block_hash (line 1259) | fn get_next_block_hash(&self, hash: &CryptoHash) -> Result<CryptoHash,...
method get_epoch_light_client_block (line 1266) | fn get_epoch_light_client_block(
method get_block_refcount (line 1280) | fn get_block_refcount(&self, block_hash: &CryptoHash) -> Result<u64, E...
method get_outgoing_receipts (line 1289) | fn get_outgoing_receipts(
method get_incoming_receipts (line 1304) | fn get_incoming_receipts(
method get_blocks_to_catchup (line 1319) | fn get_blocks_to_catchup(&self, hash: &CryptoHash) -> Result<Vec<Crypt...
method is_block_challenged (line 1323) | fn is_block_challenged(&self, hash: &CryptoHash) -> Result<bool, Error> {
method is_invalid_chunk (line 1327) | fn is_invalid_chunk(
method get_shard_id_for_receipt_id (line 1335) | fn get_shard_id_for_receipt_id(&self, receipt_id: &CryptoHash) -> Resu...
method get_transaction (line 1346) | fn get_transaction(
method get_receipt (line 1354) | fn get_receipt(&self, receipt_id: &CryptoHash) -> Result<Option<Arc<Re...
method get_genesis_height (line 1359) | fn get_genesis_height(&self) -> BlockHeight {
method get_block_merkle_tree (line 1363) | fn get_block_merkle_tree(
method get_block_hash_from_ordinal (line 1377) | fn get_block_hash_from_ordinal(&self, block_ordinal: NumBlocks) -> Res...
method is_height_processed (line 1388) | fn is_height_processed(&self, height: BlockHeight) -> Result<bool, Err...
method chain_store (line 1483) | fn chain_store(&self) -> &ChainStore {
method store (line 1487) | fn store(&self) -> &Store {
method head (line 1492) | fn head(&self) -> Result<Tip, Error> {
method tail (line 1501) | fn tail(&self) -> Result<BlockHeight, Error> {
method chunk_tail (line 1510) | fn chunk_tail(&self) -> Result<BlockHeight, Error> {
method fork_tail (line 1519) | fn fork_tail(&self) -> Result<BlockHeight, Error> {
method header_head (line 1528) | fn header_head(&self) -> Result<Tip, Error> {
method final_head (line 1536) | fn final_head(&self) -> Result<Tip, Error> {
method largest_target_height (line 1544) | fn largest_target_height(&self) -> Result<BlockHeight, Error> {
method head_header (line 1553) | fn head_header(&self) -> Result<BlockHeader, Error> {
method get_block (line 1558) | fn get_block(&self, h: &CryptoHash) -> Result<Block, Error> {
method block_exists (line 1567) | fn block_exists(&self, h: &CryptoHash) -> Result<bool, Error> {
method chunk_exists (line 1572) | fn chunk_exists(&self, h: &ChunkHash) -> Result<bool, Error> {
method get_previous_header (line 1578) | fn get_previous_header(&self, header: &BlockHeader) -> Result<BlockHea...
method get_block_extra (line 1582) | fn get_block_extra(&self, block_hash: &CryptoHash) -> Result<Arc<Block...
method get_chunk_extra (line 1591) | fn get_chunk_extra(
method get_block_header (line 1606) | fn get_block_header(&self, hash: &CryptoHash) -> Result<BlockHeader, E...
method get_block_hash_by_height (line 1615) | fn get_block_hash_by_height(&self, height: BlockHeight) -> Result<Cryp...
method get_block_refcount (line 1623) | fn get_block_refcount(&self, block_hash: &CryptoHash) -> Result<u64, E...
method get_next_block_hash (line 1638) | fn get_next_block_hash(&self, hash: &CryptoHash) -> Result<CryptoHash,...
method get_epoch_light_client_block (line 1646) | fn get_epoch_light_client_block(
method get_outgoing_receipts (line 1660) | fn get_outgoing_receipts(
method get_incoming_receipts (line 1675) | fn get_incoming_receipts(
method get_chunk (line 1689) | fn get_chunk(&self, chunk_hash: &ChunkHash) -> Result<Arc<ShardChunk>,...
method get_partial_chunk (line 1697) | fn get_partial_chunk(&self, chunk_hash: &ChunkHash) -> Result<Arc<Part...
method get_chunk_clone_from_header (line 1705) | fn get_chunk_clone_from_header(&self, header: &ShardChunkHeader) -> Re...
method get_blocks_to_catchup (line 1713) | fn get_blocks_to_catchup(&self, prev_hash: &CryptoHash) -> Result<Vec<...
method is_block_challenged (line 1722) | fn is_block_challenged(&self, hash: &CryptoHash) -> Result<bool, Error> {
method is_invalid_chunk (line 1729) | fn is_invalid_chunk(
method get_shard_id_for_receipt_id (line 1740) | fn get_shard_id_for_receipt_id(&self, receipt_id: &CryptoHash) -> Resu...
method get_transaction (line 1749) | fn get_transaction(
method get_receipt (line 1760) | fn get_receipt(&self, receipt_id: &CryptoHash) -> Result<Option<Arc<Re...
method get_genesis_height (line 1768) | fn get_genesis_height(&self) -> BlockHeight {
method get_block_merkle_tree (line 1772) | fn get_block_merkle_tree(
method get_block_hash_from_ordinal (line 1783) | fn get_block_hash_from_ordinal(&self, block_ordinal: NumBlocks) -> Res...
method is_height_processed (line 1793) | fn is_height_processed(&self, height: BlockHeight) -> Result<bool, Err...
function filter_incoming_receipts_for_shard (line 368) | fn filter_incoming_receipts_for_shard(
type ChainStore (line 396) | pub struct ChainStore {
method new (line 466) | pub fn new(store: Store, genesis_height: BlockHeight, save_trie_change...
method new_read_only_chunks_store (line 497) | pub fn new_read_only_chunks_store(&self) -> ReadOnlyChunksStore {
method store_update (line 501) | pub fn store_update(&mut self) -> ChainStoreUpdate<'_> {
method iterate_state_sync_infos (line 505) | pub fn iterate_state_sync_infos(&self) -> Result<Vec<(CryptoHash, Stat...
method get_state_changes_for_resharding (line 523) | pub fn get_state_changes_for_resharding(
method get_outgoing_receipts_for_shard (line 553) | pub fn get_outgoing_receipts_for_shard(
method reassign_outgoing_receipts_for_resharding (line 600) | fn reassign_outgoing_receipts_for_resharding(
method reassign_outgoing_receipts_for_resharding_v2 (line 642) | fn reassign_outgoing_receipts_for_resharding_v2(
method reassign_outgoing_receipts_for_resharding_v1 (line 678) | fn reassign_outgoing_receipts_for_resharding_v1(
method check_transaction_validity_period (line 691) | pub fn check_transaction_validity_period(
method get_outcomes_by_id (line 754) | pub fn get_outcomes_by_id(
method get_outcome_by_id_and_block_hash (line 778) | pub fn get_outcome_by_id_and_block_hash(
method get_outcomes_by_block_hash_and_shard_id (line 790) | pub fn get_outcomes_by_block_hash_and_shard_id(
method get_block_execution_outcomes (line 802) | pub fn get_block_execution_outcomes(
method get_all_block_hashes_by_height (line 834) | pub fn get_all_block_hashes_by_height(
method get_all_chunk_hashes_by_height (line 848) | pub fn get_all_chunk_hashes_by_height(
method get_all_header_hashes_by_height (line 859) | pub fn get_all_header_hashes_by_height(
method get_state_header (line 869) | pub fn get_state_header(
method get_latest_known (line 882) | pub fn get_latest_known(&self) -> Result<LatestKnown, Error> {
method save_latest_known (line 894) | pub fn save_latest_known(&mut self, latest_known: LatestKnown) -> Resu...
method get_epoch_sync_info (line 903) | pub fn get_epoch_sync_info(&self, epoch_id: &EpochId) -> Result<EpochS...
method get_state_changes_in_block (line 914) | pub fn get_state_changes_in_block(
method get_state_changes_with_cause_in_block (line 938) | pub fn get_state_changes_with_cause_in_block(
method get_state_changes (line 955) | pub fn get_state_changes(
method get_store_statistics (line 1041) | pub fn get_store_statistics(&self) -> Option<StoreStatistics> {
method read_with_cache (line 1045) | fn read_with_cache<'a, T: BorshDeserialize + Clone + 'a>(
method state_sync_dump_progress_key (line 1064) | fn state_sync_dump_progress_key(shard_id: ShardId) -> Vec<u8> {
method get_state_sync_dump_progress (line 1072) | pub fn get_state_sync_dump_progress(
method set_state_sync_dump_progress (line 1084) | pub fn set_state_sync_dump_progress(
function option_to_not_found (line 454) | fn option_to_not_found<T, F>(res: io::Result<Option<T>>, field_name: F) ...
type ChainStoreCacheUpdate (line 1401) | pub(crate) struct ChainStoreCacheUpdate {
type ChainStoreUpdate (line 1428) | pub struct ChainStoreUpdate<'a> {
function new (line 1457) | pub fn new(chain_store: &'a mut ChainStore) -> Self {
function save_head (line 1804) | pub fn save_head(&mut self, t: &Tip) -> Result<(), Error> {
function save_body_head (line 1810) | pub fn save_body_head(&mut self, t: &Tip) -> Result<(), Error> {
function save_final_head (line 1816) | pub fn save_final_head(&mut self, t: &Tip) -> Result<(), Error> {
function update_height_if_not_challenged (line 1823) | fn update_height_if_not_challenged(
function force_save_header_head (line 1869) | pub fn force_save_header_head(&mut self, t: &Tip) -> Result<(), Error> {
function save_header_head_if_not_challenged (line 1884) | pub fn save_header_head_if_not_challenged(&mut self, t: &Tip) -> Result<...
function save_largest_target_height (line 1917) | pub fn save_largest_target_height(&mut self, height: BlockHeight) {
function try_save_latest_known (line 1922) | pub fn try_save_latest_known(&mut self, height: BlockHeight) -> Result<(...
function adv_save_latest_known (line 1932) | pub fn adv_save_latest_known(&mut self, height: BlockHeight) -> Result<(...
function save_block (line 1942) | pub fn save_block(&mut self, block: Block) {
function save_block_extra (line 1947) | pub fn save_block_extra(&mut self, block_hash: &CryptoHash, block_extra:...
function save_chunk_extra (line 1952) | pub fn save_chunk_extra(
function save_chunk (line 1963) | pub fn save_chunk(&mut self, chunk: ShardChunk) {
function save_partial_chunk (line 1977) | pub fn save_partial_chunk(&mut self, partial_chunk: PartialEncodedChunk) {
function save_block_merkle_tree (line 1983) | pub fn save_block_merkle_tree(
function update_and_save_block_merkle_tree (line 1993) | fn update_and_save_block_merkle_tree(&mut self, header: &BlockHeader) ->...
function save_block_header_no_update_tree (line 2008) | pub fn save_block_header_no_update_tree(&mut self, header: BlockHeader) ...
function save_block_header (line 2013) | pub fn save_block_header(&mut self, header: BlockHeader) -> Result<(), E...
function save_next_block_hash (line 2019) | pub fn save_next_block_hash(&mut self, hash: &CryptoHash, next_hash: Cry...
function save_epoch_light_client_block (line 2023) | pub fn save_epoch_light_client_block(
function save_outgoing_receipt (line 2034) | pub fn save_outgoing_receipt(
function save_receipt_id_to_shard_id (line 2045) | pub fn save_receipt_id_to_shard_id(&mut self, receipt_id: CryptoHash, sh...
function save_incoming_receipt (line 2049) | pub fn save_incoming_receipt(
function save_outcomes_with_proofs (line 2058) | pub fn save_outcomes_with_proofs(
function save_trie_changes (line 2076) | pub fn save_trie_changes(&mut self, trie_changes: WrappedTrieChanges) {
function add_state_changes_for_resharding (line 2080) | pub fn add_state_changes_for_resharding(
function remove_state_changes_for_resharding (line 2092) | pub fn remove_state_changes_for_resharding(
function add_block_to_catchup (line 2103) | pub fn add_block_to_catchup(&mut self, prev_hash: CryptoHash, block_hash...
function remove_block_to_catchup (line 2107) | pub fn remove_block_to_catchup(&mut self, prev_hash: CryptoHash, hash: C...
function remove_prev_block_to_catchup (line 2111) | pub fn remove_prev_block_to_catchup(&mut self, hash: CryptoHash) {
function add_state_sync_info (line 2115) | pub fn add_state_sync_info(&mut self, info: StateSyncInfo) {
function remove_state_sync_info (line 2119) | pub fn remove_state_sync_info(&mut self, hash: CryptoHash) {
function save_challenged_block (line 2123) | pub fn save_challenged_block(&mut self, hash: CryptoHash) {
function save_invalid_chunk (line 2127) | pub fn save_invalid_chunk(&mut self, chunk: EncodedShardChunk) {
function save_block_height_processed (line 2131) | pub fn save_block_height_processed(&mut self, height: BlockHeight) {
function inc_block_refcount (line 2135) | pub fn inc_block_refcount(&mut self, block_hash: &CryptoHash) -> Result<...
function dec_block_refcount (line 2147) | pub fn dec_block_refcount(&mut self, block_hash: &CryptoHash) -> Result<...
function reset_tail (line 2158) | pub fn reset_tail(&mut self) {
function update_tail (line 2164) | pub fn update_tail(&mut self, height: BlockHeight) -> Result<(), Error> {
function update_fork_tail (line 2180) | pub fn update_fork_tail(&mut self, height: BlockHeight) {
function update_chunk_tail (line 2184) | pub fn update_chunk_tail(&mut self, height: BlockHeight) {
function merge (line 2189) | pub fn merge(&mut self, store_update: StoreUpdate) {
function write_col_misc (line 2193) | fn write_col_misc<T: BorshSerialize>(
function copy_chain_state_as_of_block (line 2207) | pub fn copy_chain_state_as_of_block(
function finalize (line 2319) | fn finalize(&mut self) -> Result<StoreUpdate, Error> {
function commit (line 2627) | pub fn commit(mut self) -> Result<(), Error> {
function test_tx_validity_long_fork (line 2747) | fn test_tx_validity_long_fork() {
function test_tx_validity_normal_case (line 2801) | fn test_tx_validity_normal_case() {
function test_tx_validity_off_by_one (line 2850) | fn test_tx_validity_off_by_one() {
function test_cache_invalidation (line 2898) | fn test_cache_invalidation() {
FILE: chain/chain/src/store_validator.rs
type StoreValidatorCache (line 35) | pub struct StoreValidatorCache {
method new (line 49) | fn new() -> Self {
type ErrorMessage (line 65) | pub struct ErrorMessage {
type StoreValidator (line 71) | pub struct StoreValidator {
method new (line 88) | pub fn new(
method set_timeout (line 112) | pub fn set_timeout(&mut self, timeout: u64) {
method is_failed (line 115) | pub fn is_failed(&self) -> bool {
method num_failed (line 118) | pub fn num_failed(&self) -> u64 {
method tests_done (line 121) | pub fn tests_done(&self) -> u64 {
method process_error (line 124) | fn process_error<K: std::fmt::Debug>(&mut self, err: StoreValidatorErr...
method validate_col (line 127) | fn validate_col(&mut self, col: DBCol) -> Result<(), StoreValidatorErr...
method validate (line 325) | pub fn validate(&mut self) {
method check (line 372) | fn check<K: std::fmt::Debug + ?Sized, V: ?Sized>(
function init (line 396) | fn init() -> (Chain, StoreValidator) {
function test_io_error (line 421) | fn test_io_error() {
function test_db_corruption (line 440) | fn test_db_corruption() {
function test_db_not_found (line 453) | fn test_db_not_found() {
function test_discrepancy (line 464) | fn test_discrepancy() {
function test_validation_failed (line 476) | fn test_validation_failed() {
FILE: chain/chain/src/store_validator/validate.rs
type StoreValidatorError (line 20) | pub enum StoreValidatorError {
function head_tail_validity (line 104) | pub(crate) fn head_tail_validity(sv: &mut StoreValidator) -> Result<(), ...
function block_header_hash_validity (line 164) | pub(crate) fn block_header_hash_validity(
function block_header_height_validity (line 173) | pub(crate) fn block_header_height_validity(
function block_hash_validity (line 186) | pub(crate) fn block_hash_validity(
function block_height_validity (line 195) | pub(crate) fn block_height_validity(
function block_indexed_by_height (line 212) | pub(crate) fn block_indexed_by_height(
function block_header_exists (line 236) | pub(crate) fn block_header_exists(
function chunk_hash_validity (line 248) | pub(crate) fn chunk_hash_validity(
function chunk_tail_validity (line 262) | pub(crate) fn chunk_tail_validity(
function chunk_indexed_by_height_created (line 279) | pub(crate) fn chunk_indexed_by_height_created(
function header_hash_indexed_by_height (line 297) | pub(crate) fn header_hash_indexed_by_height(
function chunk_tx_exists (line 333) | pub(crate) fn chunk_tx_exists(
function block_chunks_exist (line 356) | pub(crate) fn block_chunks_exist(
function block_chunks_height_validity (line 408) | pub(crate) fn block_chunks_height_validity(
function block_info_exists (line 425) | pub(crate) fn block_info_exists(
function block_epoch_exists (line 437) | pub(crate) fn block_epoch_exists(
function block_increment_refcount (line 452) | pub(crate) fn block_increment_refcount(
function canonical_header_validity (line 464) | pub(crate) fn canonical_header_validity(
function canonical_prev_block_validity (line 480) | pub(crate) fn canonical_prev_block_validity(
function trie_changes_chunk_extra_exists (line 525) | pub(crate) fn trie_changes_chunk_extra_exists(
function chunk_of_height_exists (line 611) | pub(crate) fn chunk_of_height_exists(
function header_hash_of_height_exists (line 632) | pub(crate) fn header_hash_of_height_exists(
function outcome_by_outcome_id_exists (line 648) | pub(crate) fn outcome_by_outcome_id_exists(
function outcome_id_block_exists (line 667) | pub(crate) fn outcome_id_block_exists(
function outcome_indexed_by_block_hash (line 679) | pub(crate) fn outcome_indexed_by_block_hash(
function state_sync_info_valid (line 718) | pub(crate) fn state_sync_info_valid(
function state_sync_info_block_exists (line 731) | pub(crate) fn state_sync_info_block_exists(
function chunk_extra_block_exists (line 743) | pub(crate) fn chunk_extra_block_exists(
function block_info_block_header_exists (line 755) | pub(crate) fn block_info_block_header_exists(
function epoch_validity (line 771) | pub(crate) fn epoch_validity(
function tx_refcount (line 780) | pub(crate) fn tx_refcount(
function receipt_refcount (line 794) | pub(crate) fn receipt_refcount(
function block_refcount (line 808) | pub(crate) fn block_refcount(
function state_header_block_exists (line 836) | pub(crate) fn state_header_block_exists(
function state_part_header_exists (line 848) | pub(crate) fn state_part_header_exists(
function block_height_cmp_tail_final (line 871) | pub(crate) fn block_height_cmp_tail_final(sv: &StoreValidator) -> Result...
function tx_refcount_final (line 880) | pub(crate) fn tx_refcount_final(sv: &StoreValidator) -> Result<(), Store...
function receipt_refcount_final (line 891) | pub(crate) fn receipt_refcount_final(sv: &StoreValidator) -> Result<(), ...
function block_refcount_final (line 902) | pub(crate) fn block_refcount_final(sv: &StoreValidator) -> Result<(), St...
FILE: chain/chain/src/test_utils.rs
function get_chain (line 33) | pub fn get_chain() -> Chain {
function get_chain_with_num_shards (line 37) | pub fn get_chain_with_num_shards(num_shards: NumShards) -> Chain {
function get_chain_with_epoch_length (line 41) | pub fn get_chain_with_epoch_length(epoch_length: NumBlocks) -> Chain {
function get_chain_with_epoch_length_and_num_shards (line 45) | pub fn get_chain_with_epoch_length_and_num_shards(
function wait_for_all_blocks_in_processing (line 71) | pub fn wait_for_all_blocks_in_processing(chain: &Chain) -> bool {
function is_block_in_processing (line 75) | pub fn is_block_in_processing(chain: &Chain, block_hash: &CryptoHash) ->...
function wait_for_block_in_processing (line 79) | pub fn wait_for_block_in_processing(
function process_block_sync (line 88) | pub fn process_block_sync(
function setup (line 112) | pub fn setup() -> (Chain, Arc<MockEpochManager>, Arc<KeyValueRuntime>, A...
function setup_with_tx_validity_period (line 117) | fn setup_with_tx_validity_period(
function setup_with_validators (line 151) | pub fn setup_with_validators(
function setup_with_validators_and_start_time (line 186) | pub fn setup_with_validators_and_start_time(
function format_hash (line 222) | pub fn format_hash(hash: CryptoHash) -> String {
function display_chain (line 229) | pub fn display_chain(me: &Option<AccountId>, chain: &mut Chain, tail: bo...
method test (line 323) | pub fn test() -> Self {
function naive_build_receipt_hashes (line 355) | fn naive_build_receipt_hashes(
function test_build_receipt_hashes_with_num_shard (line 373) | fn test_build_receipt_hashes_with_num_shard(num_shards: NumShards) {
function test_build_receipt_hashes (line 405) | fn test_build_receipt_hashes() {
FILE: chain/chain/src/test_utils/kv_runtime.rs
type KeyValueRuntime (line 70) | pub struct KeyValueRuntime {
method new (line 330) | pub fn new(store: Store, epoch_manager: &MockEpochManager) -> Arc<Self> {
method new_with_no_gc (line 333) | pub fn new_with_no_gc(
method get_block_header (line 385) | fn get_block_header(&self, hash: &CryptoHash) -> Result<Option<BlockHe...
type MockEpochManager (line 88) | pub struct MockEpochManager {
method new (line 131) | pub fn new(store: Store, epoch_length: u64) -> Arc<Self> {
method new_with_validators (line 137) | pub fn new_with_validators(
method get_epoch_and_valset (line 221) | fn get_epoch_and_valset(
method get_block_producers (line 292) | fn get_block_producers(&self, valset: usize) -> &[ValidatorPowerAndPle...
method get_chunk_producers (line 296) | fn get_chunk_producers(
method get_valset_for_epoch (line 304) | fn get_valset_for_epoch(&self, epoch_id: &EpochId) -> Result<usize, Ep...
method get_block_header (line 316) | fn get_block_header(&self, hash: &CryptoHash) -> Result<Option<BlockHe...
type EpochValidatorSet (line 114) | struct EpochValidatorSet {
type AccountNonce (line 121) | struct AccountNonce(AccountId, Nonce);
type KVState (line 124) | struct KVState {
function account_id_to_shard_id (line 398) | pub fn account_id_to_shard_id(account_id: &AccountId, num_shards: NumSha...
type ReceiptNonce (line 404) | struct ReceiptNonce {
function create_receipt_nonce (line 411) | fn create_receipt_nonce(
method epoch_exists (line 421) | fn epoch_exists(&self, epoch_id: &EpochId) -> bool {
method shard_ids (line 425) | fn shard_ids(&self, _epoch_id: &EpochId) -> Result<Vec<ShardId>, EpochEr...
method num_total_parts (line 429) | fn num_total_parts(&self) -> usize {
method num_data_parts (line 433) | fn num_data_parts(&self) -> usize {
method get_part_owner (line 443) | fn get_part_owner(&self, epoch_id: &EpochId, part_id: u64) -> Result<Acc...
method account_id_to_shard_id (line 452) | fn account_id_to_shard_id(
method shard_id_to_uid (line 460) | fn shard_id_to_uid(
method get_block_info (line 468) | fn get_block_info(&self, _hash: &CryptoHash) -> Result<Arc<BlockInfo>, E...
method get_epoch_config (line 472) | fn get_epoch_config(&self, _epoch_id: &EpochId) -> Result<EpochConfig, E...
method get_epoch_info (line 498) | fn get_epoch_info(&self, _epoch_id: &EpochId) -> Result<Arc<EpochInfo>, ...
method get_shard_layout (line 539) | fn get_shard_layout(&self, _epoch_id: &EpochId) -> Result<ShardLayout, E...
method get_shard_config (line 543) | fn get_shard_config(&self, _epoch_id: &EpochId) -> Result<ShardConfig, E...
method is_next_block_epoch_start (line 547) | fn is_next_block_epoch_start(&self, parent_hash: &CryptoHash) -> Result<...
method is_last_block_in_finished_epoch (line 559) | fn is_last_block_in_finished_epoch(&self, hash: &CryptoHash) -> Result<b...
method get_epoch_id_from_prev_block (line 563) | fn get_epoch_id_from_prev_block(
method get_epoch_height_from_prev_block (line 570) | fn get_epoch_height_from_prev_block(
method get_next_epoch_id (line 577) | fn get_next_epoch_id(&self, block_hash: &CryptoHash) -> Result<EpochId, ...
method get_next_epoch_id_from_prev_block (line 582) | fn get_next_epoch_id_from_prev_block(
method get_prev_shard_ids (line 589) | fn get_prev_shard_ids(
method get_shard_layout_from_prev_block (line 597) | fn get_shard_layout_from_prev_block(
method get_epoch_id (line 604) | fn get_epoch_id(&self, block_hash: &CryptoHash) -> Result<EpochId, Epoch...
method compare_epoch_id (line 609) | fn compare_epoch_id(
method get_epoch_start_height (line 623) | fn get_epoch_start_height(&self, block_hash: &CryptoHash) -> Result<Bloc...
method get_prev_epoch_id_from_prev_block (line 631) | fn get_prev_epoch_id_from_prev_block(
method get_estimated_protocol_upgrade_block_height (line 647) | fn get_estimated_protocol_upgrade_block_height(
method get_epoch_block_producers_ordered (line 654) | fn get_epoch_block_producers_ordered(
method get_epoch_block_approvers_ordered (line 663) | fn get_epoch_block_approvers_ordered(
method get_epoch_chunk_producers (line 688) | fn get_epoch_chunk_producers(
method get_block_producer (line 696) | fn get_block_producer(
method get_block_producer_by_hash (line 705) | fn get_block_producer_by_hash(
method get_chunk_producer (line 712) | fn get_chunk_producer(
method get_chunk_validators (line 724) | fn get_chunk_validators(
method get_validator_by_account_id (line 733) | fn get_validator_by_account_id(
method get_fisherman_by_account_id (line 753) | fn get_fisherman_by_account_id(
method get_validator_info (line 762) | fn get_validator_info(
method add_validator_proposals (line 779) | fn add_validator_proposals(
method add_validator_proposals_for_blocks (line 786) | fn add_validator_proposals_for_blocks(
method get_epoch_minted_amount (line 793) | fn get_epoch_minted_amount(&self, _epoch_id: &EpochId) -> Result<Balance...
method get_epoch_protocol_version (line 797) | fn get_epoch_protocol_version(
method get_epoch_sync_data (line 804) | fn get_epoch_sync_data(
method epoch_sync_init_epoch_manager (line 823) | fn epoch_sync_init_epoch_manager(
method verify_block_vrf (line 838) | fn verify_block_vrf(
method verify_validator_signature (line 849) | fn verify_validator_signature(
method verify_validator_or_fisherman_signature (line 860) | fn verify_validator_or_fisherman_signature(
method verify_header_signature (line 871) | fn verify_header_signature(&self, header: &BlockHeader) -> Result<bool, ...
method verify_chunk_signature_with_header_parts (line 877) | fn verify_chunk_signature_with_header_parts(
method verify_approval (line 889) | fn verify_approval(
method verify_approvals_and_threshold_orphan (line 899) | fn verify_approvals_and_threshold_orphan(
method cares_about_shard_from_prev_block (line 937) | fn cares_about_shard_from_prev_block(
method cares_about_shard_next_epoch_from_prev_block (line 956) | fn cares_about_shard_next_epoch_from_prev_block(
method will_shard_layout_change (line 976) | fn will_shard_layout_change(&self, parent_hash: &CryptoHash) -> Result<b...
method get_all_epoch_hashes (line 986) | fn get_all_epoch_hashes(
method force_update_aggregator (line 995) | fn force_update_aggregator(&self, _epoch_id: &EpochId, _hash: &CryptoHas...
method get_all_miners (line 997) | fn get_all_miners(&self, _: &CryptoHash) -> Result<AllMinersView, EpochE...
method store (line 1003) | fn store(&self) -> &Store {
method get_tries (line 1007) | fn get_tries(&self) -> ShardTries {
method get_trie_for_shard (line 1011) | fn get_trie_for_shard(
method get_flat_storage_manager (line 1023) | fn get_flat_storage_manager(&self) -> unc_store::flat::FlatStorageManager {
method get_view_trie_for_shard (line 1027) | fn get_view_trie_for_shard(
method validate_tx (line 1039) | fn validate_tx(
method prepare_transactions (line 1051) | fn prepare_transactions(
method apply_chunk (line 1071) | fn apply_chunk(
method query (line 1233) | fn query(
method obtain_state_part (line 1319) | fn obtain_state_part(
method validate_state_part (line 1334) | fn validate_state_part(&self, _state_root: &StateRoot, _part_id: PartId,...
method apply_state_part (line 1339) | fn apply_state_part(
method get_state_root_node (line 1358) | fn get_state_root_node(
method validate_state_root_node (line 1371) | fn validate_state_root_node(
method get_gc_stop_height (line 1380) | fn get_gc_stop_height(&self, block_hash: &CryptoHash) -> BlockHeight {
method get_protocol_config (line 1414) | fn get_protocol_config(&self, _epoch_id: &EpochId) -> Result<ProtocolCon...
method will_shard_layout_change_next_epoch (line 1418) | fn will_shard_layout_change_next_epoch(
method apply_update_to_children_states (line 1425) | fn apply_update_to_children_states(
method load_mem_tries_on_startup (line 1436) | fn load_mem_tries_on_startup(&self, _shard_uids: &[ShardUId]) -> Result<...
FILE: chain/chain/src/test_utils/validator_schedule.rs
type ValidatorSchedule (line 13) | pub struct ValidatorSchedule {
method new (line 21) | pub fn new() -> Self {
method new_with_shards (line 25) | pub fn new_with_shards(num_shards: NumShards) -> Self {
method block_producers_per_epoch (line 37) | pub fn block_producers_per_epoch(mut self, block_producers: Vec<Vec<Ac...
method chunk_only_producers_per_epoch_per_shard (line 49) | pub fn chunk_only_producers_per_epoch_per_shard(
method validator_groups (line 69) | pub fn validator_groups(mut self, validator_groups: u64) -> Self {
method num_shards (line 74) | pub fn num_shards(mut self, num_shards: NumShards) -> Self {
method all_block_producers (line 79) | pub fn all_block_producers(&self) -> impl Iterator<Item = &AccountId> {
method all_validators (line 83) | pub fn all_validators(&self) -> impl Iterator<Item = &AccountId> {
method sanity_check (line 87) | fn sanity_check(&self) {
FILE: chain/chain/src/tests/challenges.rs
function test_no_challenge_on_same_header (line 7) | fn test_no_challenge_on_same_header() {
FILE: chain/chain/src/tests/doomslug.rs
function block_hash (line 14) | fn block_hash(height: BlockHeight, ord: usize) -> CryptoHash {
function get_msg_delivery_time (line 18) | fn get_msg_delivery_time(now: Instant, gst: Instant, delta: Duration) ->...
function one_iter (line 33) | fn one_iter(
function test_fuzzy_doomslug_liveness_and_safety (line 300) | fn test_fuzzy_doomslug_liveness_and_safety() {
FILE: chain/chain/src/tests/garbage_collection.rs
function do_fork (line 26) | fn do_fork(
function gc_fork_common (line 137) | fn gc_fork_common(simple_chains: Vec<SimpleChain>, max_changes: usize) {
type SimpleChain (line 296) | pub struct SimpleChain {
function test_gc_remove_simple_chain_sanity (line 304) | fn test_gc_remove_simple_chain_sanity() {
function test_gc_remove_fork_common (line 313) | fn test_gc_remove_fork_common(max_changes_limit: usize) {
function test_gc_remove_fork_small (line 333) | fn test_gc_remove_fork_small() {
function test_gc_remove_fork_large (line 339) | fn test_gc_remove_fork_large() {
function test_gc_remove_fork_fail_often (line 344) | fn test_gc_remove_fork_fail_often() {
function test_gc_not_remove_fork_common (line 360) | fn test_gc_not_remove_fork_common(max_changes_limit: usize) {
function test_gc_not_remove_fork_small (line 380) | fn test_gc_not_remove_fork_small() {
function test_gc_not_remove_fork_large (line 386) | fn test_gc_not_remove_fork_large() {
function test_gc_not_remove_longer_fork (line 392) | fn test_gc_not_remove_longer_fork() {
function test_gc_forks_from_genesis (line 404) | fn test_gc_forks_from_genesis() {
function test_gc_overlap (line 438) | fn test_gc_overlap() {
function test_gc_boundaries_common (line 451) | fn test_gc_boundaries_common(max_changes_limit: usize) {
function test_gc_boundaries_small (line 466) | fn test_gc_boundaries_small() {
function test_gc_boundaries_large (line 472) | fn test_gc_boundaries_large() {
function test_gc_random_common (line 476) | fn test_gc_random_common(runs: u64) {
function test_gc_random_small (line 495) | fn test_gc_random_small() {
function test_gc_random_large (line 501) | fn test_gc_random_large() {
function test_gc_pine_small (line 506) | fn test_gc_pine_small() {
function test_gc_pine (line 546) | fn test_gc_pine() {
function test_gc_star_common (line 568) | fn test_gc_star_common(max_changes_limit: usize) {
function test_gc_star_small (line 582) | fn test_gc_star_small() {
function test_gc_star_large (line 588) | fn test_gc_star_large() {
function test_fork_far_away_from_epoch_end (line 599) | fn test_fork_far_away_from_epoch_end() {
function test_clear_old_data (line 703) | fn test_clear_old_data() {
function add_block (line 746) | fn add_block(
function test_clear_old_data_fixed_height (line 793) | fn test_clear_old_data_fixed_height() {
function test_clear_old_data_too_many_heights (line 852) | fn test_clear_old_data_too_many_heights() {
function test_clear_old_data_too_many_heights_common (line 862) | fn test_clear_old_data_too_many_heights_common(gc_blocks_limit: NumBlock...
function test_fork_chunk_tail_updates (line 943) | fn test_fork_chunk_tail_updates() {
FILE: chain/chain/src/tests/mod.rs
method process_block_test (line 16) | pub(crate) fn process_block_test(
FILE: chain/chain/src/tests/simple_chain.rs
function timestamp (line 16) | fn timestamp(hour: u32, min: u32, sec: u32, millis: u32) -> chrono::Date...
function build_chain (line 22) | fn build_chain() {
function build_chain_with_orphans (line 92) | fn build_chain_with_orphans() {
function build_chain_with_skips_and_forks (line 150) | fn build_chain_with_skips_and_forks() {
function blocks_at_height (line 190) | fn blocks_at_height() {
function next_blocks (line 263) | fn next_blocks() {
FILE: chain/chain/src/tests/sync_chain.rs
function chain_sync_headers (line 7) | fn chain_sync_headers() {
FILE: chain/chain/src/types.rs
type BlockStatus (line 43) | pub enum BlockStatus {
method is_new_head (line 54) | pub fn is_new_head(&self) -> bool {
type Provenance (line 65) | pub enum Provenance {
type AcceptedBlock (line 76) | pub struct AcceptedBlock {
type ApplyResultForResharding (line 83) | pub struct ApplyResultForResharding {
type ReshardingResults (line 94) | pub enum ReshardingResults {
type ApplyChunkResult (line 104) | pub struct ApplyChunkResult {
method compute_outcomes_proof (line 119) | pub fn compute_outcomes_proof(
type BlockEconomicsConfig (line 131) | pub struct BlockEconomicsConfig {
constant MAX_GAS_MULTIPLIER (line 140) | const MAX_GAS_MULTIPLIER: u128 = 20;
method min_gas_price (line 148) | pub fn min_gas_price(&self, protocol_version: ProtocolVersion) -> Bala...
method max_gas_price (line 168) | pub fn max_gas_price(&self, protocol_version: ProtocolVersion) -> Bala...
method gas_price_adjustment_rate (line 179) | pub fn gas_price_adjustment_rate(&self, _protocol_version: ProtocolVer...
method from (line 185) | fn from(chain_genesis: &ChainGenesis) -> Self {
type ChainGenesis (line 197) | pub struct ChainGenesis {
method new (line 235) | pub fn new(genesis: &Genesis) -> Self {
type ChainConfig (line 211) | pub struct ChainConfig {
method test (line 222) | pub fn test() -> Self {
type StorageDataSource (line 251) | pub enum StorageDataSource {
type RuntimeStorageConfig (line 263) | pub struct RuntimeStorageConfig {
method new (line 272) | pub fn new(state_root: StateRoot, use_flat_storage: bool) -> Self {
type ApplyChunkBlockContext (line 284) | pub struct ApplyChunkBlockContext {
method from_header (line 295) | pub fn from_header(header: &BlockHeader, gas_price: Balance) -> Self {
type ApplyChunkShardContext (line 308) | pub struct ApplyChunkShardContext<'a> {
type RuntimeAdapter (line 322) | pub trait RuntimeAdapter: Send + Sync {
method get_tries (line 323) | fn get_tries(&self) -> ShardTries;
method store (line 325) | fn store(&self) -> &Store;
method get_trie_for_shard (line 330) | fn get_trie_for_shard(
method get_view_trie_for_shard (line 339) | fn get_view_trie_for_shard(
method get_flat_storage_manager (line 346) | fn get_flat_storage_manager(&self) -> FlatStorageManager;
method validate_tx (line 355) | fn validate_tx(
method prepare_transactions (line 372) | fn prepare_transactions(
method will_shard_layout_change_next_epoch (line 388) | fn will_shard_layout_change_next_epoch(&self, parent_hash: &CryptoHash...
method get_gc_stop_height (line 391) | fn get_gc_stop_height(&self, block_hash: &CryptoHash) -> BlockHeight;
method apply_chunk (line 396) | fn apply_chunk(
method query (line 406) | fn query(
method obtain_state_part (line 421) | fn obtain_state_part(
method validate_state_part (line 431) | fn validate_state_part(&self, state_root: &StateRoot, part_id: PartId,...
method apply_update_to_children_states (line 433) | fn apply_update_to_children_states(
method apply_state_part (line 443) | fn apply_state_part(
method get_state_root_node (line 456) | fn get_state_root_node(
method validate_state_root_node (line 464) | fn validate_state_root_node(
method get_protocol_config (line 470) | fn get_protocol_config(&self, epoch_id: &EpochId) -> Result<ProtocolCo...
method load_mem_tries_on_startup (line 475) | fn load_mem_tries_on_startup(&self, shard_uids: &[ShardUId]) -> Result...
type LatestKnown (line 481) | pub struct LatestKnown {
function test_block_produce (line 502) | fn test_block_produce() {
function test_execution_outcome_merklization (line 527) | fn test_execution_outcome_merklization() {
FILE: chain/chain/src/update_shard.rs
type NewChunkResult (line 20) | pub struct NewChunkResult {
type OldChunkResult (line 30) | pub struct OldChunkResult {
type ReshardingResult (line 41) | pub struct ReshardingResult {
type ShardUpdateResult (line 49) | pub enum ShardUpdateResult {
type ShardBlockUpdateResult (line 60) | pub enum ShardBlockUpdateResult {
type ReshardingStateRoots (line 67) | type ReshardingStateRoots = HashMap<ShardUId, StateRoot>;
type NewChunkData (line 69) | pub(crate) struct NewChunkData {
type OldChunkData (line 78) | pub(crate) struct OldChunkData {
type ReshardingData (line 85) | pub(crate) struct ReshardingData {
type ShardUpdateReason (line 95) | pub(crate) enum ShardUpdateReason {
type ShardContext (line 109) | pub(crate) struct ShardContext {
type StorageContext (line 122) | pub(crate) struct StorageContext {
function process_shard_update (line 130) | pub(crate) fn process_shard_update(
function process_missing_chunks_range (line 163) | pub(crate) fn process_missing_chunks_range(
function apply_new_chunk (line 194) | pub(crate) fn apply_new_chunk(
function apply_old_chunk (line 267) | fn apply_old_chunk(
function apply_resharding (line 327) | fn apply_resharding(
function apply_resharding_state_changes (line 364) | fn apply_resharding_state_changes(
FILE: chain/chain/src/validate.rs
constant GAS_LIMIT_ADJUSTMENT_FACTOR (line 23) | const GAS_LIMIT_ADJUSTMENT_FACTOR: u64 = 1000;
function validate_chunk_proofs (line 26) | pub fn validate_chunk_proofs(
function validate_transactions_order (line 75) | pub fn validate_transactions_order(transactions: &[SignedTransaction]) -...
function validate_chunk_with_chunk_extra (line 107) | pub fn validate_chunk_with_chunk_extra(
function validate_chunk_with_chunk_extra_and_receipts_root (line 135) | pub fn validate_chunk_with_chunk_extra_and_receipts_root(
function validate_double_sign (line 190) | fn validate_double_sign(
function validate_header_authorship (line 226) | fn validate_header_authorship(
function validate_chunk_authorship (line 237) | fn validate_chunk_authorship(
function validate_chunk_proofs_challenge (line 258) | fn validate_chunk_proofs_challenge(
function validate_chunk_state_challenge (line 310) | fn validate_chunk_state_challenge(
function validate_challenge (line 390) | pub fn validate_challenge(
function make_tx (line 426) | fn make_tx(account_id: &str, seed: &str, nonce: Nonce) -> SignedTransact...
function test_transaction_order_empty (line 440) | pub fn test_transaction_order_empty() {
function test_transaction_order_one_tx (line 446) | pub fn test_transaction_order_one_tx() {
function test_transaction_order_simple (line 452) | pub fn test_transaction_order_simple() {
function test_transaction_order_bad_nonce (line 466) | pub fn test_transaction_order_bad_nonce() {
function test_transaction_order_same_tx (line 478) | pub fn test_transaction_order_same_tx() {
function test_transaction_order_skipped_in_first_batch (line 484) | pub fn test_transaction_order_skipped_in_first_batch() {
function test_transaction_order_skipped_in_2nd_batch (line 495) | pub fn test_transaction_order_skipped_in_2nd_batch() {
FILE: chain/chunks-primitives/src/error.rs
type Error (line 6) | pub enum Error {
method fmt (line 24) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
method from (line 30) | fn from(err: std::io::Error) -> Self {
method from (line 36) | fn from(err: unc_chain_primitives::Error) -> Self {
method from (line 42) | fn from(err: EpochError) -> Self {
FILE: chain/chunks/src/adapter.rs
type ShardsManagerRequestFromClient (line 13) | pub enum ShardsManagerRequestFromClient {
FILE: chain/chunks/src/chunk_cache.rs
constant HEIGHT_HORIZON (line 28) | const HEIGHT_HORIZON: BlockHeightDelta = 1024;
constant MAX_HEIGHTS_AHEAD (line 30) | const MAX_HEIGHTS_AHEAD: BlockHeightDelta = 5;
type EncodedChunksCacheEntry (line 35) | pub struct EncodedChunksCacheEntry {
method from_chunk_header (line 71) | pub fn from_chunk_header(header: ShardChunkHeader) -> Self {
method merge_in_partial_encoded_chunk (line 84) | pub fn merge_in_partial_encoded_chunk(
type EncodedChunksCache (line 51) | pub struct EncodedChunksCache {
method new (line 106) | pub fn new() -> Self {
method get (line 116) | pub fn get(&self, chunk_hash: &ChunkHash) -> Option<&EncodedChunksCach...
method mark_entry_complete (line 121) | pub fn mark_entry_complete(&mut self, chunk_hash: &ChunkHash) {
method mark_entry_validated (line 131) | pub fn mark_entry_validated(&mut self, chunk_hash: &ChunkHash) {
method get_incomplete_chunks (line 140) | pub fn get_incomplete_chunks(
method remove (line 147) | pub fn remove(&mut self, chunk_hash: &ChunkHash) -> Option<EncodedChun...
method remove_chunk_from_incomplete_chunks (line 158) | fn remove_chunk_from_incomplete_chunks(
method get_or_insert_from_header (line 173) | pub fn get_or_insert_from_header(
method height_within_front_horizon (line 195) | pub fn height_within_front_horizon(&self, height: BlockHeight) -> bool {
method height_within_rear_horizon (line 199) | pub fn height_within_rear_horizon(&self, height: BlockHeight) -> bool {
method height_within_horizon (line 203) | pub fn height_within_horizon(&self, height: BlockHeight) -> bool {
method get_chunk_hash_by_height_and_shard (line 207) | pub fn get_chunk_hash_by_height_and_shard(
method merge_in_partial_encoded_chunk (line 217) | pub fn merge_in_partial_encoded_chunk(
method remove_from_cache_if_outside_horizon (line 226) | pub fn remove_from_cache_if_outside_horizon(&mut self, chunk_hash: &Ch...
method update_largest_seen_height (line 236) | pub fn update_largest_seen_height<T>(
method mark_chunk_for_inclusion (line 259) | pub fn mark_chunk_for_inclusion(&mut self, chunk_hash: &ChunkHash) -> ...
function create_chunk_header (line 282) | fn create_chunk_header(height: u64, shard_id: u64) -> ShardChunkHeader {
function test_incomplete_chunks (line 305) | fn test_incomplete_chunks() {
function test_cache_removal (line 329) | fn test_cache_removal() {
FILE: chain/chunks/src/client.rs
type ShardsManagerResponse (line 17) | pub enum ShardsManagerResponse {
type ShardedTransactionPool (line 35) | pub struct ShardedTransactionPool {
method new (line 48) | pub fn new(rng_seed: RngSeed, pool_size_limit: Option<u64>) -> Self {
method get_pool_iterator (line 52) | pub fn get_pool_iterator(&mut self, shard_uid: ShardUId) -> Option<Poo...
method insert_transaction (line 57) | pub fn insert_transaction(
method remove_transactions (line 65) | pub fn remove_transactions(&mut self, shard_uid: ShardUId, transaction...
method random_seed (line 75) | fn random_seed(base_seed: &RngSeed, shard_id: ShardId) -> RngSeed {
method pool_for_shard (line 82) | fn pool_for_shard(&mut self, shard_uid: ShardUId) -> &mut TransactionP...
method reintroduce_transactions (line 94) | pub fn reintroduce_transactions(
method reshard (line 114) | pub fn reshard(&mut self, old_shard_layout: &ShardLayout, new_shard_la...
constant TEST_SEED (line 161) | const TEST_SEED: RngSeed = [3; 32];
function test_random_seed_with_shard_id (line 164) | fn test_random_seed_with_shard_id() {
function test_transaction_pool_resharding (line 183) | fn test_transaction_pool_resharding() {
FILE: chain/chunks/src/lib.rs
constant CHUNK_REQUEST_RETRY (line 142) | pub const CHUNK_REQUEST_RETRY: time::Duration = time::Duration::millisec...
constant CHUNK_REQUEST_SWITCH_TO_OTHERS (line 143) | pub const CHUNK_REQUEST_SWITCH_TO_OTHERS: time::Duration = time::Duratio...
constant CHUNK_REQUEST_SWITCH_TO_FULL_FETCH (line 144) | pub const CHUNK_REQUEST_SWITCH_TO_FULL_FETCH: time::Duration = time::Dur...
constant CHUNK_REQUEST_RETRY_MAX (line 145) | const CHUNK_REQUEST_RETRY_MAX: time::Duration = time::Duration::seconds(...
constant CHUNK_FORWARD_CACHE_SIZE (line 146) | const CHUNK_FORWARD_CACHE_SIZE: usize = 1000;
constant CHUNK_REQUEST_PEER_HORIZON (line 148) | const CHUNK_REQUEST_PEER_HORIZON: BlockHeightDelta = 5;
type ChunkStatus (line 151) | pub enum ChunkStatus {
type ProcessPartialEncodedChunkResult (line 158) | pub enum ProcessPartialEncodedChunkResult {
type ChunkRequestInfo (line 171) | struct ChunkRequestInfo {
type RequestPool (line 183) | struct RequestPool {
method new (line 192) | pub fn new(
method contains_key (line 206) | pub fn contains_key(&self, chunk_hash: &ChunkHash) -> bool {
method len (line 209) | pub fn len(&self) -> usize {
method insert (line 213) | pub fn insert(&mut self, chunk_hash: ChunkHash, chunk_request: ChunkRe...
method get_request_info (line 217) | pub fn get_request_info(&self, chunk_hash: &ChunkHash) -> Option<&Chun...
method remove (line 221) | pub fn remove(&mut self, chunk_hash: &ChunkHash) {
method fetch (line 225) | pub fn fetch(&mut self, current_time: time::Instant) -> Vec<(ChunkHash...
type ShardsManager (line 246) | pub struct ShardsManager {
method new (line 273) | pub fn new(
method update_chain_heads (line 309) | pub fn update_chain_heads(&mut self, head: Tip, header_head: Tip) {
method request_partial_encoded_chunk (line 318) | fn request_partial_encoded_chunk(
method get_random_target_tracking_shard (line 476) | fn get_random_target_tracking_shard(
method get_tracking_shards (line 507) | fn get_tracking_shards(&self, parent_hash: &CryptoHash) -> HashSet<Sha...
method should_wait_for_chunk_forwarding (line 530) | fn should_wait_for_chunk_forwarding(
method request_chunk_single_mark_only (line 559) | fn request_chunk_single_mark_only(&mut self, chunk_header: &ShardChunk...
method request_chunk_single (line 571) | fn request_chunk_single(
method request_chunks (line 671) | pub fn request_chunks(
method request_chunks_for_orphan (line 695) | pub fn request_chunks_for_orphan(
method resend_chunk_requests (line 720) | pub fn resend_chunk_requests(&mut self) {
method receipts_recipient_filter (line 761) | pub fn receipts_recipient_filter<T>(
method process_partial_encoded_chunk_request (line 785) | pub fn process_partial_encoded_chunk_request(
method prepare_partial_encoded_chunk_response (line 821) | fn prepare_partial_encoded_chunk_response(
method prepare_partial_encoded_chunk_response_unsorted (line 832) | fn prepare_partial_encoded_chunk_response_unsorted(
method lookup_partial_encoded_chunk_from_cache (line 896) | fn lookup_partial_encoded_chunk_from_cache(
method lookup_partial_encoded_chunk_from_partial_chunk_storage (line 923) | pub fn lookup_partial_encoded_chunk_from_partial_chunk_storage(
method lookup_partial_encoded_chunk_from_chunk_storage (line 948) | pub fn lookup_partial_encoded_chunk_from_chunk_storage(
method check_chunk_complete (line 1037) | pub fn check_chunk_complete(
method validate_part (line 1074) | fn validate_part(
method decode_encoded_chunk_if_complete (line 1091) | fn decode_encoded_chunk_if_complete(
method validate_partial_encoded_chunk_forward (line 1121) | fn validate_partial_encoded_chunk_forward(
method get_partial_encoded_chunk_header (line 1158) | fn get_partial_encoded_chunk_header(
method insert_forwarded_chunk (line 1177) | fn insert_forwarded_chunk(&mut self, forward: PartialEncodedChunkForwa...
method process_partial_encoded_chunk_forward (line 1208) | pub fn process_partial_encoded_chunk_forward(
method validate_chunk_header (line 1266) | fn validate_chunk_header(&self, header: &ShardChunkHeader) -> Result<(...
method insert_header_if_not_exists_and_process_cached_chunk_forwards (line 1342) | fn insert_header_if_not_exists_and_process_cached_chunk_forwards(
method process_partial_encoded_chunk (line 1391) | pub fn process_partial_encoded_chunk(
method process_partial_encoded_chunk_response (line 1528) | pub fn process_partial_encoded_chunk_response(
method process_chunk_header_from_block (line 1542) | pub fn process_chunk_header_from_block(
method try_process_chunk_parts_and_receipts (line 1556) | fn try_process_chunk_parts_and_receipts(
method complete_chunk (line 1695) | fn complete_chunk(
method check_incomplete_chunks (line 1715) | pub fn check_incomplete_chunks(&mut self, prev_block_hash: &CryptoHash) {
method send_partial_encoded_chunk_to_chunk_trackers (line 1740) | fn send_partial_encoded_chunk_to_chunk_trackers(
method has_all_receipts (line 1823) | fn has_all_receipts(
method has_all_parts (line 1842) | fn has_all_parts(
method create_encoded_shard_chunk (line 1863) | pub fn create_encoded_shard_chunk(
method distribute_encoded_chunk (line 1904) | pub fn distribute_encoded_chunk(
method handle_client_request (line 1982) | pub fn handle_client_request(&mut self, request: ShardsManagerRequestF...
method handle_network_request (line 2027) | pub fn handle_network_request(&mut self, request: ShardsManagerRequest...
type PartialEncodedChunkResponseSource (line 2076) | pub enum PartialEncodedChunkResponseSource {
method name_for_metrics (line 2090) | pub fn name_for_metrics(&self) -> &'static str {
function test_request_partial_encoded_chunk_from_self (line 2123) | fn test_request_partial_encoded_chunk_from_self() {
function test_resend_chunk_requests (line 2183) | fn test_resend_chunk_requests() {
function test_invalid_chunk (line 2256) | fn test_invalid_chunk() {
function test_chunk_forwarding_dedup (line 2284) | fn test_chunk_forwarding_dedup() {
type RequestChunksResult (line 2343) | struct RequestChunksResult {
function run_request_chunks_with_account (line 2350) | fn run_request_chunks_with_account(
function test_chunk_forward_non_validator (line 2399) | fn test_chunk_forward_non_validator() {
function test_receive_forward_before_header (line 2437) | fn test_receive_forward_before_header() {
function test_receive_forward_before_chunk_header_from_block (line 2509) | fn test_receive_forward_before_chunk_header_from_block() {
function test_chunk_cache_hit_for_produced_chunk (line 2571) | fn test_chunk_cache_hit_for_produced_chunk() {
function test_chunk_cache_hit_for_received_chunk (line 2605) | fn test_chunk_cache_hit_for_received_chunk() {
function test_chunk_response_for_uncached_partial_chunk (line 2636) | fn test_chunk_response_for_uncached_partial_chunk() {
function test_chunk_response_for_uncached_shard_chunk (line 2668) | fn test_chunk_response_for_uncached_shard_chunk() {
function test_chunk_response_combining_cache_and_partial_chunks (line 2701) | fn test_chunk_response_combining_cache_and_partial_chunks() {
function test_chunk_response_combining_cache_and_shard_chunks (line 2740) | fn test_chunk_response_combining_cache_and_shard_chunks() {
function test_chunk_response_combining_cache_and_partial_chunks_with_some_missing (line 2785) | fn test_chunk_response_combining_cache_and_partial_chunks_with_some_miss...
function test_chunk_response_empty_request (line 2826) | fn test_chunk_response_empty_request() {
function test_chunk_response_for_nonexistent_chunk (line 2850) | fn test_chunk_response_for_nonexistent_chunk() {
function test_chunk_response_for_request_including_invalid_part_ord (line 2874) | fn test_chunk_response_for_request_including_invalid_part_ord() {
function test_chunk_response_for_request_with_duplicate_part_ords (line 2907) | fn test_chunk_response_for_request_with_duplicate_part_ords() {
function test_report_chunk_for_inclusion_to_client (line 2940) | fn test_report_chunk_for_inclusion_to_client() {
FILE: chain/chunks/src/logic.rs
function need_receipt (line 17) | pub fn need_receipt(
function need_part (line 27) | pub fn need_part(
function cares_about_shard_this_or_next_epoch (line 37) | pub fn cares_about_shard_this_or_next_epoch(
function chunk_needs_to_be_fetched_from_archival (line 49) | pub fn chunk_needs_to_be_fetched_from_archival(
function make_outgoing_receipts_proofs (line 73) | pub fn make_outgoing_receipts_proofs(
function make_partial_encoded_chunk_from_owned_parts_and_needed_receipts (line 98) | pub fn make_partial_encoded_chunk_from_owned_parts_and_needed_receipts<'a>(
function decode_encoded_chunk (line 138) | pub fn decode_encoded_chunk(
function create_partial_chunk (line 189) | fn create_partial_chunk(
function persist_chunk (line 228) | pub fn persist_chunk(
FILE: chain/chunks/src/shards_manager_actor.rs
type ShardsManagerActor (line 20) | pub struct ShardsManagerActor {
method new (line 26) | fn new(shards_mgr: ShardsManager, chunk_request_retry_period: Duration...
method periodically_resend_chunk_requests (line 30) | fn periodically_resend_chunk_requests(&mut self, ctx: &mut Context<Sel...
type Result (line 52) | type Result = ();
method handle (line 55) | fn handle(
type Result (line 65) | type Result = ();
method handle (line 68) | fn handle(
type Context (line 44) | type Context = Context<Self>;
method started (line 46) | fn started(&mut self, ctx: &mut Self::Context) {
function start_shards_manager (line 77) | pub fn start_shards_manager(
FILE: chain/chunks/src/test/basic.rs
type TestData (line 35) | struct TestData {
method new (line 45) | fn new(shards_manager: ShardsManager, chain: MockChainForShardsManager...
type TestEvent (line 51) | enum TestEvent {
type ShardsManagerTestLoopBuilder (line 60) | type ShardsManagerTestLoopBuilder = unc_async::test_loop::TestLoopBuilde...
function test_basic_receive_complete_chunk (line 65) | fn test_basic_receive_complete_chunk() {
function test_chunk_forward (line 139) | fn test_chunk_forward() {
FILE: chain/chunks/src/test/multi.rs
type TestData (line 32) | struct TestData {
type TestEvent (line 40) | enum TestEvent {
type ShardsManagerTestLoop (line 48) | type ShardsManagerTestLoop = unc_async::test_loop::TestLoop<Vec<TestData...
type ShardsManagerTestLoopBuilder (line 49) | type ShardsManagerTestLoopBuilder = unc_async::test_loop::TestLoopBuilde...
type BasicSetupConfig (line 51) | struct BasicSetupConfig {
constant NETWORK_DELAY (line 59) | const NETWORK_DELAY: time::Duration = time::Duration::milliseconds(10);
function basic_setup (line 61) | fn basic_setup(config: BasicSetupConfig) -> ShardsManagerTestLoop {
function test_distribute_chunk_basic (line 113) | fn test_distribute_chunk_basic() {
function test_distribute_chunk_track_all_shards (line 174) | fn test_distribute_chunk_track_all_shards() {
function test_distribute_chunk_with_chunk_only_producers (line 225) | fn test_distribute_chunk_with_chunk_only_producers() {
FILE: chain/chunks/src/test_loop.rs
function forward_client_request_to_shards_manager (line 39) | pub fn forward_client_request_to_shards_manager(
function forward_network_request_to_shards_manager (line 46) | pub fn forward_network_request_to_shards_manager(
function route_shards_manager_network_messages (line 58) | pub fn route_shards_manager_network_messages<
type ShardsManagerResendChunkRequests (line 146) | pub struct ShardsManagerResendChunkRequests;
function periodically_resend_chunk_requests (line 149) | pub fn periodically_resend_chunk_requests(
type MockChainForShardsManager (line 159) | pub struct MockChainForShardsManager {
method new (line 178) | pub fn new(store: Store, config: MockChainForShardsManagerConfig) -> S...
method record_block (line 202) | pub fn record_block(&mut self, last: CryptoHash, height: BlockHeight) {
method request_chunk_for_block (line 219) | pub fn request_chunk_for_block(&mut self, chunk_header: ShardChunkHead...
method next_chunk_producer (line 244) | pub fn next_chunk_producer(&mut self, shard_id: ShardId) -> AccountId {
method produce_chunk_signed_by_chunk_producer (line 252) | pub fn produce_chunk_signed_by_chunk_producer(
method produce_chunk (line 295) | pub fn produce_chunk(&mut self, shard_id: ShardId) -> TestChunkEncoder {
method distribute_chunk (line 301) | pub fn distribute_chunk(&mut self, chunk: &TestChunkEncoder) {
method cares_about_shard_this_or_next_epoch (line 312) | pub fn cares_about_shard_this_or_next_epoch(&self, shard_id: ShardId) ...
type MockChainForShardsManagerConfig (line 167) | pub struct MockChainForShardsManagerConfig {
type TestChunkEncoder (line 324) | pub struct TestChunkEncoder {
method new (line 331) | pub fn new(
method part_ords (line 346) | pub fn part_ords(&self) -> Vec<u64> {
method make_partial_encoded_chunk (line 350) | pub fn make_partial_encoded_chunk(
method header (line 377) | pub fn header(&self) -> ShardChunkHeader {
FILE: chain/chunks/src/test_utils.rs
type ChunkTestFixture (line 30) | pub struct ChunkTestFixture {
method new (line 57) | pub fn new(
method make_partial_encoded_chunk (line 196) | pub fn make_partial_encoded_chunk(&self, part_ords: &[u64]) -> Partial...
method count_chunk_completion_messages (line 210) | pub fn count_chunk_completion_messages(&self) -> usize {
method count_chunk_ready_for_inclusion_messages (line 220) | pub fn count_chunk_ready_for_inclusion_messages(&self) -> usize {
method default (line 51) | fn default() -> Self {
function tip (line 232) | pub fn tip(epoch_manager: &dyn EpochManagerAdapter, last_block_hash: Cry...
function default_tip (line 246) | pub fn default_tip() -> Tip {
type MockClientAdapterForShardsManager (line 258) | pub struct MockClientAdapterForShardsManager {
method send (line 263) | fn send(&self, msg: ShardsManagerResponse) {
method pop (line 269) | pub fn pop(&self) -> Option<ShardsManagerResponse> {
method pop_most_recent (line 272) | pub fn pop_most_recent(&self) -> Option<ShardsManagerResponse> {
type SynchronousShardsManagerAdapter (line 282) | pub struct SynchronousShardsManagerAdapter {
method send (line 289) | fn send(&self, msg: ShardsManagerRequestFromClient) {
method send (line 296) | fn send(&self, msg: ShardsManagerRequestFromNetwork) {
method new (line 303) | pub fn new(shards_manager: ShardsManager) -> Self {
FILE: chain/client-primitives/src/debug.rs
type TrackedShardsView (line 20) | pub struct TrackedShardsView {
type EpochInfoView (line 26) | pub struct EpochInfoView {
type DebugChunkStatus (line 38) | pub struct DebugChunkStatus {
type DebugBlockStatus (line 48) | pub struct DebugBlockStatus {
type MissedHeightInfo (line 64) | pub struct MissedHeightInfo {
type DebugBlockStatusData (line 70) | pub struct DebugBlockStatusData {
type ApprovalHistoryEntry (line 80) | pub struct ApprovalHistoryEntry {
type ChunkProduction (line 96) | pub struct ChunkProduction {
type BlockProduction (line 106) | pub struct BlockProduction {
type ChunkCollection (line 119) | pub struct ChunkCollection {
type ProductionAtHeight (line 133) | pub struct ProductionAtHeight {
type ApprovalAtHeightStatus (line 143) | pub struct ApprovalAtHeightStatus {
type ValidatorStatus (line 151) | pub struct ValidatorStatus {
type DebugStatus (line 171) | pub enum DebugStatus {
type Result (line 191) | type Result = Result<DebugStatusResponse, StatusError>;
type DebugStatusResponse (line 195) | pub enum DebugStatusResponse {
FILE: chain/client-primitives/src/types.rs
type Error (line 32) | pub enum Error {
method from (line 46) | fn from(err: unc_primitives::errors::EpochError) -> Self {
type DownloadStatus (line 52) | pub struct DownloadStatus {
method new (line 63) | pub fn new(now: DateTime<Utc>) -> Self {
method clone (line 79) | fn clone(&self) -> Self {
type ShardSyncStatus (line 95) | pub enum ShardSyncStatus {
method repr (line 107) | pub fn repr(&self) -> u8 {
method eq (line 123) | fn eq(&self, other: &Self) -> bool {
method to_string (line 131) | fn to_string(&self) -> String {
method from (line 146) | fn from(status: &DownloadStatus) -> Self {
method from (line 152) | fn from(download: ShardSyncDownload) -> Self {
type ShardSyncDownload (line 162) | pub struct ShardSyncDownload {
method new_download_state_header (line 174) | pub fn new_download_state_header(now: DateTime<Utc>) -> Self {
method new_download_state_parts (line 182) | pub fn new_download_state_parts(now: DateTime<Utc>, num_parts: u64) ->...
function format_shard_sync_phase_per_shard (line 193) | pub fn format_shard_sync_phase_per_shard(
function paint (line 206) | fn paint(s: &str, style: Style, use_style: bool) -> String {
function format_shard_sync_phase (line 215) | pub fn format_shard_sync_phase(
type StateSyncStatus (line 243) | pub struct StateSyncStatus {
method fmt (line 250) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
type SyncStatus (line 270) | pub enum SyncStatus {
method as_variant_name (line 307) | pub fn as_variant_name(&self) -> &str {
method is_syncing (line 312) | pub fn is_syncing(&self) -> bool {
method repr (line 319) | pub fn repr(&self) -> u8 {
method start_height (line 332) | pub fn start_height(&self) -> Option<BlockHeight> {
method update (line 340) | pub fn update(&mut self, new_value: Self) {
method from (line 349) | fn from(status: SyncStatus) -> Self {
type GetProvider (line 375) | pub struct GetProvider(pub EpochId, pub BlockHeight);
type GetProviderError (line 378) | pub enum GetProviderError {
method from (line 408) | fn from(error: EpochError) -> Self {
function from (line 394) | fn from(error: unc_chain_primitives::Error) -> Self {
type Result (line 414) | type Result = Result<AccountId, crate::types::GetProviderError>;
type GetAllMiners (line 419) | pub struct GetAllMiners(pub CryptoHash);
type GetAllMinersError (line 422) | pub enum GetAllMinersError {
function from (line 436) | fn from(error: unc_chain_primitives::Error) -> Self {
function from (line 450) | fn from(error: EpochError) -> Self {
type Result (line 456) | type Result = Result<AllMinersView, crate::types::GetAllMinersError>;
type GetBlock (line 461) | pub struct GetBlock(pub BlockReference);
method latest (line 494) | pub fn latest() -> Self {
type GetBlockError (line 464) | pub enum GetBlockError {
method from (line 480) | fn from(error: unc_chain_primitives::Error) -> Self {
type Result (line 500) | type Result = Result<BlockView, GetBlockError>;
type GetBlockWithMerkleTree (line 505) | pub struct GetBlockWithMerkleTree(pub BlockReference);
method latest (line 508) | pub fn latest() -> Self {
type Result (line 514) | type Result = Result<(BlockView, Arc<PartialMerkleTree>), GetBlockError>;
type GetChunk (line 519) | pub enum GetChunk {
type Result (line 526) | type Result = Result<ChunkView, GetChunkError>;
type GetChunkError (line 530) | pub enum GetChunkError {
method from (line 548) | fn from(error: unc_chain_primitives::Error) -> Self {
type Query (line 569) | pub struct Query {
method new (line 575) | pub fn new(block_reference: BlockReference, request: QueryRequest) -> ...
type Result (line 581) | type Result = Result<QueryResponse, QueryError>;
type QueryError (line 585) | pub enum QueryError {
type Status (line 656) | pub struct Status {
type StatusError (line 663) | pub enum StatusError {
method from (line 681) | fn from(error: unc_chain_primitives::error::Error) -> Self {
type Result (line 699) | type Result = Result<StatusResponse, StatusError>;
type GetNextLightClientBlock (line 703) | pub struct GetNextLightClientBlock {
type GetNextLightClientBlockError (line 708) | pub enum GetNextLightClientBlockError {
method from (line 724) | fn from(error: unc_chain_primitives::error::Error) -> Self {
type Result (line 741) | type Result = Result<Option<Arc<LightClientBlockView>>, GetNextLightClie...
type GetNetworkInfo (line 745) | pub struct GetNetworkInfo {}
type Result (line 748) | type Result = Result<NetworkInfoResponse, String>;
type GetGasPrice (line 752) | pub struct GetGasPrice {
type Result (line 757) | type Result = Result<GasPriceView, GetGasPriceError>;
type GetGasPriceError (line 761) | pub enum GetGasPriceError {
method from (line 775) | fn from(error: unc_chain_primitives::Error) -> Self {
type PeerInfo (line 789) | pub struct PeerInfo {
type KnownProducer (line 796) | pub struct KnownProducer {
type NetworkInfoResponse (line 804) | pub struct NetworkInfoResponse {
type TxStatus (line 816) | pub struct TxStatus {
type TxStatusError (line 823) | pub enum TxStatusError {
method from (line 831) | fn from(error: unc_chain_primitives::Error) -> Self {
type Result (line 837) | type Result = Result<TxStatusView, TxStatusError>;
type GetValidatorInfo (line 841) | pub struct GetValidatorInfo {
type Result (line 846) | type Result = Result<EpochValidatorInfo, GetValidatorInfoError>;
type GetProviderInfoError (line 850) | pub enum GetProviderInfoError {
function from (line 866) | fn from(error: unc_chain_primitives::Error) -> Self {
type GetValidatorInfoError (line 876) | pub enum GetValidatorInfoError {
method from (line 892) | fn from(error: unc_chain_primitives::Error) -> Self {
type GetValidatorOrdered (line 903) | pub struct GetValidatorOrdered {
type Result (line 908) | type Result = Result<Vec<ValidatorPowerAndPledgeView>, GetValidatorInfoE...
type GetStateChanges (line 912) | pub struct GetStateChanges {
type GetStateChangesError (line 918) | pub enum GetStateChangesError {
method from (line 934) | fn from(error: unc_chain_primitives::Error) -> Self {
type Result (line 948) | type Result = Result<StateChangesView, GetStateChangesError>;
type GetStateChangesInBlock (line 952) | pub struct GetStateChangesInBlock {
type Result (line 957) | type Result = Result<StateChangesKindsView, GetStateChangesError>;
type GetStateChangesWithCauseInBlock (line 961) | pub struct GetStateChangesWithCauseInBlock {
type Result (line 966) | type Result = Result<StateChangesView, GetStateChangesError>;
type GetStateChangesWithCauseInBlockForTrackedShards (line 970) | pub struct GetStateChangesWithCauseInBlockForTrackedShards {
type Result (line 976) | type Result = Result<HashMap<ShardId, StateChangesView>, GetStateChanges...
type GetExecutionOutcome (line 980) | pub struct GetExecutionOutcome {
type GetExecutionOutcomeError (line 985) | pub enum GetExecutionOutcomeError {
method from (line 1013) | fn from(error: TxStatusError) -> Self {
method from (line 1024) | fn from(error: unc_chain_primitives::error::Error) -> Self {
type GetExecutionOutcomeResponse (line 1037) | pub struct GetExecutionOutcomeResponse {
type Result (line 1043) | type Result = Result<GetExecutionOutcomeResponse, GetExecutionOutcomeErr...
type GetExecutionOutcomesForBlock (line 1047) | pub struct GetExecutionOutcomesForBlock {
type Result (line 1052) | type Result = Result<HashMap<ShardId, Vec<ExecutionOutcomeWithIdView>>, ...
type GetBlockProof (line 1056) | pub struct GetBlockProof {
type GetBlockProofResponse (line 1061) | pub struct GetBlockProofResponse {
type GetBlockProofError (line 1067) | pub enum GetBlockProofError {
method from (line 1081) | fn from(error: unc_chain_primitives::error::Error) -> Self {
type Result (line 1095) | type Result = Result<GetBlockProofResponse, GetBlockProofError>;
type GetReceipt (line 1099) | pub struct GetReceipt {
type GetReceiptError (line 1104) | pub enum GetReceiptError {
method from (line 1118) | fn from(error: unc_chain_primitives::Error) -> Self {
type Result (line 1127) | type Result = Result<Option<ReceiptView>, GetReceiptError>;
type GetProtocolConfig (line 1131) | pub struct GetProtocolConfig(pub BlockReference);
type Result (line 1134) | type Result = Result<ProtocolConfigView, GetProtocolConfigError>;
type GetProtocolConfigError (line 1138) | pub enum GetProtocolConfigError {
method from (line 1152) | fn from(error: unc_chain_primitives::Error) -> Self {
type GetMaintenanceWindows (line 1162) | pub struct GetMaintenanceWindows {
type Result (line 1167) | type Result = Result<MaintenanceWindowsView, GetMaintenanceWindowsError>;
type GetMaintenanceWindowsError (line 1171) | pub enum GetMaintenanceWindowsError {
method from (line 1179) | fn from(error: unc_chain_primitives::Error) -> Self {
type GetClientConfig (line 1188) | pub struct GetClientConfig {}
type Result (line 1191) | type Result = Result<ClientConfig, GetClientConfigError>;
type GetClientConfigError (line 1195) | pub enum GetClientConfigError {
method from (line 1207) | fn from(error: unc_chain_primitives::Error) -> Self {
type GetSplitStorageInfo (line 1216) | pub struct GetSplitStorageInfo {}
type Result (line 1219) | type Result = Result<SplitStorageInfoView, GetSplitStorageInfoError>;
type GetSplitStorageInfoError (line 1223) | pub enum GetSplitStorageInfoError {
method from (line 1235) | fn from(error: unc_chain_primitives::Error) -> Self {
method from (line 1244) | fn from(error: std::io::Error) -> Self {
type SandboxMessage (line 1251) | pub enum SandboxMessage {
type SandboxResponse (line 1260) | pub enum SandboxResponse {
type Result (line 1268) | type Result = SandboxResponse;
FILE: chain/client/src/adapter.rs
type TxStatusRequest (line 20) | pub(crate) struct TxStatusRequest {
type TxStatusResponse (line 28) | pub(crate) struct TxStatusResponse(pub Box<FinalExecutionOutcomeView>);
type ProviderRequest (line 33) | pub(crate) struct ProviderRequest(pub EpochId, pub BlockHeight);
type ProviderResponse (line 38) | pub struct ProviderResponse {
type AllMinersRequest (line 45) | pub(crate) struct AllMinersRequest(pub CryptoHash);
type AllMinersResponse (line 50) | pub struct AllMinersResponse {
type BlockRequest (line 58) | pub(crate) struct BlockRequest(pub CryptoHash);
type BlockResponse (line 63) | pub struct BlockResponse {
type BlockApproval (line 71) | pub struct BlockApproval(pub Approval, pub PeerId);
type BlockHeadersRequest (line 76) | pub(crate) struct BlockHeadersRequest(pub Vec<CryptoHash>);
type BlockHeadersResponse (line 81) | pub(crate) struct BlockHeadersResponse(pub Vec<BlockHeader>, pub PeerId);
type StateRequestHeader (line 86) | pub struct StateRequestHeader {
type StateRequestPart (line 94) | pub struct StateRequestPart {
type StateResponse (line 103) | pub struct StateResponse(pub Box<StateResponseInfo>);
type AnnounceAccountRequest (line 110) | pub(crate) struct AnnounceAccountRequest(pub Vec<(AnnounceAccount, Optio...
type SetNetworkInfo (line 114) | pub struct SetNetworkInfo(pub NetworkInfo);
type RecvChallenge (line 118) | pub(crate) struct RecvChallenge(pub Challenge);
type ProcessTxRequest (line 122) | pub struct ProcessTxRequest {
type ProcessTxResponse (line 129) | pub enum ProcessTxResponse {
type ChunkStateWitnessMessage (line 145) | pub struct ChunkStateWitnessMessage(pub ChunkStateWitness);
type ChunkEndorsementMessage (line 149) | pub struct ChunkEndorsementMessage(pub ChunkEndorsement);
type Adapter (line 151) | pub struct Adapter {
method new (line 159) | pub fn new(
method tx_status_request (line 169) | async fn tx_status_request(
method tx_status_response (line 187) | async fn tx_status_response(&self, tx_result: FinalExecutionOutcomeVie...
method state_request_header (line 200) | async fn state_request_header(
method state_request_part (line 219) | async fn state_request_part(
method state_response (line 239) | async fn state_response(&self, info: StateResponseInfo) {
method block_approval (line 246) | async fn block_approval(&self, approval: Approval, peer_id: PeerId) {
method transaction (line 253) | async fn transaction(&self, transaction: SignedTransaction, is_forward...
method block_request (line 273) | async fn block_request(&self, hash: CryptoHash) -> Option<Box<Block>> {
method block_headers_request (line 283) | async fn block_headers_request(&self, hashes: Vec<CryptoHash>) -> Opti...
method block (line 293) | async fn block(&self, block: Block, peer_id: PeerId, was_requested: bo...
method block_headers (line 304) | async fn block_headers(
method challenge (line 322) | async fn challenge(&self, challenge: Challenge) {
method network_info (line 329) | async fn network_info(&self, info: NetworkInfo) {
method announce_account (line 336) | async fn announce_account(
method chunk_state_witness (line 350) | async fn chunk_state_witness(&self, witness: ChunkStateWitness) {
method chunk_endorsement (line 357) | async fn chunk_endorsement(&self, endorsement: ChunkEndorsement) {
FILE: chain/client/src/adversarial.rs
type Inner (line 6) | struct Inner {
type Controls (line 13) | pub struct Controls(std::sync::Arc<Inner>);
method new (line 16) | pub fn new(is_archival: bool) -> Self {
method disable_header_sync (line 20) | pub fn disable_header_sync(&self) -> bool {
method set_disable_header_sync (line 24) | pub fn set_disable_header_sync(&mut self, value: bool) {
method disable_doomslug (line 28) | pub fn disable_doomslug(&self) -> bool {
method set_disable_doomslug (line 32) | pub fn set_disable_doomslug(&self, value: bool) {
method is_archival (line 36) | pub fn is_archival(&self) -> bool {
method new (line 48) | pub const fn new(_is_archival: bool) -> Self {
method disable_header_sync (line 52) | pub const fn disable_header_sync(&self) -> bool {
method disable_doomslug (line 56) | pub const fn disable_doomslug(&self) -> bool {
type Controls (line 45) | pub struct Controls;
method new (line 16) | pub fn new(is_archival: bool) -> Self {
method disable_header_sync (line 20) | pub fn disable_header_sync(&self) -> bool {
method set_disable_header_sync (line 24) | pub fn set_disable_header_sync(&mut self, value: bool) {
method disable_doomslug (line 28) | pub fn disable_doomslug(&self) -> bool {
method set_disable_doomslug (line 32) | pub fn set_disable_doomslug(&self, value: bool) {
method is_archival (line 36) | pub fn is_archival(&self) -> bool {
method new (line 48) | pub const fn new(_is_archival: bool) -> Self {
method disable_header_sync (line 52) | pub const fn disable_header_sync(&self) -> bool {
method disable_doomslug (line 56) | pub const fn disable_doomslug(&self) -> bool {
FILE: chain/client/src/chunk_validation.rs
type ChunkValidator (line 36) | pub struct ChunkValidator {
method new (line 45) | pub fn new(
method start_validating_chunk (line 57) | pub fn start_validating_chunk(
function pre_validate_chunk_state_witness (line 129) | fn pre_validate_chunk_state_witness(
function get_state_transition_validation_params (line 246) | fn get_state_transition_validation_params(
type ChunkStateTransitionValidationParams (line 275) | struct ChunkStateTransitionValidationParams {
type PreValidationOutput (line 282) | struct PreValidationOutput {
function validate_chunk_state_witness (line 288) | fn validate_chunk_state_witness(
function apply_result_to_chunk_extra (line 400) | fn apply_result_to_chunk_extra(
method process_chunk_state_witness (line 419) | pub fn process_chunk_state_witness(&mut self, witness: ChunkStateWitness...
method send_chunk_state_witness_to_chunk_validators (line 427) | pub fn send_chunk_state_witness_to_chunk_validators(
method process_chunk_endorsement (line 482) | pub fn process_chunk_endorsement(
FILE: chain/client/src/client.rs
constant NUM_REBROADCAST_BLOCKS (line 91) | const NUM_REBROADCAST_BLOCKS: usize = 30;
constant CHUNK_HEADERS_FOR_INCLUSION_CACHE_SIZE (line 92) | const CHUNK_HEADERS_FOR_INCLUSION_CACHE_SIZE: usize = 2048;
constant NUM_EPOCH_CHUNK_PRODUCERS_TO_KEEP_IN_BLOCKLIST (line 93) | const NUM_EPOCH_CHUNK_PRODUCERS_TO_KEEP_IN_BLOCKLIST: usize = 1000;
constant EPOCH_SYNC_REQUEST_TIMEOUT (line 97) | pub const EPOCH_SYNC_REQUEST_TIMEOUT: Duration = Duration::from_millis(1...
constant EPOCH_SYNC_PEER_TIMEOUT (line 100) | pub const EPOCH_SYNC_PEER_TIMEOUT: Duration = Duration::from_millis(10);
constant BLOCK_HORIZON (line 102) | const BLOCK_HORIZON: u64 = 500;
constant EPOCH_START_INFO_BLOCKS (line 105) | pub const EPOCH_START_INFO_BLOCKS: u64 = 500;
type AdvProduceBlocksMode (line 111) | pub enum AdvProduceBlocksMode {
type Client (line 116) | pub struct Client {
method update_client_config (line 195) | pub(crate) fn update_client_config(&self, update_client_config: Update...
method new (line 229) | pub fn new(
method check_head_progress_stalled (line 390) | pub fn check_head_progress_stalled(&mut self, stall_timeout: Duration)...
method remove_transactions_for_block (line 403) | pub fn remove_transactions_for_block(
method reintroduce_transactions_for_block (line 433) | pub fn reintroduce_transactions_for_block(
method can_produce_block (line 476) | fn can_produce_block(
method get_chunk_headers_ready_for_inclusion (line 524) | pub fn get_chunk_headers_ready_for_inclusion(
method num_chunk_headers_ready_for_inclusion (line 551) | pub fn num_chunk_headers_ready_for_inclusion(
method produce_block (line 573) | pub fn produce_block(&mut self, height: BlockHeight) -> Result<Option<...
method produce_block_on (line 587) | pub fn produce_block_on(
method produce_chunk (line 811) | pub fn produce_chunk(
method calculate_receipts_root (line 937) | fn calculate_receipts_root(
method maybe_insert_invalid_transaction (line 949) | fn maybe_insert_invalid_transaction(
method prepare_transactions (line 970) | fn prepare_transactions(
method send_challenges (line 1021) | pub fn send_challenges(&mut self, challenges: Vec<ChallengeBody>) {
method receive_block (line 1035) | pub fn receive_block(
method receive_block_impl (line 1085) | pub(crate) fn receive_block_impl(
method check_block_height (line 1141) | fn check_block_height(
method verify_and_rebroadcast_block (line 1178) | fn verify_and_rebroadcast_block(
method start_process_block (line 1223) | pub fn start_process_block(
method postprocess_ready_blocks (line 1283) | pub fn postprocess_ready_blocks(
method process_block_processing_artifact (line 1326) | pub(crate) fn process_block_processing_artifact(
method ban_chunk_producer_for_producing_invalid_chunk (line 1359) | fn ban_chunk_producer_for_producing_invalid_chunk(
method rebroadcast_block (line 1381) | fn rebroadcast_block(&mut self, block: &Block) {
method on_chunk_completed (line 1391) | pub fn on_chunk_completed(
method on_invalid_chunk (line 1411) | pub fn on_invalid_chunk(&mut self, encoded_chunk: EncodedShardChunk) {
method on_chunk_header_ready_for_inclusion (line 1419) | pub fn on_chunk_header_ready_for_inclusion(
method sync_block_headers (line 1433) | pub fn sync_block_headers(
method check_and_update_doomslug_tip (line 1448) | pub fn check_and_update_doomslug_tip(&mut self) -> Result<(), Error> {
method sandbox_update_tip (line 1472) | pub fn sandbox_update_tip(&mut self, height: BlockHeight) -> Result<()...
method sandbox_delta_time (line 1494) | pub fn sandbox_delta_time(&self) -> chrono::Duration {
method send_approval (line 1511) | pub fn send_approval(
method on_block_accepted_with_optional_chunk_produce (line 1540) | pub fn on_block_accepted_with_optional_chunk_produce(
method reconcile_transaction_pool (line 1659) | fn reconcile_transaction_pool(
method produce_chunks (line 1725) | fn produce_chunks(&mut self, block: &Block, validator_id: AccountId) {
method persist_and_distribute_encoded_chunk (line 1780) | pub fn persist_and_distribute_encoded_chunk(
method request_missing_chunks (line 1809) | pub fn request_missing_chunks(
method process_blocks_with_missing_chunks (line 1848) | pub fn process_blocks_with_missing_chunks(
method is_validator (line 1864) | pub fn is_validator(&self, epoch_id: &EpochId, block_hash: &CryptoHash...
method handle_process_approval_error (line 1882) | fn handle_process_approval_error(
method collect_block_approval (line 1932) | pub fn collect_block_approval(&mut self, approval: &Approval, approval...
method forward_tx (line 2052) | fn forward_tx(&self, epoch_id: &EpochId, tx: &SignedTransaction) -> Re...
method process_tx (line 2101) | pub fn process_tx(
method get_next_epoch_id_if_at_boundary (line 2115) | fn get_next_epoch_id_if_at_boundary(&self, head: &Tip) -> Result<Optio...
method possibly_forward_tx_to_next_epoch (line 2136) | fn possibly_forward_tx_to_next_epoch(&mut self, tx: &SignedTransaction...
method process_tx_internal (line 2147) | fn process_tx_internal(
method active_validator (line 2273) | fn active_validator(&self, shard_id: ShardId) -> Result<bool, Error> {
method run_catchup (line 2294) | pub fn run_catchup(
method get_shards_to_split (line 2415) | fn get_shards_to_split(
method should_split_shard (line 2440) | fn should_split_shard(
method process_challenge (line 2459) | pub fn process_challenge(&mut self, _challenge: Challenge) -> Result<(...
method run_flat_storage_creation_step (line 2488) | pub fn run_flat_storage_creation_step(&mut self) -> Result<bool, Error> {
method clear_data (line 2498) | fn clear_data(&mut self) -> Result<(), unc_chain::Error> {
method request_block (line 2524) | pub fn request_block(&self, hash: CryptoHash, peer_id: PeerId) {
method ban_peer (line 2541) | pub fn ban_peer(&self, peer_id: PeerId, ban_reason: ReasonForBan) {
method get_tier1_accounts (line 2563) | fn get_tier1_accounts(&mut self, tip: &Tip) -> Result<Arc<AccountKeys>...
method send_network_chain_info (line 2631) | pub(crate) fn send_network_chain_info(&mut self) -> Result<(), Error> {
method get_catchup_status (line 2647) | pub fn get_catchup_status(&self) -> Result<Vec<CatchupStatusView>, unc...
type BlockDebugStatus (line 206) | pub struct BlockDebugStatus {
method drop (line 2669) | fn drop(&mut self) {
FILE: chain/client/src/client_actor.rs
constant STATUS_WAIT_TIME_MULTIPLIER (line 86) | const STATUS_WAIT_TIME_MULTIPLIER: u64 = 10;
constant HEAD_STALL_MULTIPLIER (line 89) | const HEAD_STALL_MULTIPLIER: u32 = 4;
type ClientActor (line 91) | pub struct ClientActor {
method new (line 155) | pub fn new(
method wrap (line 263) | fn wrap<Req: std::fmt::Debug + actix::Message, Res>(
type Result (line 296) | type Result = Option<u64>;
method handle (line 298) | fn handle(
type Result (line 404) | type Result = ProcessTxResponse;
method handle (line 407) | fn handle(
type Result (line 420) | type Result = ();
method handle (line 423) | fn handle(&mut self, msg: WithSpanContext<BlockResponse>, ctx: &mut Co...
type Result (line 466) | type Result = Result<(), ReasonForBan>;
method handle (line 469) | fn handle(
type Result (line 487) | type Result = ();
method handle (line 490) | fn handle(&mut self, msg: WithSpanContext<BlockApproval>, ctx: &mut Co...
type Result (line 502) | type Result = ();
method handle (line 505) | fn handle(&mut self, msg: WithSpanContext<StateResponse>, ctx: &mut Co...
type Result (line 547) | type Result = ();
method handle (line 550) | fn handle(&mut self, msg: WithSpanContext<RecvChallenge>, ctx: &mut Co...
type Result (line 562) | type Result = ();
method handle (line 565) | fn handle(&mut self, msg: WithSpanContext<SetNetworkInfo>, ctx: &mut C...
type Result (line 576) | type Result = unc_client_primitives::types::SandboxResponse;
method handle (line 578) | fn handle(
type Result (line 615) | type Result = Result<StatusResponse, StatusError>;
method handle (line 618) | fn handle(&mut self, msg: WithSpanContext<Status>, ctx: &mut Context<S...
type Result (line 764) | type Result = Result<NetworkInfoResponse, String>;
method handle (line 767) | fn handle(
type Result (line 801) | type Result = ();
method handle (line 804) | fn handle(
method check_send_announce_account (line 868) | fn check_send_announce_account(&mut self, prev_block_hash: CryptoHash) {
method sandbox_process_fast_forward (line 924) | fn sandbox_process_fast_forward(
method pre_block_production (line 973) | fn pre_block_production(&mut self) -> Result<(), Error> {
method post_block_production (line 987) | fn post_block_production(&mut self) {
method handle_block_production (line 1000) | fn handle_block_production(&mut self) -> Result<(), Error> {
method schedule_triggers (line 1091) | fn schedule_triggers(&mut self, ctx: &mut Context<Self>) {
method check_triggers (line 1111) | fn check_triggers(&mut self, ctx: &mut Context<ClientActor>) -> Durati...
method try_process_unfinished_blocks (line 1219) | fn try_process_unfinished_blocks(&mut self) {
method try_handle_block_production (line 1229) | fn try_handle_block_production(&mut self) {
method try_doomslug_timer (line 1236) | fn try_doomslug_timer(&mut self, _: &mut Context<ClientActor>) {
method produce_block (line 1268) | fn produce_block(&mut self, next_height: BlockHeight) -> Result<(), Er...
method send_chunks_metrics (line 1301) | fn send_chunks_metrics(&mut self, block: &Block) {
method send_block_metrics (line 1316) | fn send_block_metrics(&mut self, block: &Block) {
method process_accepted_blocks (line 1356) | fn process_accepted_blocks(&mut self, accepted_blocks: Vec<CryptoHash>) {
method get_apply_chunks_done_callback (line 1373) | fn get_apply_chunks_done_callback(&self) -> DoneApplyChunkCallback {
method receive_headers (line 1380) | fn receive_headers(&mut self, headers: Vec<BlockHeader>, peer_id: Peer...
method syncing_info (line 1404) | fn syncing_info(&self) -> Result<SyncRequirement, unc_chain::Error> {
method start_flat_storage_creation (line 1445) | fn start_flat_storage_creation(&mut self, ctx: &mut Context<ClientActo...
method start_sync (line 1469) | fn start_sync(&mut self, ctx: &mut Context<ClientActor>) {
method find_sync_hash (line 1493) | fn find_sync_hash(&mut self) -> Result<CryptoHash, unc_chain::Error> {
method catchup (line 1513) | fn catchup(&mut self, ctx: &mut Context<ClientActor>) {
method run_timer (line 1540) | fn run_timer<F>(
method sync_wait_period (line 1564) | fn sync_wait_period(&self) -> Duration {
method run_sync_step (line 1581) | fn run_sync_step(&mut self) {
method sync_block_status (line 1794) | fn sync_block_status(
method log_summary (line 1824) | fn log_summary(&mut self) {
method maybe_receive_state_sync_blocks (line 1839) | fn maybe_receive_state_sync_blocks(&mut self, block: &Block) -> bool {
type Result (line 1876) | type Result = ();
method handle (line 1879) | fn handle(
type Result (line 1896) | type Result = ();
method handle (line 1899) | fn handle(
type Result (line 1920) | type Result = ();
method handle (line 1923) | fn handle(
type Result (line 1940) | type Result = ();
method handle (line 1943) | fn handle(
type Result (line 1971) | type Result = Result<ClientConfig, GetClientConfigError>;
method handle (line 1974) | fn handle(
type Result (line 1987) | type Result = ();
method handle (line 1990) | fn handle(&mut self, msg: WithSpanContext<SyncMessage>, _: &mut Contex...
type Result (line 1999) | type Result = ();
method handle (line 2002) | fn handle(
type Result (line 2015) | type Result = ();
method handle (line 2018) | fn handle(
function wait_until_genesis (line 135) | fn wait_until_genesis(genesis_time: &DateTime<Utc>) {
type Context (line 230) | type Context = Context<Self>;
method started (line 232) | fn started(&mut self, ctx: &mut Self::Context) {
type NetworkAdversarialMessage (line 285) | pub enum NetworkAdversarialMessage {
function make_peer_info (line 743) | fn make_peer_info(from: unc_network::types::PeerInfo) -> unc_client_prim...
function make_known_producer (line 752) | fn make_known_producer(
type ApplyChunksDoneMessage (line 798) | pub struct ApplyChunksDoneMessage;
type SyncRequirement (line 815) | enum SyncRequirement {
method sync_needed (line 823) | fn sync_needed(&self) -> bool {
method to_metrics_string (line 827) | fn to_metrics_string(&self) -> String {
method fmt (line 839) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
method drop (line 1869) | fn drop(&mut self) {
function random_seed_from_thread (line 2031) | pub fn random_seed_from_thread() -> RngSeed {
function start_client (line 2038) | pub fn start_client(
FILE: chain/client/src/config_updater.rs
type ConfigUpdater (line 7) | pub struct ConfigUpdater {
method new (line 16) | pub fn new(
method try_update (line 24) | pub fn try_update(&mut self, update_client_config_fn: &dyn Fn(Updateab...
method report_status (line 42) | pub fn report_status(&self) {
FILE: chain/client/src/debug.rs
constant DEBUG_BLOCKS_TO_FETCH (line 42) | const DEBUG_BLOCKS_TO_FETCH: u32 = 50;
constant DEBUG_EPOCHS_TO_FETCH (line 43) | const DEBUG_EPOCHS_TO_FETCH: u32 = 5;
constant DEBUG_PRODUCTION_OLD_BLOCKS_TO_SHOW (line 46) | const DEBUG_PRODUCTION_OLD_BLOCKS_TO_SHOW: u64 = 50;
constant DEBUG_MAX_PRODUCTION_BLOCKS_TO_SHOW (line 49) | const DEBUG_MAX_PRODUCTION_BLOCKS_TO_SHOW: u64 = 1000;
constant PRODUCTION_TIMES_CACHE_SIZE (line 52) | pub const PRODUCTION_TIMES_CACHE_SIZE: usize = 1000;
type BlockProductionTracker (line 54) | pub struct BlockProductionTracker(lru::LruCache<BlockHeight, BlockProduc...
method new (line 57) | pub(crate) fn new() -> Self {
method get (line 61) | pub(crate) fn get(&mut self, height: BlockHeight) -> BlockProduction {
method record_approvals (line 66) | pub(crate) fn record_approvals(
method record_block_production (line 91) | pub(crate) fn record_block_production(
method record_chunk_collected (line 104) | pub(crate) fn record_chunk_collected(&mut self, height: BlockHeight, s...
method construct_chunk_collection_info (line 118) | pub(crate) fn construct_chunk_collection_info(
type Result (line 148) | type Result = Result<DebugStatusResponse, StatusError>;
method handle (line 151) | fn handle(
method get_producers_for_epoch (line 188) | fn get_producers_for_epoch(
method get_epoch_info_view (line 222) | fn get_epoch_info_view(
method get_next_epoch_view (line 310) | fn get_next_epoch_view(&self) -> Result<EpochInfoView, Error> {
method get_tracked_shards_view (line 333) | fn get_tracked_shards_view(&self) -> Result<TrackedShardsView, unc_chain...
method get_recent_epoch_info (line 358) | fn get_recent_epoch_info(&mut self) -> Result<Vec<EpochInfoView>, unc_ch...
method get_last_blocks_info (line 380) | fn get_last_blocks_info(
method get_validator_status (line 516) | fn get_validator_status(&mut self) -> Result<ValidatorStatus, unc_chain_...
function new_peer_info_view (line 636) | fn new_peer_info_view(chain: &Chain, connected_peer_info: &ConnectedPeer...
function new_network_info_view (line 673) | pub(crate) fn new_network_info_view(chain: &Chain, network_info: &Networ...
FILE: chain/client/src/info.rs
constant TERAGAS (line 34) | const TERAGAS: f64 = 1_000_000_000_000_f64;
type ValidatorInfoHelper (line 36) | struct ValidatorInfoHelper {
type InfoHelper (line 42) | pub struct InfoHelper {
method new (line 75) | pub fn new(
method chunk_processed (line 100) | pub fn chunk_processed(&mut self, shard_id: ShardId, gas_used: Gas, ba...
method chunk_skipped (line 107) | pub fn chunk_skipped(&mut self, shard_id: ShardId) {
method block_processed (line 111) | pub fn block_processed(
method record_tracked_shards (line 141) | fn record_tracked_shards(head: &Tip, client: &crate::client::Client) {
method record_block_producers (line 158) | fn record_block_producers(head: &Tip, client: &crate::client::Client) {
method record_chunk_producers (line 172) | fn record_chunk_producers(head: &Tip, client: &crate::client::Client) {
method record_epoch_settlement_info (line 199) | fn record_epoch_settlement_info(head: &Tip, client: &crate::client::Cl...
method record_protocol_version (line 265) | fn record_protocol_version(head: &Tip, client: &crate::client::Client) {
method log_summary (line 272) | pub fn log_summary(
method info (line 356) | fn info(
method telemetry_info (line 493) | fn telemetry_info(
method log_chain_processing_info (line 542) | fn log_chain_processing_info(&mut self, client: &crate::Client, epoch_...
method update_sync_requirements_metrics (line 561) | pub(crate) fn update_sync_requirements_metrics(&mut self, new_sync_req...
function extra_telemetry_info (line 589) | fn extra_telemetry_info(client_config: &ClientConfig) -> serde_json::Val...
function display_catchup_status (line 598) | pub fn display_catchup_status(catchup_status: Vec<CatchupStatusView>) ->...
function display_sync_status (line 628) | pub fn display_sync_status(
type FormatMillis (line 693) | struct FormatMillis(&'static str, Option<u128>);
method fmt (line 696) | fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type BlocksInfo (line 704) | struct BlocksInfo {
method fmt (line 710) | fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type PrettyNumber (line 759) | struct PrettyNumber(u64, &'static str);
method bytes_per_sec (line 762) | fn bytes_per_sec(bps: u64) -> Self {
method bytes (line 766) | fn bytes(bytes: u64) -> Self {
method gas_per_sec (line 770) | fn gas_per_sec(gps: u64) -> Self {
method fmt (line 776) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ValidatorProductionStats (line 806) | pub struct ValidatorProductionStats {
method kickout (line 818) | pub fn kickout(kickout: ValidatorKickoutView) -> Self {
method validator (line 830) | pub fn validator(info: CurrentEpochValidatorInfo) -> Self {
function get_validator_epoch_stats (line 845) | fn get_validator_epoch_stats(
function test_pretty_number (line 872) | fn test_pretty_number() {
function telemetry_info (line 892) | fn telemetry_info() {
FILE: chain/client/src/metrics.rs
function export_version (line 384) | pub(crate) fn export_version(uncd_version: &unc_primitives::version::Ver...
FILE: chain/client/src/sync/adapter.rs
type SyncShardInfo (line 19) | pub struct SyncShardInfo {
type SyncMessage (line 27) | pub enum SyncMessage {
type ActorHandler (line 34) | struct ActorHandler {
type SyncAdapter (line 43) | pub struct SyncAdapter {
method new (line 53) | pub fn new(
method start (line 61) | pub fn start(&mut self, shard_uid: ShardUId) {
method stop (line 74) | pub fn stop(&mut self, shard_uid: ShardUId) {
method stop_all (line 78) | pub fn stop_all(&mut self) {
method send (line 85) | pub fn send<M>(&self, shard_uid: ShardUId, msg: M)
method send (line 113) | async fn send(&self, shard_uid: ShardUId, msg: StateSyncResponse) {
FILE: chain/client/src/sync/block.rs
constant MAX_BLOCK_REQUESTS (line 17) | const MAX_BLOCK_REQUESTS: usize = 5;
constant BLOCK_REQUEST_TIMEOUT_MS (line 20) | const BLOCK_REQUEST_TIMEOUT_MS: i64 = 2_000;
type BlockSyncRequest (line 23) | pub struct BlockSyncRequest {
type BlockSync (line 31) | pub struct BlockSync {
method new (line 48) | pub fn new(
method run (line 65) | pub fn run(
method check_state_needed (line 102) | fn check_state_needed(&self, head: &Tip, header_head: &Tip) -> bool {
method get_last_processed_block (line 129) | fn get_last_processed_block(&self, chain: &Chain) -> Result<CryptoHash...
method block_sync (line 171) | fn block_sync(
method block_sync_due (line 262) | fn block_sync_due(&mut self, head: &Tip, header_head: &Tip) -> BlockSy...
type BlockSyncDue (line 292) | enum BlockSyncDue {
function collect_hashes_from_network_adapter (line 321) | fn collect_hashes_from_network_adapter(
function check_hashes_from_network_adapter (line 337) | fn check_hashes_from_network_adapter(
function create_highest_height_peer_infos (line 345) | fn create_highest_height_peer_infos(num_peers: usize) -> Vec<HighestHeig...
function test_block_sync (line 363) | fn test_block_sync() {
function test_block_sync_archival (line 443) | fn test_block_sync_archival() {
FILE: chain/client/src/sync/epoch.rs
type EpochSync (line 14) | pub struct EpochSync {
method new (line 54) | pub fn new(
FILE: chain/client/src/sync/external.rs
type ExternalConnection (line 12) | pub enum ExternalConnection {
method get_part (line 33) | pub async fn get_part(
method put_state_part (line 83) | pub async fn put_state_part(
method put_state_part_impl (line 100) | async fn put_state_part_impl(
method extract_file_name_from_full_path (line 137) | fn extract_file_name_from_full_path(full_path: String) -> String {
method extract_file_name_from_path_buf (line 141) | fn extract_file_name_from_path_buf(path_buf: PathBuf) -> String {
method list_state_parts (line 148) | pub async fn list_state_parts(
constant GCS_ENCODE_SET (line 29) | const GCS_ENCODE_SET: &percent_encoding::AsciiSet =
function external_storage_location (line 209) | pub fn external_storage_location(
function external_storage_location_directory (line 224) | pub fn external_storage_location_directory(
function location_prefix (line 233) | pub fn location_prefix(
function part_filename (line 245) | pub fn part_filename(part_id: u64, num_parts: u64) -> String {
function match_filename (line 249) | pub fn match_filename(s: &str) -> Option<regex::Captures> {
function is_part_filename (line 254) | pub fn is_part_filename(s: &str) -> bool {
function get_num_parts_from_filename (line 258) | pub fn get_num_parts_from_filename(s: &str) -> Option<u64> {
function get_part_id_from_filename (line 269) | pub fn get_part_id_from_filename(s: &str) -> Option<u64> {
function create_bucket_readonly (line 280) | pub fn create_bucket_readonly(
type S3CredentialsConfig (line 290) | struct S3CredentialsConfig {
function create_bucket_readwrite (line 295) | pub fn create_bucket_readwrite(
function create_bucket (line 320) | fn create_bucket(
function random_string (line 341) | fn random_string(rand_len: usize) -> String {
function test_match_filename (line 346) | fn test_match_filename() {
function test_gcs_upload_list_download (line 362) | fn test_gcs_upload_list_download() {
FILE: chain/client/src/sync/header.rs
constant MAX_BLOCK_HEADERS (line 18) | pub const MAX_BLOCK_HEADERS: u64 = 512;
constant MAX_BLOCK_HEADER_HASHES (line 21) | pub const MAX_BLOCK_HEADER_HASHES: usize = 20;
constant NS_PER_SECOND (line 23) | pub const NS_PER_SECOND: u128 = 1_000_000_000;
type BatchProgress (line 26) | struct BatchProgress {
type HeaderSync (line 38) | pub struct HeaderSync {
method new (line 65) | pub fn new(
method run (line 92) | pub fn run(
method compute_expected_height (line 156) | fn compute_expected_height(
method header_sync_due (line 173) | pub(crate) fn header_sync_due(
method made_enough_progress (line 292) | fn made_enough_progress(
method request_headers (line 307) | fn request_headers(
method get_locator (line 335) | fn get_locator(&mut self, chain: &Chain) -> Result<Vec<CryptoHash>, un...
function get_locator_ordinals (line 355) | fn get_locator_ordinals(lowest_ordinal: u64, highest_ordinal: u64) -> Ve...
function test_get_locator_ordinals (line 396) | fn test_get_locator_ordinals() {
function test_sync_headers_fork (line 436) | fn test_sync_headers_fork() {
function test_sync_headers_fork_from_final_block (line 522) | fn test_sync_headers_fork_from_final_block() {
function test_slow_header_sync (line 629) | fn test_slow_header_sync() {
function test_sync_from_very_behind (line 726) | fn test_sync_from_very_behind() {
FILE: chain/client/src/sync/state.rs
constant MAX_STATE_PART_REQUEST (line 65) | pub const MAX_STATE_PART_REQUEST: u64 = 16;
constant MAX_PENDING_PART (line 68) | pub const MAX_PENDING_PART: u64 = MAX_STATE_PART_REQUEST * 10000;
constant STATE_DUMP_ITERATION_TIME_LIMIT_SECS (line 71) | pub const STATE_DUMP_ITERATION_TIME_LIMIT_SECS: u64 = 300;
type StateSyncResult (line 73) | pub enum StateSyncResult {
type PendingRequestStatus (line 80) | struct PendingRequestStatus {
method new (line 87) | fn new(timeout: Duration) -> Self {
method expired (line 90) | fn expired(&self) -> bool {
type StateSyncGetPartResult (line 97) | pub struct StateSyncGetPartResult {
type StateSyncInner (line 107) | enum StateSyncInner {
type StateSync (line 128) | pub struct StateSync {
method new (line 152) | pub fn new(
method sync_shards_status (line 213) | fn sync_shards_status(
method process_downloaded_parts (line 361) | fn process_downloaded_parts(
method set_apply_result (line 400) | pub fn set_apply_result(
method set_resharding_result (line 409) | pub fn set_resharding_result(
method get_epoch_start_sync_hash (line 418) | pub fn get_epoch_start_sync_hash(
method received_requested_part (line 441) | pub fn received_requested_part(
method select_peers (line 470) | fn select_peers(
method request_shard (line 494) | fn request_shard(
method request_shard_header (line 540) | fn request_shard_header(
method request_shard_parts (line 573) | fn request_shard_parts(
method run (line 658) | pub fn run(
method update_download_on_state_response_message (line 711) | pub fn update_download_on_state_response_message(
method sync_shards_download_header_status (line 782) | fn sync_shards_download_header_status(
method sync_shards_download_parts_status (line 828) | fn sync_shards_download_parts_status(
method sync_shards_download_scheduling_status (line 885) | fn sync_shards_download_scheduling_status(
method sync_shards_download_applying_status (line 923) | fn sync_shards_download_applying_status(
method sync_shards_download_complete_status (line 958) | fn sync_shards_download_complete_status(
method sync_shards_resharding_scheduling_status (line 978) | fn sync_shards_resharding_scheduling_status(
method sync_shards_resharding_applying_status (line 999) | fn sync_shards_resharding_applying_status(
function parts_to_fetch (line 1023) | fn parts_to_fetch(
function request_part_from_external_storage (line 1035) | fn request_part_from_external_storage(
function request_part_from_peers (line 1112) | fn request_part_from_peers(
function sent_request_part (line 1145) | fn sent_request_part(
function process_part_response (line 1167) | fn process_part_response(
type SamplerLimited (line 1216) | struct SamplerLimited<T> {
function new (line 1222) | fn new(data: Vec<T>, limit: u64) -> Self {
type Item (line 1233) | type Item = T;
method next (line 1235) | fn next(&mut self) -> Option<Self::Item> {
function test_ask_for_header (line 1277) | fn test_ask_for_header() {
FILE: chain/client/src/sync/sync_actor.rs
type MessageSenders (line 12) | struct MessageSenders {
type SyncActor (line 21) | pub struct SyncActor {
method new (line 31) | pub fn new(
method handle_client_sync_message (line 43) | fn handle_client_sync_message(&mut self, msg: ClientSyncMessage) {
method handle_network_sync_message (line 62) | fn handle_network_sync_message(&mut self, msg: StateSyncResponse) {
type Context (line 76) | type Context = actix::Context<Self>;
method started (line 78) | fn started(&mut self, _ctx: &mut Self::Context) {
method stopped (line 82) | fn stopped(&mut self, _ctx: &mut Self::Context) {
type Result (line 89) | type Result = ();
method handle (line 91) | fn handle(
type Result (line 103) | type Result = ();
method handle (line 105) | fn handle(
FILE: chain/client/src/sync_jobs_actor.rs
type SyncJobsActor (line 18) | pub(crate) struct SyncJobsActor {
constant MAILBOX_CAPACITY (line 43) | pub(crate) const MAILBOX_CAPACITY: usize = 100;
method apply_parts (line 45) | fn apply_parts(
method clear_flat_state (line 71) | fn clear_flat_state(
type Context (line 87) | type Context = actix::Context<Self>;
type Result (line 91) | type Result = ();
method handle (line 94) | fn handle(
type Result (line 131) | type Result = ();
method handle (line 134) | fn handle(
type Result (line 151) | type Result = ();
method handle (line 154) | fn handle(
function create_sync_job_scheduler (line 22) | pub(crate) fn create_sync_job_scheduler<M>(address: actix::Addr<SyncJobs...
FILE: chain/client/src/test_utils/block_stats.rs
type BlockStats (line 10) | pub struct BlockStats {
method new (line 21) | pub(crate) fn new() -> BlockStats {
method calculate_distance (line 33) | fn calculate_distance(&mut self, mut lhs: CryptoHash, mut rhs: CryptoH...
method add_block (line 56) | pub(crate) fn add_block(&mut self, block: &Block) {
method check_stats (line 74) | pub fn check_stats(&mut self, force: bool) {
method check_block_ratio (line 88) | pub fn check_block_ratio(&mut self, min_ratio: Option<f64>, max_ratio:...
FILE: chain/client/src/test_utils/client.rs
method process_block_sync_with_produce_chunk_options (line 36) | fn process_block_sync_with_produce_chunk_options(
method process_block_test (line 50) | pub fn process_block_test(
method process_block_test_no_produce_chunk (line 58) | pub fn process_block_test_no_produce_chunk(
method finish_blocks_in_processing (line 67) | pub fn finish_blocks_in_processing(&mut self) -> Vec<CryptoHash> {
method finish_block_in_processing (line 77) | pub fn finish_block_in_processing(&mut self, hash: &CryptoHash) -> Vec<C...
function create_chunk_on_height_for_shard (line 86) | fn create_chunk_on_height_for_shard(
function create_chunk_on_height (line 106) | pub fn create_chunk_on_height(
function create_chunk_with_transactions (line 113) | pub fn create_chunk_with_transactions(
function create_chunk (line 122) | pub fn create_chunk(
function run_catchup (line 220) | pub fn run_catchup(
FILE: chain/client/src/test_utils/peer_manager_mock.rs
type PeerManagerMock (line 4) | pub struct PeerManagerMock {
method new (line 14) | pub(crate) fn new(
type Context (line 26) | type Context = actix::Context<Self>;
type Result (line 30) | type Result = PeerManagerMessageResponse;
method handle (line 31) | fn handle(&mut self, msg: PeerManagerMessageRequest, ctx: &mut Self::C...
type Result (line 37) | type Result = ();
method handle (line 38) | fn handle(&mut self, _msg: SetChainInfo, _ctx: &mut Self::Context) {}
FILE: chain/client/src/test_utils/setup.rs
constant TEST_SEED (line 62) | pub const TEST_SEED: RngSeed = [3; 32];
constant MIN_BLOCK_PROD_TIME (line 65) | pub const MIN_BLOCK_PROD_TIME: Duration = Duration::from_millis(100);
constant MAX_BLOCK_PROD_TIME (line 67) | pub const MAX_BLOCK_PROD_TIME: Duration = Duration::from_millis(200);
function setup (line 70) | pub fn setup(
function setup_only_view (line 196) | pub fn setup_only_view(
function setup_mock (line 278) | pub fn setup_mock(
function setup_mock_with_validity_period_and_no_epoch_sync (line 301) | pub fn setup_mock_with_validity_period_and_no_epoch_sync(
type ActorHandlesForTesting (line 355) | pub struct ActorHandlesForTesting {
function send_chunks (line 361) | fn send_chunks<T, I, F>(
function setup_mock_all_validators (line 421) | pub fn setup_mock_all_validators(
function setup_no_network (line 878) | pub fn setup_no_network(
function setup_no_network_with_validity_period_and_no_epoch_sync (line 893) | pub fn setup_no_network_with_validity_period_and_no_epoch_sync(
function setup_client_with_runtime (line 912) | pub fn setup_client_with_runtime(
function setup_client (line 953) | pub fn setup_client(
function setup_synchronous_shards_manager (line 987) | pub fn setup_synchronous_shards_manager(
function setup_client_with_synchronous_shards_manager (line 1034) | pub fn setup_client_with_synchronous_shards_manager(
type ShardsManagerAdapterForTest (line 1082) | pub struct ShardsManagerAdapterForTest {
method from (line 1090) | fn from(arc: Arc<A>) -> Self {
FILE: chain/client/src/test_utils/test_env.rs
type TestEnv (line 43) | pub struct TestEnv {
method builder (line 60) | pub fn builder(chain_genesis: ChainGenesis) -> TestEnvBuilder {
method process_block (line 66) | pub fn process_block(&mut self, id: usize, block: Block, provenance: P...
method produce_block (line 72) | pub fn produce_block(&mut self, id: usize, height: BlockHeight) {
method pause_block_processing (line 87) | pub fn pause_block_processing(&mut self, capture: &mut TracingCapture,...
method resume_block_processing (line 107) | pub fn resume_block_processing(&mut self, block: &CryptoHash) {
method client (line 113) | pub fn client(&mut self, account_id: &AccountId) -> &mut Client {
method shards_manager (line 117) | pub fn shards_manager(&self, account: &AccountId) -> &ShardsManagerAda...
method process_partial_encoded_chunks (line 121) | pub fn process_partial_encoded_chunks(&mut self) {
method process_partial_encoded_chunks_requests (line 166) | pub fn process_partial_encoded_chunks_requests(&mut self, id: usize) {
method process_partial_encoded_chunk_request (line 173) | pub fn process_partial_encoded_chunk_request(
method get_partial_encoded_chunk_response (line 197) | pub fn get_partial_encoded_chunk_response(
method process_shards_manager_responses (line 225) | pub fn process_shards_manager_responses(&mut self, id: usize) -> bool {
method process_shards_manager_responses_and_finish_processing_blocks (line 252) | pub fn process_shards_manager_responses_and_finish_processing_blocks(&...
method propagate_chunk_state_witnesses (line 264) | pub fn propagate_chunk_state_witnesses(&mut self) {
method get_all_chunk_endorsements (line 289) | pub fn get_all_chunk_endorsements(&mut self) -> Vec<ChunkEndorsement> {
method send_money (line 311) | pub fn send_money(&mut self, id: usize) -> ProcessTxResponse {
method upgrade_protocol (line 328) | pub fn upgrade_protocol(&mut self, protocol_version: ProtocolVersion) {
method query_account (line 353) | pub fn query_account(&mut self, account_id: AccountId) -> AccountView {
method query_state (line 380) | pub fn query_state(&mut self, account_id: AccountId) -> Vec<StateItem> {
method query_balance (line 411) | pub fn query_balance(&mut self, account_id: AccountId) -> Balance {
method restart (line 421) | pub fn restart(&mut self, idx: usize) {
method get_client_id (line 448) | pub fn get_client_id(&self, idx: usize) -> &AccountId {
method get_runtime_config (line 452) | pub fn get_runtime_config(&self, idx: usize, epoch_id: EpochId) -> Run...
method tx_from_actions (line 457) | pub fn tx_from_actions(
method meta_tx_from_actions (line 475) | pub fn meta_tx_from_actions(
method execute_tx (line 513) | pub fn execute_tx(
method call_main (line 544) | pub fn call_main(&mut self, account: &AccountId) -> FinalExecutionOutc...
method drop (line 558) | fn drop(&mut self) {
type AccountIndices (line 569) | pub(crate) struct AccountIndices(pub(crate) HashMap<AccountId, usize>);
method index (line 572) | pub fn index(&self, account_id: &AccountId) -> usize {
method lookup (line 576) | pub fn lookup<'a, T>(&self, container: &'a [T], account_id: &AccountId...
method lookup_mut (line 580) | pub fn lookup_mut<'a, T>(&self, container: &'a mut [T], account_id: &A...
FILE: chain/client/src/test_utils/test_env_builder.rs
type EpochManagerKind (line 27) | enum EpochManagerKind {
method into_adapter (line 33) | pub fn into_adapter(self) -> Arc<dyn EpochManagerAdapter> {
type TestEnvBuilder (line 42) | pub struct TestEnvBuilder {
method new (line 64) | pub(crate) fn new(chain_genesis: ChainGenesis) -> Self {
method clients (line 91) | pub fn clients(mut self, clients: Vec<AccountId>) -> Self {
method clients_random_seeds (line 103) | pub fn clients_random_seeds(mut self, seeds: HashMap<AccountId, RngSee...
method clients_count (line 112) | pub fn clients_count(self, num: usize) -> Self {
method num_clients (line 116) | pub fn num_clients(&self) -> usize {
method validators (line 122) | pub fn validators(mut self, validators: Vec<AccountId>) -> Self {
method validator_seats (line 133) | pub fn validator_seats(self, num: usize) -> Self {
method ensure_home_dirs (line 137) | fn ensure_home_dirs(mut self) -> Self {
method stores (line 151) | pub fn stores(mut self, stores: Vec<Store>) -> Self {
method real_stores (line 160) | pub fn real_stores(self) -> Self {
method ensure_stores (line 184) | fn ensure_stores(self) -> Self {
method mock_epoch_managers (line 199) | pub fn mock_epoch_managers(mut self, epoch_managers: Vec<Arc<MockEpoch...
method epoch_managers (line 222) | pub fn epoch_managers(mut self, epoch_managers: Vec<Arc<EpochManagerHa...
method real_epoch_managers (line 239) | pub fn real_epoch_managers(self, genesis_config: &GenesisConfig) -> Se...
method real_epoch_managers_with_test_overrides (line 244) | pub fn real_epoch_managers_with_test_overrides(
method ensure_epoch_managers (line 267) | fn ensure_epoch_managers(self) -> Self {
method internal_initialize_nightshade_runtimes (line 297) | pub fn internal_initialize_nightshade_runtimes(
method shard_trackers (line 332) | pub fn shard_trackers(mut self, shard_trackers: Vec<ShardTracker>) -> ...
method track_all_shards (line 342) | pub fn track_all_shards(self) -> Self {
method ensure_shard_trackers (line 355) | fn ensure_shard_trackers(self) -> Self {
method runtimes (line 372) | pub fn runtimes(mut self, runtimes: Vec<Arc<dyn RuntimeAdapter>>) -> S...
method ensure_runtimes (line 380) | fn ensure_runtimes(self) -> Self {
method network_adapters (line 410) | pub fn network_adapters(mut self, adapters: Vec<Arc<MockPeerManagerAda...
method ensure_network_adapters (line 416) | fn ensure_network_adapters(self) -> Self {
method num_shards (line 425) | pub fn num_shards(mut self, num_shards: NumShards) -> Self {
method archive (line 434) | pub fn archive(mut self, archive: bool) -> Self {
method save_trie_changes (line 439) | pub fn save_trie_changes(mut self, save_trie_changes: bool) -> Self {
method build (line 453) | pub fn build(self) -> TestEnv {
method build_impl (line 457) | fn build_impl(self) -> TestEnv {
method make_accounts (line 555) | fn make_accounts(count: usize) -> Vec<AccountId> {
method use_state_snapshots (line 559) | pub fn use_state_snapshots(mut self) -> Self {
method state_snapshot_type (line 565) | pub fn state_snapshot_type(&self) -> StateSnapshotType {
FILE: chain/client/src/tests/bug_repros.rs
function repro_1183 (line 30) | fn repro_1183() {
function test_sync_from_archival_node (line 165) | fn test_sync_from_archival_node() {
function test_long_gap_between_blocks (line 274) | fn test_long_gap_between_blocks() {
FILE: chain/client/src/tests/catching_up.rs
function get_validators_and_key_pairs (line 29) | fn get_validators_and_key_pairs() -> (ValidatorSchedule, Vec<PeerInfo>) {
function send_tx (line 65) | fn send_tx(
type ReceiptsSyncPhases (line 86) | enum ReceiptsSyncPhases {
type StateRequestStruct (line 95) | pub struct StateRequestStruct {
function test_catchup_receipts_sync_third_epoch (line 105) | fn test_catchup_receipts_sync_third_epoch() {
function test_catchup_receipts_sync_hold (line 118) | fn test_catchup_receipts_sync_hold() {
function test_catchup_receipts_sync_last_block (line 124) | fn test_catchup_receipts_sync_last_block() {
function test_catchup_receipts_sync_distant_epoch (line 130) | fn test_catchup_receipts_sync_distant_epoch() {
function test_catchup_receipts_sync_common (line 134) | fn test_catchup_receipts_sync_common(wait_till: u64, send: u64, sync_hol...
type RandomSinglePartPhases (line 364) | enum RandomSinglePartPhases {
function test_catchup_random_single_part_sync (line 377) | fn test_catchup_random_single_part_sync() {
function test_catchup_random_single_part_sync_skip_15 (line 386) | fn test_catchup_random_single_part_sync_skip_15() {
function test_catchup_random_single_part_sync_send_15 (line 392) | fn test_catchup_random_single_part_sync_send_15() {
function test_catchup_random_single_part_sync_non_zero_amounts (line 399) | fn test_catchup_random_single_part_sync_non_zero_amounts() {
function test_catchup_random_single_part_sync_height_6 (line 406) | fn test_catchup_random_single_part_sync_height_6() {
function test_catchup_random_single_part_sync_common (line 410) | fn test_catchup_random_single_part_sync_common(skip_15: bool, non_zero: ...
function test_catchup_sanity_blocks_produced (line 608) | fn test_catchup_sanity_blocks_produced() {
function test_all_chunks_accepted_1000 (line 673) | fn test_all_chunks_accepted_1000() {
function test_all_chunks_accepted_1000_slow (line 679) | fn test_all_chunks_accepted_1000_slow() {
function test_all_chunks_accepted_1000_rare_epoch_changing (line 685) | fn test_all_chunks_accepted_1000_rare_epoch_changing() {
function test_all_chunks_accepted_common (line 689) | fn test_all_chunks_accepted_common(
FILE: chain/client/src/tests/chunks_management.rs
function test_request_chunk_restart (line 15) | fn test_request_chunk_restart() {
FILE: chain/client/src/tests/consensus.rs
function test_consensus_with_epoch_switches (line 26) | fn test_consensus_with_epoch_switches() {
FILE: chain/client/src/tests/cross_shard_tx.rs
function test_keyvalue_runtime_balances (line 29) | fn test_keyvalue_runtime_balances() {
function send_tx (line 95) | fn send_tx(
function test_cross_shard_tx_callback (line 156) | fn test_cross_shard_tx_callback(
function test_cross_shard_tx_common (line 392) | fn test_cross_shard_tx_common(
function test_cross_shard_tx (line 532) | fn test_cross_shard_tx() {
function test_cross_shard_tx_doomslug (line 539) | fn test_cross_shard_tx_doomslug() {
function test_cross_shard_tx_drop_chunks (line 546) | fn test_cross_shard_tx_drop_chunks() {
function test_cross_shard_tx_8_iterations (line 552) | fn test_cross_shard_tx_8_iterations() {
function test_cross_shard_tx_8_iterations_drop_chunks (line 558) | fn test_cross_shard_tx_8_iterations_drop_chunks() {
function test_cross_shard_tx_with_validator_rotation_1 (line 569) | fn test_cross_shard_tx_with_validator_rotation_1() {
function test_cross_shard_tx_with_validator_rotation_2 (line 575) | fn test_cross_shard_tx_with_validator_rotation_2() {
FILE: chain/client/src/tests/doomslug.rs
function test_processing_skips_on_forks (line 19) | fn test_processing_skips_on_forks() {
FILE: chain/client/src/tests/maintenance_windows.rs
function test_get_maintenance_windows_for_validator (line 12) | fn test_get_maintenance_windows_for_validator() {
function test_get_maintenance_windows_for_not_validator (line 45) | fn test_get_maintenance_windows_for_not_validator() {
FILE: chain/client/src/tests/process_blocks.rs
function test_not_process_height_twice (line 20) | fn test_not_process_height_twice() {
function test_bad_shard_id (line 55) | fn test_bad_shard_id() {
function test_bad_block_content_vrf (line 101) | fn test_bad_block_content_vrf() {
function test_bad_block_signature (line 125) | fn test_bad_block_signature() {
FILE: chain/client/src/tests/query_client.rs
function query_client (line 37) | fn query_client() {
function query_status_not_crash (line 64) | fn query_status_not_crash() {
function test_execution_outcome_for_chunk (line 139) | fn test_execution_outcome_for_chunk() {
function test_state_request (line 210) | fn test_state_request() {
function test_garbage_collection (line 270) | fn test_garbage_collection() {
FILE: chain/client/src/view_client.rs
constant QUERY_REQUEST_LIMIT (line 74) | const QUERY_REQUEST_LIMIT: usize = 500;
constant REQUEST_WAIT_TIME (line 76) | const REQUEST_WAIT_TIME: u64 = 1000;
constant POISONED_LOCK_ERR (line 78) | const POISONED_LOCK_ERR: &str = "The lock was poisoned.";
type ViewClientRequestManager (line 81) | pub struct ViewClientRequestManager {
method new (line 111) | pub fn new() -> Self {
type ViewClientActor (line 95) | pub struct ViewClientActor {
constant MAX_NUM_STATE_REQUESTS (line 124) | const MAX_NUM_STATE_REQUESTS: usize = 30;
method new (line 126) | pub fn new(
method maybe_block_id_to_block_header (line 160) | fn maybe_block_id_to_block_header(
method need_request (line 174) | fn need_request<K: Hash + Eq + Clone>(key: K, cache: &mut lru::LruCach...
method get_block_hash_by_finality (line 186) | fn get_block_hash_by_finality(
method get_block_header_by_reference (line 202) | fn get_block_header_by_reference(
method get_block_by_reference (line 235) | fn get_block_by_reference(
method get_maintenance_windows (line 264) | fn get_maintenance_windows(
method handle_query (line 312) | fn handle_query(&mut self, msg: Query) -> Result<QueryResponse, QueryE...
method get_tx_execution_status (line 432) | fn get_tx_execution_status(
method get_tx_status (line 477) | fn get_tx_status(
method retrieve_headers (line 581) | fn retrieve_headers(
method check_signature_account_announce (line 588) | fn check_signature_account_announce(
method throttle_state_sync_request (line 608) | fn throttle_state_sync_request(&self) -> bool {
method has_state_snapshot (line 627) | fn has_state_snapshot(&self, sync_hash: &CryptoHash, shard_id: ShardId...
type Result (line 654) | type Result = Result<QueryResponse, QueryError>;
method handle (line 657) | fn handle(&mut self, msg: WithSpanContext<Query>, _: &mut Self::Contex...
type Result (line 667) | type Result = Result<AccountId, GetProviderError>;
method handle (line 669) | fn handle(&mut self, msg: WithSpanContext<GetProvider>, _: &mut Self::...
type Result (line 682) | type Result = Result<AllMinersView, GetAllMinersError>;
method handle (line 684) | fn handle(
type Result (line 699) | type Result = Result<BlockView, GetBlockError>;
method handle (line 702) | fn handle(&mut self, msg: WithSpanContext<GetBlock>, _: &mut Self::Con...
type Result (line 717) | type Result = Result<(BlockView, Arc<PartialMerkleTree>), GetBlockError>;
method handle (line 720) | fn handle(
type Result (line 740) | type Result = Result<ChunkView, GetChunkError>;
method handle (line 743) | fn handle(&mut self, msg: WithSpanContext<GetChunk>, _: &mut Self::Con...
type Result (line 798) | type Result = Result<TxStatusView, TxStatusError>;
method handle (line 801) | fn handle(&mut self, msg: WithSpanContext<TxStatus>, _: &mut Self::Con...
type Result (line 811) | type Result = Result<EpochValidatorInfo, GetValidatorInfoError>;
method handle (line 814) | fn handle(
type Result (line 862) | type Result = Result<Vec<ValidatorPowerAndPledgeView>, GetValidatorInf...
method handle (line 865) | fn handle(
type Result (line 886) | type Result = Result<StateChangesKindsView, GetStateChangesError>;
method handle (line 889) | fn handle(
type Result (line 911) | type Result = Result<StateChangesView, GetStateChangesError>;
method handle (line 914) | fn handle(
type Result (line 935) | type Result = Result<StateChangesView, GetStateChangesError>;
method handle (line 938) | fn handle(
type Result (line 961) | type Result = Result<HashMap<ShardId, StateChangesView>, GetStateChang...
method handle (line 964) | fn handle(
type Result (line 1009) | type Result = Result<Option<Arc<LightClientBlockView>>, GetNextLightCl...
method handle (line 1012) | fn handle(
type Result (line 1057) | type Result = Result<GetExecutionOutcomeResponse, GetExecutionOutcomeE...
method handle (line 1060) | fn handle(
type Result (line 1147) | type Result = Result<HashMap<ShardId, Vec<ExecutionOutcomeWithIdView>>...
method handle (line 1150) | fn handle(
type Result (line 1172) | type Result = Result<Option<ReceiptView>, GetReceiptError>;
method handle (line 1175) | fn handle(&mut self, msg: WithSpanContext<GetReceipt>, _: &mut Self::C...
type Result (line 1189) | type Result = Result<GetBlockProofResponse, GetBlockProofError>;
method handle (line 1192) | fn handle(
type Result (line 1211) | type Result = Result<ProtocolConfigView, GetProtocolConfigError>;
method handle (line 1214) | fn handle(
type Result (line 1240) | type Result = Option<u64>;
method handle (line 1243) | fn handle(
type Result (line 1278) | type Result = Option<Box<FinalExecutionOutcomeView>>;
method handle (line 1281) | fn handle(
type Result (line 1302) | type Result = ();
method handle (line 1305) | fn handle(
type Result (line 1325) | type Result = Option<Box<Block>>;
method handle (line 1328) | fn handle(
type Result (line 1347) | type Result = Option<AccountId>;
method handle (line 1350) | fn handle(
type Result (line 1369) | type Result = Option<AllMinersView>;
method handle (line 1371) | fn handle(
type Result (line 1391) | type Result = Option<Vec<BlockHeader>>;
method handle (line 1394) | fn handle(
type Result (line 1417) | type Result = Option<StateResponse>;
method handle (line 1420) | fn handle(
type Result (line 1502) | type Result = Option<StateResponse>;
method handle (line 1505) | fn handle(
type Result (line 1583) | type Result = Result<Vec<AnnounceAccount>, ReasonForBan>;
method handle (line 1586) | fn handle(
type Result (line 1642) | type Result = Result<GasPriceView, GetGasPriceError>;
method handle (line 1645) | fn handle(
type Result (line 1660) | type Result = Result<MaintenanceWindowsView, GetMaintenanceWindowsError>;
method handle (line 1663) | fn handle(
type Result (line 1675) | type Result = Result<SplitStorageInfoView, GetSplitStorageInfoError>;
method handle (line 1677) | fn handle(
type Context (line 650) | type Context = SyncContext<Self>;
function start_view_client (line 1702) | pub fn start_view_client(
FILE: chain/epoch-manager/src/adapter.rs
type EpochManagerAdapter (line 33) | pub trait EpochManagerAdapter: Send + Sync {
method epoch_exists (line 35) | fn epoch_exists(&self, epoch_id: &EpochId) -> bool;
method shard_ids (line 38) | fn shard_ids(&self, epoch_id: &EpochId) -> Result<Vec<ShardId>, EpochE...
method num_total_parts (line 44) | fn num_total_parts(&self) -> usize;
method num_data_parts (line 50) | fn num_data_parts(&self) -> usize;
method get_part_owner (line 53) | fn get_part_owner(&self, epoch_id: &EpochId, part_id: u64) -> Result<A...
method account_id_to_shard_id (line 56) | fn account_id_to_shard_id(
method shard_id_to_uid (line 64) | fn shard_id_to_uid(
method get_block_info (line 70) | fn get_block_info(&self, hash: &CryptoHash) -> Result<Arc<BlockInfo>, ...
method get_epoch_config (line 72) | fn get_epoch_config(&self, epoch_id: &EpochId) -> Result<EpochConfig, ...
method get_epoch_info (line 74) | fn get_epoch_info(&self, epoch_id: &EpochId) -> Result<Arc<EpochInfo>,...
method get_shard_layout (line 76) | fn get_shard_layout(&self, epoch_id: &EpochId) -> Result<ShardLayout, ...
method get_shard_config (line 78) | fn get_shard_config(&self, epoch_id: &EpochId) -> Result<ShardConfig, ...
method is_next_block_epoch_start (line 81) | fn is_next_block_epoch_start(&self, parent_hash: &CryptoHash) -> Resul...
method is_last_block_in_finished_epoch (line 87) | fn is_last_block_in_finished_epoch(&self, hash: &CryptoHash) -> Result...
method get_epoch_id_from_prev_block (line 90) | fn get_epoch_id_from_prev_block(&self, parent_hash: &CryptoHash)
method get_epoch_height_from_prev_block (line 94) | fn get_epoch_height_from_prev_block(
method get_next_epoch_id (line 100) | fn get_next_epoch_id(&self, block_hash: &CryptoHash) -> Result<EpochId...
method get_next_epoch_id_from_prev_block (line 103) | fn get_next_epoch_id_from_prev_block(
method get_prev_shard_ids (line 113) | fn get_prev_shard_ids(
method get_shard_layout_from_prev_block (line 120) | fn get_shard_layout_from_prev_block(
method get_epoch_id (line 126) | fn get_epoch_id(&self, block_hash: &CryptoHash) -> Result<EpochId, Epo...
method compare_epoch_id (line 132) | fn compare_epoch_id(
method get_epoch_start_height (line 139) | fn get_epoch_start_height(&self, block_hash: &CryptoHash) -> Result<Bl...
method get_prev_epoch_id_from_prev_block (line 142) | fn get_prev_epoch_id_from_prev_block(
method get_estimated_protocol_upgrade_block_height (line 151) | fn get_estimated_protocol_upgrade_block_height(
method get_epoch_block_producers_ordered (line 158) | fn get_epoch_block_producers_ordered(
method get_epoch_block_approvers_ordered (line 164) | fn get_epoch_block_approvers_ordered(
method get_epoch_chunk_producers (line 170) | fn get_epoch_chunk_producers(
method get_block_producer (line 176) | fn get_block_producer(
method get_block_producer_by_hash (line 183) | fn get_block_producer_by_hash(&self, block_hash: &CryptoHash) -> Resul...
method get_all_miners (line 186) | fn get_all_miners(&self, block_hash: &CryptoHash) -> Result<AllMinersV...
method get_chunk_producer (line 189) | fn get_chunk_producer(
method get_chunk_validators (line 197) | fn get_chunk_validators(
method get_validator_by_account_id (line 204) | fn get_validator_by_account_id(
method get_fisherman_by_account_id (line 211) | fn get_fisherman_by_account_id(
method get_validator_info (line 222) | fn get_validator_info(
method add_validator_proposals (line 227) | fn add_validator_proposals(
method add_validator_proposals_for_blocks (line 232) | fn add_validator_proposals_for_blocks(
method get_epoch_minted_amount (line 238) | fn get_epoch_minted_amount(&self, epoch_id: &EpochId) -> Result<Balanc...
method get_epoch_protocol_version (line 241) | fn get_epoch_protocol_version(&self, epoch_id: &EpochId)
method get_epoch_sync_data (line 246) | fn get_epoch_sync_data(
method get_epoch_sync_data_hash (line 265) | fn get_epoch_sync_data_hash(
method epoch_sync_init_epoch_manager (line 290) | fn epoch_sync_init_epoch_manager(
method verify_block_vrf (line 303) | fn verify_block_vrf(
method verify_validator_signature (line 314) | fn verify_validator_signature(
method verify_validator_or_fisherman_signature (line 324) | fn verify_validator_or_fisherman_signature(
method verify_header_signature (line 334) | fn verify_header_signature(&self, header: &BlockHeader) -> Result<bool...
method verify_chunk_header_signature (line 343) | fn verify_chunk_header_signature(
method verify_chunk_signature_with_header_parts (line 359) | fn verify_chunk_signature_with_header_parts(
method verify_approval (line 370) | fn verify_approval(
method verify_approvals_and_threshold_orphan (line 379) | fn verify_approvals_and_threshold_orphan(
method cares_about_shard_from_prev_block (line 393) | fn cares_about_shard_from_prev_block(
method cares_about_shard_next_epoch_from_prev_block (line 400) | fn cares_about_shard_next_epoch_from_prev_block(
method will_shard_layout_change (line 407) | fn will_shard_layout_change(&self, parent_hash: &CryptoHash) -> Result...
method get_all_epoch_hashes (line 413) | fn get_all_epoch_hashes(
method force_update_aggregator (line 420) | fn force_update_aggregator(&self, epoch_id: &EpochId, hash: &CryptoHash);
method epoch_exists (line 430) | fn epoch_exists(&self, epoch_id: &EpochId) -> bool {
method shard_ids (line 435) | fn shard_ids(&self, epoch_id: &EpochId) -> Result<Vec<ShardId>, EpochE...
method num_total_parts (line 440) | fn num_total_parts(&self) -> usize {
method num_data_parts (line 449) | fn num_data_parts(&self) -> usize {
method get_part_owner (line 458) | fn get_part_owner(&self, epoch_id: &EpochId, part_id: u64) -> Result<A...
method account_id_to_shard_id (line 466) | fn account_id_to_shard_id(
method shard_id_to_uid (line 476) | fn shard_id_to_uid(
method get_block_info (line 486) | fn get_block_info(&self, hash: &CryptoHash) -> Result<Arc<BlockInfo>, ...
method get_epoch_config (line 491) | fn get_epoch_config(&self, epoch_id: &EpochId) -> Result<EpochConfig, ...
method get_epoch_info (line 496) | fn get_epoch_info(&self, epoch_id: &EpochId) -> Result<Arc<EpochInfo>,...
method get_shard_layout (line 501) | fn get_shard_layout(&self, epoch_id: &EpochId) -> Result<ShardLayout, ...
method get_shard_config (line 506) | fn get_shard_config(&self, epoch_id: &EpochId) -> Result<ShardConfig, ...
method is_next_block_epoch_start (line 512) | fn is_next_block_epoch_start(&self, parent_hash: &CryptoHash) -> Resul...
method is_last_block_in_finished_epoch (line 517) | fn is_last_block_in_finished_epoch(&self, hash: &CryptoHash) -> Result...
method get_epoch_id_from_prev_block (line 522) | fn get_epoch_id_from_prev_block(
method get_epoch_height_from_prev_block (line 530) | fn get_epoch_height_from_prev_block(
method get_next_epoch_id (line 539) | fn get_next_epoch_id(&self, block_hash: &CryptoHash) -> Result<EpochId...
method get_next_epoch_id_from_prev_block (line 544) | fn get_next_epoch_id_from_prev_block(
method get_prev_shard_ids (line 552) | fn get_prev_shard_ids(
method get_shard_layout_from_prev_block (line 580) | fn get_shard_layout_from_prev_block(
method get_epoch_id (line 588) | fn get_epoch_id(&self, block_hash: &CryptoHash) -> Result<EpochId, Epo...
method compare_epoch_id (line 593) | fn compare_epoch_id(
method get_epoch_start_height (line 602) | fn get_epoch_start_height(&self, block_hash: &CryptoHash) -> Result<Bl...
method get_prev_epoch_id_from_prev_block (line 607) | fn get_prev_epoch_id_from_prev_block(
method get_estimated_protocol_upgrade_block_height (line 619) | fn get_estimated_protocol_upgrade_block_height(
method get_epoch_block_producers_ordered (line 627) | fn get_epoch_block_producers_ordered(
method get_epoch_block_approvers_ordered (line 636) | fn get_epoch_block_approvers_ordered(
method get_epoch_chunk_producers (line 644) | fn get_epoch_chunk_producers(
method get_block_producer (line 652) | fn get_block_producer(
method get_block_producer_by_hash (line 661) | fn get_block_producer_by_hash(&self, block_hash: &CryptoHash) -> Resul...
method get_all_miners (line 666) | fn get_all_miners(&self, block_hash: &CryptoHash) -> Result<AllMinersV...
method get_chunk_producer (line 671) | fn get_chunk_producer(
method get_chunk_validators (line 681) | fn get_chunk_validators(
method get_validator_by_account_id (line 691) | fn get_validator_by_account_id(
method get_fisherman_by_account_id (line 703) | fn get_fisherman_by_account_id(
method get_validator_info (line 717) | fn get_validator_info(
method add_validator_proposals (line 725) | fn add_validator_proposals(
method add_validator_proposals_for_blocks (line 733) | fn add_validator_proposals_for_blocks(
method get_epoch_minted_amount (line 741) | fn get_epoch_minted_amount(&self, epoch_id: &EpochId) -> Result<Balanc...
method get_epoch_protocol_version (line 746) | fn get_epoch_protocol_version(
method get_epoch_sync_data (line 755) | fn get_epoch_sync_data(
method epoch_sync_init_epoch_manager (line 784) | fn epoch_sync_init_epoch_manager(
method verify_block_vrf (line 813) | fn verify_block_vrf(
method verify_validator_signature (line 834) | fn verify_validator_signature(
method verify_validator_or_fisherman_signature (line 850) | fn verify_validator_or_fisherman_signature(
method verify_header_signature (line 881) | fn verify_header_signature(&self, header: &BlockHeader) -> Result<bool...
method verify_chunk_signature_with_header_parts (line 896) | fn verify_chunk_signature_with_header_parts(
method verify_approval (line 915) | fn verify_approval(
method verify_approvals_and_threshold_orphan (line 950) | fn verify_approvals_and_threshold_orphan(
method cares_about_shard_from_prev_block (line 994) | fn cares_about_shard_from_prev_block(
method cares_about_shard_next_epoch_from_prev_block (line 1004) | fn cares_about_shard_next_epoch_from_prev_block(
method will_shard_layout_change (line 1018) | fn will_shard_layout_change(&self, parent_hash: &CryptoHash) -> Result...
method get_all_epoch_hashes (line 1024) | fn get_all_epoch_hashes(
method force_update_aggregator (line 1039) | fn force_update_aggregator(&self, epoch_id: &EpochId, hash: &CryptoHas...
FILE: chain/epoch-manager/src/lib.rs
constant EPOCH_CACHE_SIZE (line 60) | const EPOCH_CACHE_SIZE: usize = if cfg!(feature = "no_cache") { 1 } else...
constant BLOCK_CACHE_SIZE (line 61) | const BLOCK_CACHE_SIZE: usize = if cfg!(feature = "no_cache") { 5 } else...
constant _HASH_CACHE_SIZE (line 63) | const _HASH_CACHE_SIZE: usize = if cfg!(feature = "no_cache") { 1 } else...
constant AGGREGATOR_SAVE_PERIOD (line 64) | const AGGREGATOR_SAVE_PERIOD: u64 = 1000;
type EpochManagerHandle (line 75) | pub struct EpochManagerHandle {
method write (line 80) | pub fn write(&self) -> RwLockWriteGuard<EpochManager> {
method read (line 84) | pub fn read(&self) -> RwLockReadGuard<EpochManager> {
method validator_power (line 90) | fn validator_power(
method validator_total_power (line 105) | fn validator_total_power(
method minimum_power (line 120) | fn minimum_power(&self, prev_block_hash: &CryptoHash) -> Result<Power, E...
method validator_stake (line 124) | fn validator_stake(
method validator_total_stake (line 139) | fn validator_total_stake(
method minimum_pledge (line 154) | fn minimum_pledge(&self, prev_block_hash: &CryptoHash) -> Result<Balance...
type EpochManager (line 162) | pub struct EpochManager {
method new_from_genesis_config (line 199) | pub fn new_from_genesis_config(
method new_from_genesis_config_with_test_overrides (line 206) | pub fn new_from_genesis_config_with_test_overrides(
method new_arc_handle (line 243) | pub fn new_arc_handle(store: Store, genesis_config: &GenesisConfig) ->...
method new_arc_handle_with_test_overrides (line 247) | pub fn new_arc_handle_with_test_overrides(
method new_all_epoch_config_with_test_overrides (line 263) | fn new_all_epoch_config_with_test_overrides(
method new (line 277) | pub fn new(
method into_handle (line 376) | pub fn into_handle(self) -> EpochManagerHandle {
method copy_epoch_info_as_of_block (line 387) | pub fn copy_epoch_info_as_of_block(
method init_after_epoch_sync (line 438) | pub fn init_after_epoch_sync(
method compute_exempted_kickout (line 468) | fn compute_exempted_kickout(
method compute_kickout_info (line 549) | fn compute_kickout_info(
method collect_blocks_info (line 649) | fn collect_blocks_info(
method finalize_block_summary_for_block (line 770) | fn finalize_block_summary_for_block(
method finalize_epoch (line 862) | fn finalize_epoch(
method record_block_info (line 970) | pub fn record_block_info(
method get_all_miners (line 1087) | pub fn get_all_miners(
method get_block_producer_info (line 1100) | pub fn get_block_producer_info(
method get_block_producer_info_by_hash (line 1111) | pub fn get_block_producer_info_by_hash(
method hash_to_bigint (line 1126) | fn hash_to_bigint(hash: &CryptoHash) -> BigInt {
method choose_validator_vrf (line 1130) | fn choose_validator_vrf(
method get_all_block_producers_settlement (line 1167) | pub fn get_all_block_producers_settlement(
method get_all_block_producers_ordered (line 1191) | pub fn get_all_block_producers_ordered(
method get_all_chunk_producers (line 1213) | pub fn get_all_chunk_producers(
method get_chunk_validators (line 1231) | pub fn get_chunk_validators(
method get_heuristic_block_approvers_ordered (line 1257) | pub fn get_heuristic_block_approvers_ordered(
method get_all_block_approvers_ordered (line 1275) | pub fn get_all_block_approvers_ordered(
method get_chunk_producer_info (line 1319) | pub fn get_chunk_producer_info(
method get_validator_by_account_id (line 1332) | pub fn get_validator_by_account_id(
method get_fisherman_by_account_id (line 1344) | pub fn get_fisherman_by_account_id(
method get_epoch_id (line 1355) | pub fn get_epoch_id(&self, block_hash: &CryptoHash) -> Result<EpochId,...
method get_next_epoch_id (line 1359) | pub fn get_next_epoch_id(&self, block_hash: &CryptoHash) -> Result<Epo...
method get_prev_epoch_id (line 1364) | pub fn get_prev_epoch_id(&self, block_hash: &CryptoHash) -> Result<Epo...
method get_epoch_info_from_hash (line 1370) | pub fn get_epoch_info_from_hash(
method cares_about_shard_from_prev_block (line 1378) | pub fn cares_about_shard_from_prev_block(
method cares_about_shard_next_epoch_from_prev_block (line 1391) | pub fn cares_about_shard_next_epoch_from_prev_block(
method is_next_block_epoch_start (line 1419) | pub fn is_next_block_epoch_start(&self, parent_hash: &CryptoHash) -> R...
method is_last_block_in_finished_epoch (line 1426) | fn is_last_block_in_finished_epoch(&self, hash: &CryptoHash) -> Result...
method get_epoch_id_from_prev_block (line 1438) | pub fn get_epoch_id_from_prev_block(
method get_next_epoch_id_from_prev_block (line 1449) | pub fn get_next_epoch_id_from_prev_block(
method get_epoch_start_height (line 1461) | pub fn get_epoch_start_height(
method compute_power_return_info_for_block (line 1476) | pub fn compute_power_return_info_for_block(
method compute_power_return_info (line 1529) | pub fn compute_power_return_info(
method compute_double_sign_slashing_info (line 1614) | fn compute_double_sign_slashing_info(
method get_validator_info (line 1659) | pub fn get_validator_info(
method add_validator_proposals (line 1852) | pub fn add_validator_proposals(
method add_validator_proposals_for_blocks (line 1904) | pub fn add_validator_proposals_for_blocks(
method compare_epoch_id (line 2062) | pub fn compare_epoch_id(
method minimum_pledge (line 2083) | pub fn minimum_pledge(&self, prev_block_hash: &CryptoHash) -> Result<B...
method minimum_power (line 2096) | pub fn minimum_power(&self, _prev_block_hash: &CryptoHash) -> Result<P...
method cares_about_shard_in_epoch (line 2134) | fn cares_about_shard_in_epoch(
method block_producer_from_info (line 2155) | pub(crate) fn block_producer_from_info(
method chunk_producer_from_info (line 2163) | pub(crate) fn chunk_producer_from_info(
method is_next_block_in_next_epoch (line 2172) | fn is_next_block_in_next_epoch(&self, block_info: &BlockInfo) -> Resul...
method next_block_need_approvals_from_next_epoch (line 2192) | fn next_block_need_approvals_from_next_epoch(
method get_next_epoch_id_from_info (line 2212) | fn get_next_epoch_id_from_info(&self, block_info: &BlockInfo) -> Resul...
method get_shard_config (line 2217) | pub fn get_shard_config(&self, epoch_id: &EpochId) -> Result<ShardConf...
method get_epoch_config (line 2223) | pub fn get_epoch_config(&self, epoch_id: &EpochId) -> Result<EpochConf...
method get_shard_layout (line 2228) | pub fn get_shard_layout(&self, epoch_id: &EpochId) -> Result<ShardLayo...
method will_shard_layout_change (line 2234) | pub fn will_shard_layout_change(&self, parent_hash: &CryptoHash) -> Re...
method get_epoch_info (line 2242) | pub fn get_epoch_info(&self, epoch_id: &EpochId) -> Result<Arc<EpochIn...
method has_epoch_info (line 2250) | fn has_epoch_info(&self, epoch_id: &EpochId) -> Result<bool, EpochErro...
method save_epoch_info (line 2258) | fn save_epoch_info(
method get_epoch_validator_info (line 2269) | pub fn get_epoch_validator_info(&self, epoch_id: &EpochId) -> Result<E...
method save_epoch_validator_info (line 2278) | fn save_epoch_validator_info(
method has_block_info (line 2289) | fn has_block_info(&self, hash: &CryptoHash) -> Result<bool, EpochError> {
method get_block_info (line 2301) | pub fn get_block_info(&self, hash: &CryptoHash) -> Result<Arc<BlockInf...
method save_block_info (line 2310) | fn save_block_info(
method save_epoch_start (line 2323) | fn save_epoch_start(
method get_epoch_start_from_epoch_id (line 2336) | fn get_epoch_start_from_epoch_id(&self, epoch_id: &EpochId) -> Result<...
method update_epoch_info_aggregator_upto_final (line 2357) | pub fn update_epoch_info_aggregator_upto_final(
method get_epoch_info_aggregator_upto_last (line 2392) | pub fn get_epoch_info_aggregator_upto_last(
method aggregate_epoch_info_upto (line 2426) | fn aggregate_epoch_info_upto(
method get_protocol_upgrade_block_height (line 2491) | pub fn get_protocol_upgrade_block_height(
method get_all_epoch_hashes_from_db (line 2512) | pub fn get_all_epoch_hashes_from_db(
method get_all_epoch_hashes_from_cache (line 2546) | fn get_all_epoch_hashes_from_cache(
function remove_duplicate_power_proposals (line 2102) | fn remove_duplicate_power_proposals(power_proposals: Vec<ValidatorPower>...
function remove_duplicate_pledge_proposals (line 2116) | fn remove_duplicate_pledge_proposals(
FILE: chain/epoch-manager/src/proposals.rs
function find_threshold (line 16) | pub(crate) fn find_threshold(
function proposals_to_block_summary (line 42) | pub fn proposals_to_block_summary(
function proposals_to_epoch_info (line 70) | pub fn proposals_to_epoch_info(
function proposals_to_epoch_info (line 119) | pub fn proposals_to_epoch_info(
function shuffle_duplicate_proposals (line 335) | fn shuffle_duplicate_proposals(dup_proposals: &mut Vec<u64>, rng_seed: R...
function gen_index_old (line 342) | fn gen_index_old(rng: &mut Hc128Rng, bound: u64) -> u64 {
function proposal_shuffling_sanity_checks (line 362) | pub fn proposal_shuffling_sanity_checks() {
function proposal_randomness_reproducibility (line 377) | pub fn proposal_randomness_reproducibility() {
FILE: chain/epoch-manager/src/reward_calculator.rs
constant NUM_NS_IN_SECOND (line 11) | pub(crate) const NUM_NS_IN_SECOND: u64 = 1_000_000_000;
constant NUM_SECONDS_IN_A_YEAR (line 12) | pub const NUM_SECONDS_IN_A_YEAR: u64 = 24 * 60 * 2 * 365;
type RewardCalculator (line 15) | pub struct RewardCalculator {
method new (line 27) | pub fn new(config: &GenesisConfig) -> Self {
method calculate_reward (line 41) | pub fn calculate_reward(
function test_zero_produced_and_expected (line 161) | fn test_zero_produced_and_expected() {
function test_reward_validator_different_online (line 212) | fn test_reward_validator_different_online() {
function test_reward_chunk_only_producer (line 277) | fn test_reward_chunk_only_producer() {
function test_reward_no_overflow (line 358) | fn test_reward_no_overflow() {
FILE: chain/epoch-manager/src/shard_assignment.rs
function assign_shards (line 21) | pub fn assign_shards<T: HasValue<Balance> + Eq + Clone + PartialOrd>(
function assign_with_possible_repeats (line 81) | fn assign_with_possible_repeats<T: HasValue<Balance> + Eq, I: Iterator<I...
type NotEnoughValidators (line 144) | pub struct NotEnoughValidators;
type HasValue (line 146) | pub trait HasValue<T> {
method get_value (line 147) | fn get_value(&self) -> T;
method get_value (line 151) | fn get_value(&self) -> Power {
method get_value (line 157) | fn get_value(&self) -> Balance {
method get_value (line 163) | fn get_value(&self) -> Balance {
constant EXPONENTIAL_STAKES (line 173) | const EXPONENTIAL_STAKES: [Balance; 12] = [100, 90, 81, 73, 66, 59, 53, ...
function test_exponential_distribution_few_shards (line 176) | fn test_exponential_distribution_few_shards() {
function test_exponential_distribution_several_shards (line 182) | fn test_exponential_distribution_several_shards() {
function test_exponential_distribution_many_shards (line 188) | fn test_exponential_distribution_many_shards() {
function test_duplicate_validator (line 206) | fn test_duplicate_validator() {
function test_not_enough_validators (line 213) | fn test_not_enough_validators() {
function test_step_distribution_shards (line 219) | fn test_step_distribution_shards() {
function assign_shards (line 240) | fn assign_shards(
function test_distribution_common (line 288) | fn test_distribution_common(pledges: &[Balance], num_shards: NumShards, ...
function get_value (line 319) | fn get_value(&self) -> Balance {
FILE: chain/epoch-manager/src/shard_tracker.rs
type ShardTracker (line 9) | pub struct ShardTracker {
method new (line 14) | pub fn new(epoch_manager: Arc<dyn EpochManagerAdapter>) -> Self {
method new_empty (line 18) | pub fn new_empty(epoch_manager: Arc<dyn EpochManagerAdapter>) -> Self {
method care_about_shard (line 28) | pub fn care_about_shard(
method will_care_about_shard (line 66) | pub fn will_care_about_shard(
constant DEFAULT_TOTAL_SUPPLY (line 114) | const DEFAULT_TOTAL_SUPPLY: u128 = 1_000_000_000_000;
function get_epoch_manager (line 116) | fn get_epoch_manager(
function record_block (line 168) | pub fn record_block(
function get_all_shards_care_about (line 201) | fn get_all_shards_care_about(
function get_all_shards_will_care_about (line 213) | fn get_all_shards_will_care_about(
function test_track_all_shards (line 226) | fn test_track_all_shards() {
FILE: chain/epoch-manager/src/test_utils.rs
constant DEFAULT_GAS_PRICE (line 32) | pub const DEFAULT_GAS_PRICE: u128 = 100;
constant DEFAULT_TOTAL_SUPPLY (line 33) | pub const DEFAULT_TOTAL_SUPPLY: u128 = 1_000_000_000_000;
constant TEST_SEED (line 34) | pub const TEST_SEED: RngSeed = [3; 32];
function hash_range (line 36) | pub fn hash_range(num: usize) -> Vec<CryptoHash> {
function epoch_info (line 44) | pub fn epoch_info(
function epoch_info_with_num_seats (line 74) | pub fn epoch_info_with_num_seats(
function epoch_config_with_production_config (line 142) | pub fn epoch_config_with_production_config(
function epoch_config (line 176) | pub fn epoch_config(
function power (line 197) | pub fn power(account_id: AccountId, w: Power) -> ValidatorPower {
function pledge (line 202) | pub fn pledge(account_id: AccountId, pledge: Balance) -> ValidatorPledge {
function default_reward_calculator (line 208) | pub fn default_reward_calculator() -> RewardCalculator {
function reward (line 221) | pub fn reward(info: Vec<(AccountId, Balance)>) -> HashMap<AccountId, Bal...
function setup_epoch_manager (line 225) | pub fn setup_epoch_manager(
function setup_default_epoch_manager (line 261) | pub fn setup_default_epoch_manager(
function setup_epoch_manager_with_block_and_chunk_producers (line 288) | pub fn setup_epoch_manager_with_block_and_chunk_producers(
function record_block_with_final_block_hash (line 355) | pub fn record_block_with_final_block_hash(
function record_block_with_slashes (line 403) | pub fn record_block_with_slashes(
function record_block (line 451) | pub fn record_block(
function block_info (line 470) | pub fn block_info(
function record_with_block_info (line 530) | pub fn record_with_block_info(epoch_manager: &mut EpochManager, block_in...
FILE: chain/epoch-manager/src/tests/mod.rs
method get_num_validator_blocks (line 27) | fn get_num_validator_blocks(
function test_power_validator (line 47) | fn test_power_validator() {
function test_validator_change_of_pledge (line 140) | fn test_validator_change_of_pledge() {
function test_fork_finalization (line 208) | fn test_fork_finalization() {
function test_one_validator_kickout (line 338) | fn test_one_validator_kickout() {
function test_validator_kickout (line 370) | fn test_validator_kickout() {
function test_validator_unpledge (line 441) | fn test_validator_unpledge() {
function test_slashing (line 524) | fn test_slashing() {
function test_double_sign_slashing1 (line 603) | fn test_double_sign_slashing1() {
function test_double_sign_slashing2 (line 691) | fn test_double_sign_slashing2() {
function test_all_validators_unpledge (line 742) | fn test_all_validators_unpledge() {
function test_validator_reward_one_validator (line 783) | fn test_validator_reward_one_validator() {
function test_validator_reward_weight_by_pledge (line 913) | fn test_validator_reward_weight_by_pledge() {
function test_reward_multiple_shards (line 1022) | fn test_reward_multiple_shards() {
function test_unpledge_and_then_change_pledge (line 1136) | fn test_unpledge_and_then_change_pledge() {
function test_expected_chunks (line 1181) | fn test_expected_chunks() {
function test_expected_chunks_prev_block_not_produced (line 1256) | fn test_expected_chunks_prev_block_not_produced() {
function update_tracker (line 1336) | fn update_tracker(
function test_epoch_info_aggregator (line 1354) | fn test_epoch_info_aggregator() {
function test_epoch_info_aggregator_data_loss (line 1399) | fn test_epoch_info_aggregator_data_loss() {
function test_epoch_info_aggregator_reorg_past_final_block (line 1443) | fn test_epoch_info_aggregator_reorg_past_final_block() {
function test_epoch_info_aggregator_reorg_beginning_of_epoch (line 1483) | fn test_epoch_info_aggregator_reorg_beginning_of_epoch() {
function count_missing_blocks (line 1524) | fn count_missing_blocks(
function test_num_missing_blocks (line 1545) | fn test_num_missing_blocks() {
function test_chunk_validator_kickout (line 1600) | fn test_chunk_validator_kickout() {
function test_compare_epoch_id (line 1687) | fn test_compare_epoch_id() {
function test_fishermen (line 1718) | fn test_fishermen() {
function test_fishermen_unpledge (line 1755) | fn test_fishermen_unpledge() {
function test_validator_consistency (line 1803) | fn test_validator_consistency() {
function test_finalize_epoch_large_epoch_length (line 1829) | fn test_finalize_epoch_large_epoch_length() {
function test_kickout_set (line 1860) | fn test_kickout_set() {
function test_epoch_height_increase (line 1916) | fn test_epoch_height_increase() {
function test_unpledge_slash (line 1936) | fn test_unpledge_slash() {
function test_no_unpledge_slash (line 1986) | fn test_no_unpledge_slash() {
function test_slash_non_validator (line 2036) | fn test_slash_non_validator() {
function test_slash_repledge (line 2089) | fn test_slash_repledge() {
function test_all_kickout_edge_case (line 2140) | fn test_all_kickout_edge_case() {
function check_validators (line 2248) | fn check_validators(epoch_info: &EpochInfo, expected_validators: &[(&str...
function check_fishermen (line 2257) | fn check_fishermen(epoch_info: &EpochInfo, expected_fishermen: &[(&str, ...
function check_pledge_change (line 2265) | fn check_pledge_change(epoch_info: &EpochInfo, changes: Vec<(AccountId, ...
function check_reward (line 2269) | fn che
Copy disabled (too large)
Download .json
Condensed preview — 1727 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (27,800K chars).
[
{
"path": ".cargo/audit.toml",
"chars": 1831,
"preview": "[advisories]\nignore = [\n # DO NOT ADD ANYTHING TO THIS LIST WITHOUT CAREFUL CONSIDERATION!\n\n # dotenv being unmain"
},
{
"path": ".cargo/config.toml",
"chars": 272,
"preview": "[build]\n# We compile with `panic=abort`, so we need `-Cforce-unwind-tables=y`\n# to get a useful backtrace on panic.\nrust"
},
{
"path": ".config/nextest.toml",
"chars": 854,
"preview": "[profile.default]\nslow-timeout = { period = \"60s\", terminate-after = 2, grace-period = \"0s\" }\n\n[[profile.default.overrid"
},
{
"path": ".dockerignore",
"chars": 303,
"preview": ".idea/\n.vscode/\n\ndocker/\n!docker/scripts/\nops/\n!ops/run.sh\n!ops/tendermint-config.toml\n\n**/target\nstorage/\nkeystore/\ntmp"
},
{
"path": ".gitattributes",
"chars": 255,
"preview": "**/package-lock.json linguist-generated=true -diff\n# Disable linguist for WebAssembly files.\n# Those are used to test th"
},
{
"path": ".github/ISSUE_TEMPLATE/01_BUG_REPORT.md",
"chars": 705,
"preview": "---\nname: Bug Report\nabout: In case you have found a bug in our product.\ntitle: \"bug: \"\nlabels: \"bug\"\nassignees: \"\"\n---\n"
},
{
"path": ".github/ISSUE_TEMPLATE/02_FEATURE_REQUEST.md",
"chars": 902,
"preview": "---\nname: Feature Request\nabout: If you have any idea to contribute to the Utility project.\ntitle: \"feat: \"\nlabels: \"enh"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 1416,
"preview": "# Pull Request type\n\n<!-- Check the [contributing guide](../../CONTRIBUTING.md) -->\n\n<!-- Please try to limit your pull "
},
{
"path": ".github/RELEASE_TEMPLATE.md",
"chars": 380,
"preview": "# unc-node vx.x.x\n\n# Versions\n\nNode Version: x.x.x\n\n# Breaking changes\n<!-- Does this upgrade include any breadking chan"
},
{
"path": ".github/workflows/calculate-alpha-release.bash",
"chars": 1878,
"preview": "#!/bin/bash\n\n# Exit on error. Append \"|| true\" if you expect an error.\nset -o errexit\n# Exit on error inside any functio"
},
{
"path": ".github/workflows/crates_publish.yml",
"chars": 1494,
"preview": "name: Crates Publish\n\non:\n workflow_dispatch:\n inputs:\n branch:\n type: string\n required: true\n "
},
{
"path": ".github/workflows/default.yml",
"chars": 6981,
"preview": "name: Lint Check && nextest && build\non:\n push:\n branches:\n - main\n - develop\n pull_request:\n branches"
},
{
"path": ".github/workflows/gh_pages.yml",
"chars": 1526,
"preview": "name: Book Pages\n\non:\n push:\n branches:\n - main\n pull_request:\n paths:\n - 'docs/**'\n - '.github/workflo"
},
{
"path": ".github/workflows/issue_metrics.yml",
"chars": 1184,
"preview": "name: Monthly issue metrics\n\non:\n workflow_dispatch:\n schedule:\n - cron: '3 2 1 * *'\n\npermissions:\n issues: write\n"
},
{
"path": ".github/workflows/release_binaries.yml",
"chars": 3082,
"preview": "name: Release Binaries\non:\n push:\n branches-ignore:\n - '**'\n tags:\n - \"v[0-9]+.[0-9]+.[0-9]+\"\n - \""
},
{
"path": ".github/workflows/release_docker.yml",
"chars": 13718,
"preview": "name: Release Docker\n# Trigger on all push events, new semantic version tags, and all PRs\non:\n push:\n branches-ignor"
},
{
"path": ".gitignore",
"chars": 931,
"preview": "# Generated by Cargo\n# will have compiled files and executables\ntarget\n/target_expensive/\n/sandbox\ndocker-build\n/grafana"
},
{
"path": ".gitmodules",
"chars": 74,
"preview": "[submodule \"ops\"]\n\tpath = ops\n\turl = https://github.com/utnet-org/ops.git\n"
},
{
"path": ".pre-commit-config.yaml",
"chars": 96,
"preview": "- repo: https://github.com/doublify/pre-commit-rust\n rev: master\n hooks:\n - id: fmt"
},
{
"path": ".style.yapf",
"chars": 67,
"preview": "[style]\nbased_on_style = google\nindent_width = 4\ncolumn_limit = 80\n"
},
{
"path": "ATTRIBUTIONS.md",
"chars": 67257,
"preview": "# Utility Client Attributions\n\nWe have taken inspiration and few pieces of code from:\n\n* [OpenEthereum](https://github.c"
},
{
"path": "CODEOWNERS",
"chars": 98,
"preview": "# CODEOWNERS: https://help.github.com/articles/about-codeowners/\n\n* @utnet-org/utility-codeowners\n"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3352,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "CONTRIBUTING.md",
"chars": 8136,
"preview": "Thank you for your interest in contributing to the Utility reference client! We\nwelcome contributions from everyone. B"
},
{
"path": "Cargo.toml",
"chars": 14295,
"preview": "[workspace.package]\nversion = \"0.0.0\" # managed by cargo-workspaces, see below\nauthors = [\"Hello Inc <hello@utnet.org>\"]"
},
{
"path": "Dockerfile",
"chars": 1598,
"preview": "# syntax=docker/dockerfile-upstream:experimental\n\nFROM ubuntu:22.04 as build\n\nRUN apt-get update -qq && apt-get install "
},
{
"path": "Justfile",
"chars": 6280,
"preview": "# FIXME: some of these tests don't work very well on MacOS at the moment. Should fix\n# them at earliest convenience :)\n#"
},
{
"path": "LICENSE-GPL2",
"chars": 17985,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc."
},
{
"path": "LICENSE-GPL2.1",
"chars": 17005,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 2.1, February 1999\n\n Copyright (C) 19"
},
{
"path": "Makefile",
"chars": 3147,
"preview": "export DOCKER_BUILDKIT = 1\nexport CARGO_BUILD_RUSTFLAGS = -D warnings\nexport UNC_RELEASE_BUILD = no\nexport CARGO_TARGET_"
},
{
"path": "README.md",
"chars": 5249,
"preview": "<br />\n<br />\n\n<p align=\"center\">\n<img src=\"docs/images/logo.gif\" width=\"240\">\n</p>\n\n<br />\n<br />\n\n]\npub enum Error {\n InvalidPartMessage,\n In"
},
{
"path": "chain/chunks-primitives/src/lib.rs",
"chars": 34,
"preview": "mod error;\n\npub use error::Error;\n"
},
{
"path": "chain/client/Cargo.toml",
"chars": 3022,
"preview": "[package]\nname = \"unc-client\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\nrust-version.wo"
},
{
"path": "chain/client/src/adapter.rs",
"chars": 11419,
"preview": "use crate::client_actor::ClientActor;\nuse crate::view_client::ViewClientActor;\nuse unc_network::types::{NetworkInfo, Rea"
},
{
"path": "chain/client/src/adversarial.rs",
"chars": 1546,
"preview": "#[cfg(feature = \"test_features\")]\nmod adv {\n use std::sync::atomic::Ordering;\n\n #[derive(Default)]\n struct Inne"
},
{
"path": "chain/client/src/chunk_validation.rs",
"chars": 21250,
"preview": "use std::collections::HashMap;\nuse std::sync::Arc;\nuse unc_async::messaging::{CanSend, Sender};\nuse unc_chain::migration"
},
{
"path": "chain/client/src/client.rs",
"chars": 117498,
"preview": "//! Client is responsible for tracking the chain, chunks, and producing them when needed.\n//! This client works complete"
},
{
"path": "chain/client/src/client_actor.rs",
"chars": 86530,
"preview": "//! Client actor orchestrates Client and facilitates network connection.\n//! It should just serve as a coordinator class"
},
{
"path": "chain/client/src/config_updater.rs",
"chars": 2095,
"preview": "use std::sync::Arc;\nuse tokio::sync::broadcast::Receiver;\nuse unc_chain_configs::UpdateableClientConfig;\nuse unc_dyn_con"
},
{
"path": "chain/client/src/debug.rs",
"chars": 30500,
"preview": "//! Structs in this file are used for debug purposes, and might change at any time\n//! without backwards compatibility.\n"
},
{
"path": "chain/client/src/info.rs",
"chars": 39270,
"preview": "use crate::config_updater::ConfigUpdater;\nuse crate::{metrics, SyncStatus};\nuse actix::Addr;\nuse itertools::Itertools;\nu"
},
{
"path": "chain/client/src/lib.rs",
"chars": 1390,
"preview": "pub use unc_client_primitives::types::{\n Error, GetBlock, GetBlockProof, GetBlockProofResponse, GetBlockWithMerkleTre"
},
{
"path": "chain/client/src/metrics.rs",
"chars": 17807,
"preview": "use once_cell::sync::Lazy;\nuse unc_o11y::metrics::{\n exponential_buckets, try_create_counter, try_create_gauge, try_c"
},
{
"path": "chain/client/src/sync/adapter.rs",
"chars": 3869,
"preview": "use super::sync_actor::SyncActor;\nuse actix::dev::ToEnvelope;\nuse actix::prelude::SendError;\nuse actix::{Actor, Message}"
},
{
"path": "chain/client/src/sync/block.rs",
"chars": 19698,
"preview": "use chrono::{DateTime, Duration, Utc};\nuse rand::seq::IteratorRandom;\nuse tracing::{debug, warn};\nuse unc_async::messagi"
},
{
"path": "chain/client/src/sync/epoch.rs",
"chars": 3186,
"preview": "use chrono::{DateTime, Duration, Utc};\nuse std::collections::{HashMap, HashSet};\nuse std::time::Duration as TimeDuration"
},
{
"path": "chain/client/src/sync/external.rs",
"chars": 15589,
"preview": "use crate::metrics;\nuse futures::TryStreamExt;\nuse std::io::{Read, Write};\nuse std::path::PathBuf;\nuse std::sync::Arc;\nu"
},
{
"path": "chain/client/src/sync/header.rs",
"chars": 37346,
"preview": "use chrono::{DateTime, Duration, Utc};\nuse rand::seq::SliceRandom;\nuse rand::thread_rng;\nuse std::cmp::min;\nuse std::tim"
},
{
"path": "chain/client/src/sync/mod.rs",
"chars": 116,
"preview": "pub mod adapter;\npub mod block;\npub mod epoch;\npub mod external;\npub mod header;\npub mod state;\npub mod sync_actor;\n"
},
{
"path": "chain/client/src/sync/state.rs",
"chars": 59063,
"preview": "//! State sync is trying to fetch the 'full state' from the peers (which can be multiple GB).\n//! It happens after Heade"
},
{
"path": "chain/client/src/sync/sync_actor.rs",
"chars": 3888,
"preview": "use super::adapter::{SyncMessage as ClientSyncMessage, SyncShardInfo};\nuse tracing::{debug, info, warn};\nuse unc_async::"
},
{
"path": "chain/client/src/sync_jobs_actor.rs",
"chars": 6826,
"preview": "use crate::ClientActor;\nuse actix::AsyncContext;\nuse std::time::Duration;\n\nuse unc_chain::chain::{\n do_apply_chunks, "
},
{
"path": "chain/client/src/test_utils/block_stats.rs",
"chars": 3581,
"preview": "use std::cmp::max;\nuse std::collections::HashMap;\nuse std::time::{Duration, Instant};\n\nuse tracing::info;\nuse unc_primit"
},
{
"path": "chain/client/src/test_utils/client.rs",
"chars": 11207,
"preview": "// FIXME(nagisa): Is there a good reason we're triggering this? Luckily though this is just test\n// code so we're in the"
},
{
"path": "chain/client/src/test_utils/mod.rs",
"chars": 265,
"preview": "pub mod block_stats;\npub mod client;\npub mod peer_manager_mock;\npub mod setup;\npub mod test_env;\npub mod test_env_builde"
},
{
"path": "chain/client/src/test_utils/peer_manager_mock.rs",
"chars": 1092,
"preview": "use unc_network::types::SetChainInfo;\nuse unc_network::types::{PeerManagerMessageRequest, PeerManagerMessageResponse};\n\n"
},
{
"path": "chain/client/src/test_utils/setup.rs",
"chars": 46078,
"preview": "// FIXME(nagisa): Is there a good reason we're triggering this? Luckily though this is just test\n// code so we're in the"
},
{
"path": "chain/client/src/test_utils/test_env.rs",
"chars": 24249,
"preview": "use std::collections::HashMap;\nuse std::sync::{Arc, Mutex};\nuse std::time::Instant;\n\nuse crate::adapter::ProcessTxRespon"
},
{
"path": "chain/client/src/test_utils/test_env_builder.rs",
"chars": 22790,
"preview": "use super::setup::{setup_client_with_runtime, setup_synchronous_shards_manager};\nuse super::test_env::TestEnv;\nuse super"
},
{
"path": "chain/client/src/tests/bug_repros.rs",
"chars": 14395,
"preview": "// This test tracks tests that reproduce previously fixed bugs to make sure the regressions we\n// fix do not resurface\n\n"
},
{
"path": "chain/client/src/tests/catching_up.rs",
"chars": 36708,
"preview": "use std::collections::hash_map::Entry;\nuse std::collections::{HashMap, HashSet};\nuse std::sync::{Arc, RwLock};\n\nuse acti"
},
{
"path": "chain/client/src/tests/chunks_management.rs",
"chars": 1871,
"preview": "use std::collections::HashSet;\n\nuse crate::test_utils::TestEnv;\nuse unc_async::messaging::CanSend;\nuse unc_chain::ChainG"
},
{
"path": "chain/client/src/tests/consensus.rs",
"chars": 14726,
"preview": "use std::collections::{BTreeMap, HashMap, HashSet};\nuse std::sync::{Arc, RwLock, RwLockWriteGuard};\n\nuse actix::System;\n"
},
{
"path": "chain/client/src/tests/cross_shard_tx.rs",
"chars": 22720,
"preview": "#![allow(unused_imports)]\n\nuse std::collections::HashSet;\nuse std::sync::atomic::{AtomicUsize, Ordering};\nuse std::sync:"
},
{
"path": "chain/client/src/tests/doomslug.rs",
"chars": 1746,
"preview": "use crate::test_utils::TestEnv;\nuse unc_chain::{ChainGenesis, Provenance};\nuse unc_crypto::KeyType;\nuse unc_o11y::teston"
},
{
"path": "chain/client/src/tests/maintenance_windows.rs",
"chars": 2355,
"preview": "use crate::test_utils::setup_no_network;\nuse actix::System;\nuse futures::{future, FutureExt};\nuse unc_actix_test_utils::"
},
{
"path": "chain/client/src/tests/mod.rs",
"chars": 168,
"preview": "mod bug_repros;\nmod catching_up;\nmod chunks_management;\nmod consensus;\nmod cross_shard_tx;\nmod doomslug;\nmod maintenance"
},
{
"path": "chain/client/src/tests/process_blocks.rs",
"chars": 6104,
"preview": "use crate::test_utils::TestEnv;\nuse assert_matches::assert_matches;\nuse std::sync::Arc;\nuse unc_chain::{test_utils, Chai"
},
{
"path": "chain/client/src/tests/query_client.rs",
"chars": 15911,
"preview": "use actix::System;\nuse futures::{future, FutureExt};\nuse std::sync::Arc;\nuse std::time::Duration;\nuse unc_chain::test_ut"
},
{
"path": "chain/client/src/view_client.rs",
"chars": 72177,
"preview": "//! Readonly view of the chain and state of the database.\n//! Useful for querying from RPC.\n\nuse crate::adapter::{\n A"
},
{
"path": "chain/client-primitives/Cargo.toml",
"chars": 879,
"preview": "[package]\nname = \"unc-client-primitives\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\ndesc"
},
{
"path": "chain/client-primitives/src/debug.rs",
"chars": 8009,
"preview": "//! Structs in this module are used for debug purposes, and might change at any time\n//! without backwards compatibility"
},
{
"path": "chain/client-primitives/src/lib.rs",
"chars": 30,
"preview": "pub mod debug;\npub mod types;\n"
},
{
"path": "chain/client-primitives/src/types.rs",
"chars": 48006,
"preview": "use actix::Message;\nuse chrono::DateTime;\nuse chrono::Utc;\nuse std::collections::HashMap;\nuse std::sync::atomic::{Atomic"
},
{
"path": "chain/epoch-manager/Cargo.toml",
"chars": 1408,
"preview": "[package]\nname = \"unc-epoch-manager\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\nrust-ver"
},
{
"path": "chain/epoch-manager/README.md",
"chars": 2472,
"preview": "# unc-epoch-manager crate\n\nEpoch manager crate is responsible for code related to epochs and epoch switching.\nAn epoch i"
},
{
"path": "chain/epoch-manager/src/adapter.rs",
"chars": 37815,
"preview": "use crate::types::BlockHeaderInfo;\n#[cfg(feature = \"new_epoch_sync\")]\nuse crate::EpochInfoAggregator;\nuse crate::EpochMa"
},
{
"path": "chain/epoch-manager/src/lib.rs",
"chars": 112726,
"preview": "use crate::proposals::proposals_to_block_summary;\nuse crate::proposals::proposals_to_epoch_info;\nuse crate::types::Epoch"
},
{
"path": "chain/epoch-manager/src/proposals.rs",
"chars": 16001,
"preview": "use std::collections::HashMap;\n\nuse unc_primitives::epoch_manager::block_info::BlockInfo;\nuse unc_primitives::epoch_mana"
},
{
"path": "chain/epoch-manager/src/reward_calculator.rs",
"chars": 17374,
"preview": "use std::collections::HashMap;\n\nuse num_rational::Rational32;\nuse primitive_types::U256;\n\nuse unc_chain_configs::Genesis"
},
{
"path": "chain/epoch-manager/src/shard_assignment.rs",
"chars": 13836,
"preview": "use unc_primitives::types::validator_power::ValidatorPower;\nuse unc_primitives::types::validator_power_and_pledge::Valid"
},
{
"path": "chain/epoch-manager/src/shard_tracker.rs",
"chars": 8889,
"preview": "use std::sync::Arc;\n\nuse crate::EpochManagerAdapter;\nuse unc_primitives::hash::CryptoHash;\nuse unc_primitives::types::{A"
},
{
"path": "chain/epoch-manager/src/test_utils.rs",
"chars": 18166,
"preview": "use std::collections::{BTreeMap, HashMap};\n\nuse num_rational::Ratio;\nuse unc_primitives::types::{EpochId, Power};\nuse un"
},
{
"path": "chain/epoch-manager/src/tests/mod.rs",
"chars": 108096,
"preview": "mod random_epochs;\n\nuse std::vec;\n\nuse super::*;\nuse crate::reward_calculator::NUM_NS_IN_SECOND;\nuse crate::test_utils::"
},
{
"path": "chain/epoch-manager/src/tests/random_epochs.rs",
"chars": 15398,
"preview": "use rand::prelude::StdRng;\nuse rand::{Rng, SeedableRng};\nuse std::collections::{BTreeMap, BTreeSet, HashMap};\nuse std::s"
},
{
"path": "chain/epoch-manager/src/types.rs",
"chars": 11953,
"preview": "use borsh::{BorshDeserialize, BorshSerialize};\nuse std::collections::{BTreeMap, HashMap};\nuse tracing::{debug, debug_spa"
},
{
"path": "chain/epoch-manager/src/validator_selection.rs",
"chars": 63391,
"preview": "use crate::shard_assignment::assign_shards;\nuse num_rational::Ratio;\nuse std::cmp::{self, Ordering};\nuse std::collection"
},
{
"path": "chain/indexer/CHANGELOG.md",
"chars": 5975,
"preview": "# Changelog\n\n## 0.10.0\n\n* `state_changes` field is moved from the top-level `StreamerMessage` to `IndexerShard` struct t"
},
{
"path": "chain/indexer/Cargo.toml",
"chars": 1608,
"preview": "[package]\nname = \"unc-indexer\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\nrust-version.w"
},
{
"path": "chain/indexer/README.md",
"chars": 5413,
"preview": "# Utility Indexer\n\nUtility Indexer is a micro-utility. which provides you with a stream of blocks that are recorded on U"
},
{
"path": "chain/indexer/src/lib.rs",
"chars": 6236,
"preview": "#![doc = include_str!(\"../README.md\")]\n\nuse anyhow::Context;\nuse tokio::sync::mpsc;\n\nuse unc_chain_configs::GenesisValid"
},
{
"path": "chain/indexer/src/streamer/errors.rs",
"chars": 331,
"preview": "use actix::MailboxError;\n\n/// Error occurs in case of failed data fetch\n#[derive(Debug)]\npub enum FailedToFetchData {\n "
},
{
"path": "chain/indexer/src/streamer/fetchers.rs",
"chars": 6580,
"preview": "//! Streamer watches the network and collects all the blocks and related chunks\n//! into one struct and pushes in in to "
},
{
"path": "chain/indexer/src/streamer/metrics.rs",
"chars": 1331,
"preview": "use once_cell::sync::Lazy;\nuse unc_o11y::metrics::{\n try_create_histogram, try_create_int_counter, try_create_int_gau"
},
{
"path": "chain/indexer/src/streamer/mod.rs",
"chars": 15481,
"preview": "use self::errors::FailedToFetchData;\nuse self::fetchers::{\n fetch_block, fetch_block_by_height, fetch_block_chunks, f"
},
{
"path": "chain/indexer/src/streamer/utils.rs",
"chars": 2839,
"preview": "use actix::Addr;\n\nuse node_runtime::config::tx_cost;\nuse unc_indexer_primitives::IndexerTransactionWithOutcome;\nuse unc_"
},
{
"path": "chain/indexer-primitives/Cargo.toml",
"chars": 527,
"preview": "[package]\nname = \"unc-indexer-primitives\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\ndes"
},
{
"path": "chain/indexer-primitives/README.md",
"chars": 175,
"preview": "# unc-indexer-primitives\n\nThis crate holds the types that is used in UNC Indexer Framework to allow other projects to us"
},
{
"path": "chain/indexer-primitives/src/lib.rs",
"chars": 1500,
"preview": "pub use unc_primitives::hash::CryptoHash;\npub use unc_primitives::{self, types, views};\n\n/// Resulting struct represents"
},
{
"path": "chain/jsonrpc/CHANGELOG.md",
"chars": 2370,
"preview": "# Changelog\n\n## 0.2.3\n\n* Added `send_tx` method which gives configurable execution guarantees options and potentially re"
},
{
"path": "chain/jsonrpc/Cargo.toml",
"chars": 1980,
"preview": "[package]\nname = \"unc-jsonrpc\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\nrust-version.w"
},
{
"path": "chain/jsonrpc/README.md",
"chars": 2276,
"preview": "# JSON-RPC API for infra\n\n[JSON-RPC](https://www.jsonrpc.org/) API for unc-infra.node exposes handles to\ninspect the dat"
},
{
"path": "chain/jsonrpc/client/Cargo.toml",
"chars": 669,
"preview": "[package]\nname = \"unc-jsonrpc-client\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\nrust-ve"
},
{
"path": "chain/jsonrpc/client/src/lib.rs",
"chars": 11173,
"preview": "use awc::{Client, Connector};\nuse futures::{future, future::LocalBoxFuture, FutureExt, TryFutureExt};\nuse std::time::Dur"
},
{
"path": "chain/jsonrpc/fuzz/.gitignore",
"chars": 25,
"preview": "\ntarget\ncorpus\nartifacts\n"
},
{
"path": "chain/jsonrpc/fuzz/Cargo.toml",
"chars": 735,
"preview": "[package]\nname = \"unc-jsonrpc-fuzz\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\nrust-vers"
},
{
"path": "chain/jsonrpc/fuzz/fuzz_targets_disabled/fuzz_target_1.rs",
"chars": 4775,
"preview": "#![no_main]\nuse actix::System;\nuse libfuzzer_sys::{arbitrary, fuzz_target};\nuse serde::ser::{Serialize, Serializer};\nuse"
},
{
"path": "chain/jsonrpc/jsonrpc-tests/Cargo.toml",
"chars": 1407,
"preview": "[package]\nname = \"unc-jsonrpc-tests\"\nversion.workspace = true\nauthors.workspace = true\nedition.workspace = true\nrust-ver"
},
{
"path": "chain/jsonrpc/jsonrpc-tests/res/genesis_config.json",
"chars": 1452,
"preview": "{\n \"protocol_version\": 64,\n \"genesis_time\": \"1970-01-01T00:00:00.000000000Z\",\n \"chain_id\": \"sample\",\n \"genesis_heigh"
},
{
"path": "chain/jsonrpc/jsonrpc-tests/src/lib.rs",
"chars": 4426,
"preview": "use std::sync::Arc;\n\nuse actix::Addr;\nuse futures::{future, future::LocalBoxFuture, FutureExt, TryFutureExt};\nuse once_c"
},
{
"path": "chain/jsonrpc/jsonrpc-tests/tests/http_query.rs",
"chars": 839,
"preview": "use actix::System;\nuse futures::{future, FutureExt};\n\nuse unc_actix_test_utils::run_actix;\nuse unc_jsonrpc::client::new_"
},
{
"path": "chain/jsonrpc/jsonrpc-tests/tests/rpc_query.rs",
"chars": 22896,
"preview": "use std::ops::ControlFlow;\nuse std::str::FromStr;\n\nuse actix::System;\nuse futures::{future, FutureExt};\nuse serde_json::"
},
{
"path": "chain/jsonrpc/jsonrpc-tests/tests/rpc_transactions.rs",
"chars": 10044,
"preview": "use std::sync::{Arc, Mutex};\n\nuse actix::{Actor, System};\n\nuse futures::{future, FutureExt, TryFutureExt};\n\nuse unc_acti"
},
{
"path": "chain/jsonrpc/res/chain_n_chunk_info.css",
"chars": 335,
"preview": "table {\n width: 100%;\n border-collapse: collapse;\n}\n\ntable,\nth,\ntd {\n border: 1px solid black;\n}\n\ntd {\n text"
},
{
"path": "chain/jsonrpc/res/chain_n_chunk_info.html",
"chars": 7860,
"preview": "<!DOCTYPE html>\n<head>\n <link rel=\"stylesheet\" href=\"chain_n_chunk_info.css\">\n <script src=\"https://ajax.googleapi"
},
{
"path": "chain/jsonrpc/res/debug.html",
"chars": 3040,
"preview": "<html>\n\n<head>\n <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js\"></script>\n <script>"
},
{
"path": "chain/jsonrpc/res/epoch_info.css",
"chars": 335,
"preview": "table {\n width: 100%;\n border-collapse: collapse;\n}\n\ntable,\nth,\ntd {\n border: 1px solid black;\n}\n\ntd {\n text"
},
{
"path": "chain/jsonrpc/res/epoch_info.html",
"chars": 14299,
"preview": "<html>\n\n<head>\n <link rel=\"stylesheet\" href=\"epoch_info.css\">\n <script src=\"https://ajax.googleapis.com/ajax/libs/j"
},
{
"path": "chain/jsonrpc/res/last_blocks.css",
"chars": 1523,
"preview": ".explanation {\n color: gray;\n}\n\n.missed-blocks,\n.missed-chunks {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n\nbu"
},
{
"path": "chain/jsonrpc/res/last_blocks.html",
"chars": 901,
"preview": "<html>\n\n<head>\n <link rel=\"stylesheet\" href=\"last_blocks.css\">\n <script src=\"https://unpkg.com/@babel/standalone/b"
},
{
"path": "chain/jsonrpc/res/last_blocks.js",
"chars": 13881,
"preview": "function ellipsify(str, maxLen) {\n if (str.length > maxLen) {\n return str.substring(0, maxLen - 3) + '...';\n "
},
{
"path": "chain/jsonrpc/res/network_info.css",
"chars": 649,
"preview": "table {\n width: 100%;\n border-collapse: collapse;\n}\n\ntable,\nth,\ntd {\n border: 1px solid black;\n}\n\ntd {\n text"
},
{
"path": "chain/jsonrpc/res/network_info.html",
"chars": 16591,
"preview": "<html>\n\n<head>\n <link rel=\"stylesheet\" href=\"network_info.css\">\n <script src=\"https://ajax.googleapis.com/ajax/lib"
},
{
"path": "chain/jsonrpc/res/network_info.js",
"chars": 3783,
"preview": "function convertTime(millis) {\n if (millis == null) {\n return '(null)';\n }\n let total_seconds = Math.flo"
},
{
"path": "chain/jsonrpc/res/rpc_errors_schema.json",
"chars": 21044,
"preview": "{\n \"schema\": {\n \"AccessKeyNotFound\": {\n \"name\": \"AccessKeyNotFound\",\n \"subtypes\": [],\n \"props\": {\n "
},
{
"path": "chain/jsonrpc/res/split_store.html",
"chars": 1072,
"preview": "<html>\n\n<head>\n <title> Split Store </title>\n</head>\n\n<body>\n <h1>\n Split Store\n </h1>\n\n <ul>\n "
},
{
"path": "chain/jsonrpc/res/sync.css",
"chars": 335,
"preview": "table {\n width: 100%;\n border-collapse: collapse;\n}\n\ntable,\nth,\ntd {\n border: 1px solid black;\n}\n\ntd {\n text"
},
{
"path": "chain/jsonrpc/res/sync.html",
"chars": 9914,
"preview": "<html>\n\n<head>\n <link rel=\"stylesheet\" href=\"sync.css\">\n <script src=\"https://ajax.googleapis.com/ajax/libs/jquery"
},
{
"path": "chain/jsonrpc/res/tier1_network_info.html",
"chars": 7015,
"preview": "<html>\n\n<head>\n <link rel=\"stylesheet\" href=\"network_info.css\">\n <script src=\"https://ajax.googleapis.com/ajax/lib"
},
{
"path": "chain/jsonrpc/res/validator.css",
"chars": 1137,
"preview": "table {\n width: 100%;\n border-collapse: collapse;\n}\n\ntable,\nth,\ntd {\n border: 1px solid black;\n}\n\ntd {\n text"
},
{
"path": "chain/jsonrpc/res/validator.html",
"chars": 17568,
"preview": "<html>\n\n<head>\n <link rel=\"stylesheet\" href=\"validator.css\">\n <script src=\"https://ajax.googleapis.com/ajax/libs/j"
},
{
"path": "chain/jsonrpc/src/api/all_miners.rs",
"chars": 2289,
"preview": "use serde_json::Value;\n\nuse unc_client_primitives::types::GetAllMinersError;\nuse unc_jsonrpc_primitives::errors::RpcPars"
},
{
"path": "chain/jsonrpc/src/api/blocks.rs",
"chars": 1566,
"preview": "use serde_json::Value;\n\nuse unc_client_primitives::types::GetBlockError;\nuse unc_jsonrpc_primitives::errors::RpcParseErr"
},
{
"path": "chain/jsonrpc/src/api/changes.rs",
"chars": 2549,
"preview": "use serde_json::Value;\n\nuse unc_client_primitives::types::{GetBlockError, GetStateChangesError};\nuse unc_jsonrpc_primiti"
},
{
"path": "chain/jsonrpc/src/api/chunks.rs",
"chars": 2775,
"preview": "use serde_json::Value;\n\nuse unc_client_primitives::types::{GetChunk, GetChunkError};\nuse unc_jsonrpc_primitives::errors:"
},
{
"path": "chain/jsonrpc/src/api/client_config.rs",
"chars": 1006,
"preview": "use unc_client_primitives::types::GetClientConfigError;\nuse unc_jsonrpc_primitives::types::client_config::RpcClientConfi"
},
{
"path": "chain/jsonrpc/src/api/config.rs",
"chars": 1471,
"preview": "use serde_json::Value;\n\nuse unc_client_primitives::types::GetProtocolConfigError;\nuse unc_jsonrpc_primitives::errors::Rp"
},
{
"path": "chain/jsonrpc/src/api/gas_price.rs",
"chars": 1437,
"preview": "use serde_json::Value;\n\nuse unc_client_primitives::types::GetGasPriceError;\nuse unc_jsonrpc_primitives::errors::RpcParse"
},
{
"path": "chain/jsonrpc/src/api/light_client.rs",
"chars": 5089,
"preview": "use std::sync::Arc;\n\nuse serde_json::Value;\n\nuse unc_client_primitives::types::{\n GetBlockProofError, GetExecutionOut"
},
{
"path": "chain/jsonrpc/src/api/maintenance.rs",
"chars": 1214,
"preview": "use serde_json::Value;\n\nuse unc_client_primitives::types::GetMaintenanceWindowsError;\nuse unc_jsonrpc_primitives::errors"
},
{
"path": "chain/jsonrpc/src/api/mod.rs",
"chars": 5245,
"preview": "use serde_json::Value;\n\nuse unc_jsonrpc_primitives::errors::RpcParseError;\nuse unc_jsonrpc_primitives::errors::{RpcError"
},
{
"path": "chain/jsonrpc/src/api/network_info.rs",
"chars": 1913,
"preview": "use super::{RpcFrom, RpcInto};\nuse unc_client_primitives::types::NetworkInfoResponse;\nuse unc_client_primitives::types::"
},
{
"path": "chain/jsonrpc/src/api/provider.rs",
"chars": 3758,
"preview": "use serde_json::Value;\nuse unc_primitives::types::EpochId;\n\nuse unc_client_primitives::types::{GetProviderError, GetProv"
}
]
// ... and 1527 more files (download for full content)
About this extraction
This page contains the full source code of the utnet-org/utility GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1727 files (25.5 MB), approximately 6.8M tokens, and a symbol index with 15643 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.