Skip to content

Commit 6a0ac5f

Browse files
authored
Merge branch 'dusk-network:master' into ffi-to-go-adoption
2 parents 56866d3 + 74d6227 commit 6a0ac5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2565
-938
lines changed

.github/workflows/rusk_ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ jobs:
6464
steps:
6565
- uses: actions/checkout@v4
6666
- uses: dsherret/rust-toolchain-file@v1
67-
- uses: Swatinem/rust-cache@v2
6867
- run: make wasm
6968
- run: make clippy
7069

@@ -76,5 +75,4 @@ jobs:
7675
steps:
7776
- uses: actions/checkout@v4
7877
- uses: dsherret/rust-toolchain-file@v1
79-
- uses: Swatinem/rust-cache@v2
8078
- run: make test

Cargo.lock

Lines changed: 4 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ hyper = "1.4.1"
117117
hyper-tungstenite = "0.13"
118118
hyper-util = "0.1.9"
119119
inquire = "0.7.5"
120-
k256 = "0.13"
120+
k256 = { version = "0.13", default-features = false, features = ["alloc"] }
121121
konst = "0.3.9"
122122
lazy_static = "1.5"
123123
lru = "0.12.4"

contracts/host_fn/src/lib.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,6 @@ impl HostFnTest {
8383
abi::keccak256(bytes)
8484
}
8585

86-
pub fn verify_secp256k1(
87-
&self,
88-
msg: Vec<u8>,
89-
pk: Vec<u8>,
90-
sig: Vec<u8>,
91-
) -> bool {
92-
abi::verify_secp256k1(msg, pk, sig)
93-
}
94-
9586
pub fn chain_id(&self) -> u8 {
9687
abi::chain_id()
9788
}
@@ -155,13 +146,6 @@ unsafe fn keccak256(arg_len: u32) -> u32 {
155146
abi::wrap_call(arg_len, |bytes| STATE.keccak256(bytes))
156147
}
157148

