Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/cargo/h2-0.3.26
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienFT authored May 21, 2024
2 parents 8006364 + f9d6c7f commit 62dbc2a
Show file tree
Hide file tree
Showing 39 changed files with 1,070 additions and 221 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ jobs:
with:
shared-key: "check"
save-if: ${{ github.ref_name == 'main' }}
- uses: arduino/setup-protoc@v1
- uses: arduino/setup-protoc@v3
with:
version: '3.x'
version: '23.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/cargo@v1
with:
Expand All @@ -89,9 +89,9 @@ jobs:
with:
shared-key: "clippy"
save-if: ${{ github.ref_name == 'main' }}
- uses: arduino/setup-protoc@v1
- uses: arduino/setup-protoc@v3
with:
version: '3.x'
version: '23.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/clippy-check@v1
with:
Expand Down Expand Up @@ -197,9 +197,10 @@ jobs:
with:
shared-key: "massa"
save-if: ${{ github.ref_name == 'main' }}
- uses: arduino/setup-protoc@v1
- uses: arduino/setup-protoc@v3
with:
version: '3.x'
version: "23.x"
include-pre-releases: false
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -280,9 +281,9 @@ jobs:
with:
shared-key: "doc"
save-if: ${{ github.ref_name == 'main' }}
- uses: arduino/setup-protoc@v1
- uses: arduino/setup-protoc@v3
with:
version: '3.x'
version: '23.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/cargo@v1
with:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/config/link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"ignorePatterns": [
{
"pattern": "(localhost|my\\.massa|discord\\.com)"
},
{
"pattern": "^http://manpages.ubuntu.com"
},
{
"pattern": "^https://test.massa.net/api/v2"
},
{
"pattern": "^https://buildnet.massa.net/api/v2"
}
],
"replacementPatterns": [
{
"pattern": "^/",
"replacement": "https://docs.massa.net/"
}
],
"timeout": "20s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [
200,
206,
0
]
}
25 changes: 25 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check dead links

on:
pull_request:
branches:
- main
schedule:
- cron: '0 10 * * 6'

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install markdown-link-check
run: npm install -g markdown-link-check
- name: Check links in markdown files
run: |
find . \( -name '*.md' -o -name '*.mdx' \) \
-exec markdown-link-check -v -c .github/workflows/config/link-check.json --progress {} \; 2>&1 | tee linkcheck.out
grep -F -wc "[✖] |ERROR" ./linkcheck.out && exit 1 || true
20 changes: 12 additions & 8 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ massa_versioning = { path = "./massa-versioning" }
massa_wallet = { path = "./massa-wallet" }

# Massa projects dependencies
massa-proto-rs = { git = "https://github.com/massalabs/massa-proto-rs", "rev" = "426fd325a55dfcc4033920bed2de075a7e7ad4b7" }
massa-sc-runtime = { git = "https://github.com/massalabs/massa-sc-runtime", "rev" = "e95066a6d3a963ff0125616f404a84e5abb63d63" }
massa-proto-rs = { git = "https://github.com/massalabs/massa-proto-rs", "rev" = "38950875a7aa406fedc4f0b8336864e5ff290f2c" }
massa-sc-runtime = { git = "https://github.com/massalabs/massa-sc-runtime", "rev" = "80352eb9f2a6b90a441cd64433d8874c33fb384f" }
peernet = { git = "https://github.com/massalabs/PeerNet", "rev" = "04b05ddd320fbe76cc858115af7b5fc28bdb8310" }

# Common dependencies
Expand All @@ -121,6 +121,7 @@ async-trait = "0.1"
bitvec = "1.0"
blake3 = "=1.5"
bs58 = "=0.5"
cfg-if = "1.0.0"
clap = { version = "4.4", features = ["derive", "cargo"] }
config = "0.13"
console = "0.15"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ introduction video is available [here](https://www.youtube.com/watch?v=NUUFhvd7u

Massa's purpose is to make it easy to deploy fully decentralized applications. We've developed two key technologies that
are exclusive to Massa to help make this possible:
[autonomous smart contracts](https://docs.massa.net/en/latest/general-doc/autonomous-sc.html) and native
[front-end hosting](https://docs.massa.net/en/latest/general-doc/decentralized-web.html).
[autonomous smart contracts](https://docs.massa.net/docs/learn/asc/intro) and native
[front-end hosting](https://docs.massa.net/docs/learn/decentralized-web).

Here is a list of tools to easily build applications on the Massa blockchain:

- [JS Client library](https://github.com/massalabs/massa-web3) to connect to the Massa blockchain from your applications.
- [AssemblyScript](https://github.com/massalabs/massa-as-sdk) SDKs to write smart contracts.
- [Examples of applications](https://github.com/massalabs/massa-sc-examples) built on Massa.
- [Explorer](https://test.massa.net).
- [Explorer](https://explorer.massa.net/mainnet).
- [Interactive API specification](https://playground.open-rpc.org/?schemaUrl=https://test.massa.net/api/v2&uiSchema\[appBar\]\[ui:input\]=false&uiSchema\[appBar\]\[ui:inputPlaceholder\]=Enter+Massa+JSON-RPC+server+URL&uiSchema\[appBar\]\[ui:logoUrl\]=https://massa.net/favicons/favicon.ico&uiSchema\[appBar\]\[ui:splitView\]=false&uiSchema\[appBar\]\[ui:darkMode\]=false&uiSchema\[appBar\]\[ui:title\]=Massa&uiSchema\[appBar\]\[ui:examplesDropdown\]=false&uiSchema\[methods\]\[ui:defaultExpanded\]=false&uiSchema\[methods\]\[ui:methodPlugins\]=true&uiSchema\[params\]\[ui:defaultExpanded\]=false).
- [Lots of documentation](https://docs.massa.net), from [web3 development](https://docs.massa.net/docs/build/home)
to [Massa's architecture](https://docs.massa.net/docs/learn/home).
Expand Down
2 changes: 2 additions & 0 deletions massa-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ edition = "2021"
[features]
test-exports = ["dep:massa_channel", "dep:massa_grpc", "massa_grpc/test-exports"]
execution-trace = ["massa_execution_exports/execution-trace"]
dump-block = ["massa_execution_exports/dump-block"]


[dependencies]
massa_api_exports = { workspace = true }
Expand Down
14 changes: 14 additions & 0 deletions massa-api/src/tests/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,13 @@ async fn execute_read_only_bytecode() {
block_info: None,
state_changes: massa_final_state::StateChanges::default(),
events: massa_execution_exports::EventStore::default(),
#[cfg(feature = "execution-trace")]
slot_trace: None,
#[cfg(feature = "dump-block")]
storage: None,
deferred_credits_execution: vec![],
cancel_async_message_execution: vec![],
auto_sell_execution: vec![],
},
gas_cost: 100,
call_result: "toto".as_bytes().to_vec(),
Expand Down Expand Up @@ -774,6 +781,13 @@ async fn execute_read_only_call() {
block_info: None,
state_changes: massa_final_state::StateChanges::default(),
events: massa_execution_exports::EventStore::default(),
#[cfg(feature = "execution-trace")]
slot_trace: None,
#[cfg(feature = "dump-block")]
storage: None,
deferred_credits_execution: vec![],
cancel_async_message_execution: vec![],
auto_sell_execution: vec![],
},
gas_cost: 100,
call_result: "toto".as_bytes().to_vec(),
Expand Down
2 changes: 2 additions & 0 deletions massa-execution-exports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ edition = "2021"
gas_calibration = ["tempfile"]
test-exports = ["massa_models/test-exports", "tempfile", "mockall"]
execution-trace = ["massa-sc-runtime/execution-trace"]
dump-block = []
execution-info = ["execution-trace"]

[dependencies]
displaydoc = {workspace = true}
Expand Down
2 changes: 1 addition & 1 deletion massa-execution-exports/src/channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use crate::types::SlotExecutionOutput;

#[cfg(feature = "execution-trace")]
use crate::types::SlotAbiCallStack;
use crate::types_trace_info::SlotAbiCallStack;

/// channels used by the execution worker
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion massa-execution-exports/src/controller_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::collections::BTreeMap;
use std::collections::HashMap;

#[cfg(feature = "execution-trace")]
use crate::types::{AbiTrace, SlotAbiCallStack, Transfer};
use crate::types_trace_info::{AbiTrace, SlotAbiCallStack, Transfer};

#[cfg_attr(feature = "test-exports", mockall::automock)]
/// interface that communicates with the execution worker thread
Expand Down
5 changes: 4 additions & 1 deletion massa-execution-exports/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ pub use types::{
#[cfg(any(feature = "test-exports", feature = "gas_calibration"))]
pub mod test_exports;

/// types for execution-trace / execution-info
pub mod types_trace_info;

#[cfg(feature = "execution-trace")]
pub use types::{
pub use types_trace_info::{
AbiTrace, SCRuntimeAbiTraceType, SCRuntimeAbiTraceValue, SlotAbiCallStack, Transfer,
};
2 changes: 2 additions & 0 deletions massa-execution-exports/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@ pub struct ExecutionConfig {
pub broadcast_slot_execution_traces_channel_capacity: usize,
/// Max execution traces slot to keep in trace history cache
pub max_execution_traces_slot_limit: usize,
/// Where to dump blocks
pub block_dump_folder_path: PathBuf,
}
11 changes: 10 additions & 1 deletion massa-execution-exports/src/test_exports/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ impl Default for ExecutionConfig {
.expect("Overflow when creating constant ledger_entry_datastore_base_size"),
};

// Create a tmp dir then only storing the path will drop the original tmp dir object
// thus deleting the folders
// So we need to create it manually (not really safe but ok for unit testing)
let hd_cache_path = TempDir::new().unwrap().path().to_path_buf();
std::fs::create_dir_all(hd_cache_path.clone()).unwrap();
let block_dump_folder_path = TempDir::new().unwrap().path().to_path_buf();
std::fs::create_dir_all(block_dump_folder_path.clone()).unwrap();

Self {
readonly_queue_length: 100,
max_final_events: 1000,
Expand Down Expand Up @@ -57,7 +65,7 @@ impl Default for ExecutionConfig {
.unwrap(),
base_operation_gas_cost: BASE_OPERATION_GAS_COST,
last_start_period: 0,
hd_cache_path: TempDir::new().unwrap().path().to_path_buf(),
hd_cache_path,
lru_cache_size: 1000,
hd_cache_size: 10_000,
snip_amount: 10,
Expand All @@ -72,6 +80,7 @@ impl Default for ExecutionConfig {
broadcast_traces_enabled: true,
broadcast_slot_execution_traces_channel_capacity: 5000,
max_execution_traces_slot_limit: 320,
block_dump_folder_path,
}
}
}
Loading

0 comments on commit 62dbc2a

Please sign in to comment.