158-
#[no_mangle]
159-
unsafe fn verify_secp256k1(arg_len: u32) -> u32 {
160-
abi::wrap_call(arg_len, |(msg, pk, sig)| {
161-
STATE.verify_secp256k1(msg, pk, sig)
162-
})
163-
}
164-
165149
#[no_mangle]
166150
unsafe fn chain_id(arg_len: u32) -> u32 {
167151
abi::wrap_call(arg_len, |_: ()| STATE.chain_id())

core/src/abi.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ impl Query {
4646
pub const VERIFY_BLS_MULTISIG: &'static str = "verify_bls_multisig";
4747
/// Host-function name to compute the keccak256 hash.
4848
pub const KECCAK256: &'static str = "keccak256";
49-
/// Host-function name to verify secp256k1 signature.
50-
pub const VERIFY_SECP256K1: &'static str = "verify_secp256k1";
5149
}
5250

5351
#[cfg(feature = "abi")]
@@ -150,13 +148,6 @@ pub(crate) mod host_queries {
150148
host_query(Query::KECCAK256, bytes)
151149
}
152150

153-
/// Verify if a secp256k1 signature is valid for a given public key and
154-
/// message
155-
#[must_use]
156-
pub fn verify_secp256k1(msg: Vec<u8>, pk: Vec<u8>, sig: Vec<u8>) -> bool {
157-
host_query(Query::VERIFY_SECP256K1, (msg, pk, sig))
158-
}
159-
160151
/// Get the chain ID.
161152
///
162153
/// # Panics

explorer/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ and this project adheres to
1111
### Added
1212

1313
- Add Tokens page [#3415]
14+
- Add support for transactions' blob hashes [#3804]
1415

1516
### Changed
1617

1718
- Use supply.dusk.network for circulating supply [#3757]
19+
- The `from` and `to` fields are now always shown in moonlight transactions regardless of the transaction's type [#3804]
1820

1921
### Removed
2022

@@ -261,6 +263,7 @@ and this project adheres to
261263
[#3720]: https://github.com/dusk-network/rusk/issues/3720
262264
[#3739]: https://github.com/dusk-network/rusk/issues/3739
263265
[#3757]: https://github.com/dusk-network/rusk/issues/3757
266+
[#3804]: https://github.com/dusk-network/rusk/issues/3804
264267

265268
<!-- VERSIONS -->
266269

explorer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ VITE_RUSK_PATH="" # Optional, set to '/rusk' for dev mode
3636
VITE_STATS_REFETCH_INTERVAL=1000
3737
VITE_TRANSACTIONS_LIST_ENTRIES=100
3838
VITE_FEATURE_TOKENS=true
39+
VITE_FEATURE_BLOB_HASHES=true # requires node version >= 1.3.1-alpha.1
3940
```
4041

4142
## Environment variables and dev mode

explorer/src/lib/chain-info/__tests__/transformBlock.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,45 @@ describe("transformBlock", () => {
2525
transactions: {
2626
data: [
2727
{
28+
amount: undefined,
29+
blobHashes: [],
2830
blockhash:
2931
"bd5c99bb720b03500e89f103fe66113ba62f2e124ed9651563f38fd15977719f",
3032
blockheight: 495868,
3133
date: new Date(blockData.transactions[0].blockTimestamp * 1000),
3234
feepaid: 290866,
35+
from: undefined,
3336
gaslimit: 500000000,
3437
gasprice: 1,
3538
gasspent: 290866,
3639
memo: blockData.transactions[0].tx.memo,
3740
method: "transfer",
41+
nonce: undefined,
3842
payload: {},
3943
success: true,
44+
to: undefined,
4045
txerror: "",
4146
txid: "3a3f6f90a1012ae751b4448bcb8e98def0ba2b18170239bd69fcf8e2e37f0602",
4247
txtype: "Moonlight",
4348
},
4449
{
50+
amount: undefined,
51+
blobHashes: [],
4552
blockhash:
4653
"bd5c99bb720b03500e89f103fe66113ba62f2e124ed9651563f38fd15977719f",
4754
blockheight: 495868,
4855
date: new Date(blockData.transactions[1].blockTimestamp * 1000),
4956
feepaid: 289852,
57+
from: undefined,
5058
gaslimit: 500000000,
5159
gasprice: 1,
5260
gasspent: 289852,
5361
memo: blockData.transactions[1].tx.memo,
5462
method: "transfer",
63+
nonce: undefined,
5564
payload: {},
5665
success: true,
66+
to: undefined,
5767
txerror: "",
5868
txid: "07bfabea1d94c16f2dc3697fa642f6cecea6e81bf76b9644efbb6e2723b76d00",
5969
txtype: "Phoenix",

explorer/src/lib/chain-info/__tests__/transformTransaction.spec.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ describe("transformTransaction", () => {
88
const tx = gqlTransaction.tx;
99
const expectedTx = {
1010
amount: 9812378912731,
11+
blobHashes: [],
1112
blockhash:
1213
"3c6e4018cfa86723e50644e33d3990bc27fc794f6b49fbf6290e4d308e07bd2d",
1314
blockheight: 487166,
@@ -83,7 +84,7 @@ describe("transformTransaction", () => {
8384
callData: {
8485
contractId:
8586
"0200000000000000000000000000000000000000000000000000000000000000",
86-
fnName: "transfer",
87+
fnName: "stake",
8788
},
8889
isDeploy: true,
8990
},
@@ -104,6 +105,32 @@ describe("transformTransaction", () => {
104105
expect(transformTransaction(dataB)).toStrictEqual(expected);
105106
});
106107

108+
it('should set the method to "blob" if the transaction has blob hashes, regardless of the `isDeploy` or the `callData.fnName` fields', () => {
109+
const data = {
110+
...tx,
111+
tx: {
112+
...tx.tx,
113+
blobHashes: [
114+
"3656d71948baff2091090423f3b07701223b00d1a10942e44afe644a30865423",
115+
"d26d6ebba9bfb0504040eadec111627f9f562c358f40e035ea9011b48ed7b55b",
116+
],
117+
callData: {
118+
contractId:
119+
"0200000000000000000000000000000000000000000000000000000000000000",
120+
fnName: "stake",
121+
},
122+
isDeploy: true,
123+
},
124+
};
125+
const expected = {
126+
...expectedTx,
127+
blobHashes: data.tx.blobHashes,
128+
method: "blob",
129+
};
130+
131+
expect(transformTransaction(data)).toStrictEqual(expected);
132+
});
133+
107134
it("should set the success property to `false` if the an error is present and use the message in the `txerror` property", () => {
108135
const data = {
109136
...tx,

0 commit comments

Comments
 (0)