stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 667 forks source link

Stacks panics with 'Failed to deserialize vm.Value: Error("missing field `pre_comments`")' #3945

Closed EmbeddedAndroid closed 1 year ago

EmbeddedAndroid commented 1 year ago

Describe the bug I've built the develop (https://github.com/stacks-network/stacks-blockchain/commit/2eea67546c39e54ff2bb74d8a538367615e033e6) branch to run on a mainnet node, and it crashes with the following output:

INFO [1695059816.193324] [testnet/stacks-node/src/main.rs:82] [main] stacks-node 2.4.0.0.0 (wallet:a5f3f23302a2f8c76e1bc99f84e1e18c86f7b395, release build, linux [x86_64])
INFO [1695059816.193357] [testnet/stacks-node/src/main.rs:140] [main] Loading config at path /src/stacks-node/Config.toml
INFO [1695059816.276221] [testnet/stacks-node/src/event_dispatcher.rs:1004] [main] Registering event observer at: localhost:3700
INFO [1695059816.285628] [stackslib/src/chainstate/coordinator/mod.rs:3199] [main] Migrating sortition DB to the latest schema version
INFO [1695059816.286634] [stackslib/src/chainstate/coordinator/mod.rs:3203] [main] Migrating chainstate DB to the latest schema version
INFO [1695059816.289297] [testnet/stacks-node/src/run_loop/neon.rs:404] [main] Start syncing Bitcoin headers, feel free to grab a cup of coffee, this can take a while
INFO [1695059816.609092] [stackslib/src/burnchains/burnchain.rs:1495] [main] Syncing Bitcoin blocks: 100.0% (808315 to 808316 out of 808318)
INFO [1695059816.845536] [testnet/stacks-node/src/run_loop/neon.rs:342] [main] Miner node: checking UTXOs at address: 1Bzr6gS4zjMpDDvtPNYbonxjPbTeJPHfsW
INFO [1695059816.846736] [testnet/stacks-node/src/run_loop/neon.rs:347] [main] UTXOs found - will run as a Miner node
INFO [1695059818.947959] [testnet/stacks-node/src/neon_node.rs:3906] [main] Will bootstrap from peers [02da7a464ac770ae8337a343670778b93410f2f3fef6bea98dd1c3e9224459d36b@18000009+00000001://35.194.79.91:20444, 02afeae522aab5f8c99a00ddf75fbcb4a641e052dd48836408d9cf437344b63516@18000009+00000001://35.194.79.91:20444, 03652212ea76be0ed4cd83a25c06e57819993029a7b9999f7d63c36340b34a4e62@18000009+00000001://35.194.79.91:20444]
INFO [1695059818.979495] [testnet/stacks-node/src/neon_node.rs:4318] [main] Start HTTP server on: 0.0.0.0:20443
INFO [1695059818.979509] [testnet/stacks-node/src/neon_node.rs:4319] [main] Start P2P server on: 0.0.0.0:20444
INFO [1695059819.513025] [stackslib/src/chainstate/burn/db/sortdb.rs:1498] [chains-coordinator-0.0.0.0:20443] PoX recipient chosen, recipient: 14-b67ba85d58fbe16155fef693eed529047571ef17, block_height: 800688
INFO [1695059819.513328] [stackslib/src/chainstate/burn/db/sortdb.rs:1498] [chains-coordinator-0.0.0.0:20443] PoX recipient chosen, recipient: 16-9982ebecae89be1c5a8a03d95e134c4a1704a5f3, block_height: 800688
INFO [1695059819.694382] [stackslib/src/chainstate/burn/db/sortdb.rs:4832] [chains-coordinator-0.0.0.0:20443] ACCEPTED(800688) leader block commit 7e4296a3ba4bcbde747e69568d0c4254acbdec572776fcaa8025c743474d1b24 at 800688,99, apparent_sender: 1Kiq1dyVBzYLWGrBPWjChvKyzB2H95x5RJ
INFO [1695059819.695486] [stackslib/src/chainstate/burn/db/sortdb.rs:4832] [chains-coordinator-0.0.0.0:20443] ACCEPTED(800688) leader block commit 325aa90e26277c49412ce7cc9a14770e8bf498d531d10bb7718c50e23133a7e4 at 800688,100, apparent_sender: 18hofVCQv8cMDpqDNqSXyrUDffq7MKLxiu
INFO [1695059819.696494] [stackslib/src/chainstate/burn/db/sortdb.rs:4832] [chains-coordinator-0.0.0.0:20443] ACCEPTED(800688) leader block commit b1f00f75f3640c53917f00bececd4d663e4ac00b90bdf8c58adfa0cab5a79a4b at 800688,101, apparent_sender: 1UiW61F9xnBnnC1J69aPJhFm3ZXvZEkCm
WARN [1695059819.795323] [stackslib/src/net/p2p.rs:2711] [p2p-(0.0.0.0:20444,0.0.0.0:20443)] local.1://(bind=0.0.0.0:20444)(pub=None): failed to learn public IP: NoSuchNeighbor
INFO [1695059819.835453] [stackslib/src/net/http.rs:1687] [p2p-(0.0.0.0:20444,0.0.0.0:20443)] Handle HTTPRequest, verb: GET, peer_addr: 127.0.0.1:36164, path: /v2/info, query:
WARN [1695059819.835845] [stackslib/src/net/p2p.rs:2711] [p2p-(0.0.0.0:20444,0.0.0.0:20443)] local.1://(bind=0.0.0.0:20444)(pub=None): failed to learn public IP: NoSuchNeighbor
ERRO [1695059819.908940] [testnet/stacks-node/src/main.rs:58] [chains-coordinator-0.0.0.0:20443] Process abort due to thread panic: panicked at 'Failed to deserialize vm.Value: Error("missing field `pre_comments`", line: 1, column: 468)', clarity/./src/vm/database/structures.rs:124:1
INFO [1695059819.937705] [stackslib/src/net/p2p.rs:2593] [p2p-(0.0.0.0:20444,0.0.0.0:20443)] IP address changed from None to Some((00000000000000000000ffff0a000e10, 20444))
ERRO [1695059820.152544] [testnet/stacks-node/src/main.rs:60] [chains-coordinator-0.0.0.0:20443] Panic backtrace:    0: stacks_node::main::{{closure}}
             at src/testnet/stacks-node/src/main.rs:59:18
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/alloc/src/boxed.rs:2007:9
      std::panicking::rust_panic_with_hook
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:709:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:597:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys_common/backtrace.rs:151:18
   4: rust_begin_unwind
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
   5: core::panicking::panic_fmt
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
   6: core::result::unwrap_failed
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1651:5
   7: core::result::Result<T,E>::expect
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1033:23
      <clarity::vm::contracts::Contract as clarity::vm::database::structures::ClarityDeserializable<clarity::vm::contracts::Contract>>::deserialize
             at src/clarity/./src/vm/database/structures.rs:67:17
   8: clarity::vm::database::clarity_db::ClarityDatabase::fetch_metadata::{{closure}}::{{closure}}
             at src/clarity/./src/vm/database/clarity_db.rs:632:40
      core::option::Option<T>::map
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/option.rs:1075:29
      clarity::vm::database::clarity_db::ClarityDatabase::fetch_metadata::{{closure}}
             at src/clarity/./src/vm/database/clarity_db.rs:632:32
      core::result::Result<T,E>::map
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:746:25
      clarity::vm::database::clarity_db::ClarityDatabase::fetch_metadata
             at src/clarity/./src/vm/database/clarity_db.rs:630:9
      clarity::vm::database::clarity_db::ClarityDatabase::get_contract
             at src/clarity/./src/vm/database/clarity_db.rs:718:39
   9: clarity::vm::costs::TrackerData::load_costs
             at src/clarity/./src/vm/costs/mod.rs:758:46
  10: clarity::vm::costs::LimitedCostTracker::new
             at src/clarity/./src/vm/costs/mod.rs:665:9
  11: blockstack_lib::clarity_vm::clarity::ClarityInstance::begin_block
             at src/stackslib/src/clarity_vm/clarity.rs:309:17
  12: blockstack_lib::chainstate::stacks::db::StacksChainState::inner_clarity_tx_begin
             at src/stackslib/src/chainstate/stacks/db/mod.rs:2066:32
  13: blockstack_lib::chainstate::stacks::db::StacksChainState::chainstate_block_begin
             at src/stackslib/src/chainstate/stacks/db/mod.rs:1777:9
      blockstack_lib::chainstate::stacks::db::blocks::<impl blockstack_lib::chainstate::stacks::db::StacksChainState>::setup_block
             at src/stackslib/src/chainstate/stacks/db/blocks.rs:5468:30
  14: blockstack_lib::chainstate::stacks::db::blocks::<impl blockstack_lib::chainstate::stacks::db::StacksChainState>::append_block
             at src/stackslib/src/chainstate/stacks/db/blocks.rs:5837:13
  15: blockstack_lib::chainstate::stacks::db::blocks::<impl blockstack_lib::chainstate::stacks::db::StacksChainState>::process_next_staging_block
             at src/stackslib/src/chainstate/stacks/db/blocks.rs:6469:53
      blockstack_lib::chainstate::stacks::db::blocks::<impl blockstack_lib::chainstate::stacks::db::StacksChainState>::process_blocks
             at src/stackslib/src/chainstate/stacks/db/blocks.rs:6683:19
  16: blockstack_lib::chainstate::coordinator::ChainsCoordinator<T,N,U,CE,FE,B>::process_ready_blocks
             at src/stackslib/src/chainstate/coordinator/mod.rs:2914:36
  17: blockstack_lib::chainstate::coordinator::ChainsCoordinator<T,N,U,CE,FE,B>::inner_handle_new_burnchain_block
             at src/stackslib/src/chainstate/coordinator/mod.rs:2486:39
  18: blockstack_lib::chainstate::coordinator::ChainsCoordinator<T,N,U,CE,FE,B>::handle_new_burnchain_block
             at src/stackslib/src/chainstate/coordinator/mod.rs:2145:9
      blockstack_lib::chainstate::coordinator::ChainsCoordinator<T,blockstack_lib::chainstate::coordinator::comm::ArcCounterCoordinatorNotices,blockstack_lib::chainstate::coordinator::OnChainRewardSetProvider,CE,FE,B>::run
             at src/stackslib/src/chainstate/coordinator/mod.rs:424:23
  19: stacks_node::run_loop::neon::RunLoop::spawn_chains_coordinator::{{closure}}
             at src/testnet/stacks-node/src/run_loop/neon.rs:552:17
      std::sys_common::backtrace::__rust_begin_short_backtrace
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys_common/backtrace.rs:135:18
  20: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/thread/mod.rs:529:17
      <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panic/unwind_safe.rs:271:9
      std::panicking::try::do_call
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:500:40
      std::panicking::try
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:464:19
      std::panic::catch_unwind
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panic.rs:142:14
      std::thread::Builder::spawn_unchecked_::{{closure}}
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/thread/mod.rs:528:30
      core::ops::function::FnOnce::call_once{{vtable.shim}}
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/ops/function.rs:250:5
  21: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/alloc/src/boxed.rs:1993:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/alloc/src/boxed.rs:1993:9
      std::sys::unix::thread::Thread::new::thread_start
             at rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys/unix/thread.rs:108:17

Dumping core for pid 1

This only occurs when there is existing blockchain data or you restore from a snapshot. If you don't have existing data, the node syncs.

Steps To Reproduce

  1. Build the tip of the develop branch
  2. Load snapshot from https://archive.hiro.so/mainnet/stacks-blockchain/ or use existing data
  3. Run node

Expected behavior The stacks node runs, and migrates any data sources to new schema if required.

Environment (please complete the following information):

Additional context The intent is to setup a node to do some signer / DKG testing, and thus the need to run from the tip of develop. We have a node doing a fresh sync but will take a few weeks to complete. It would be ideal if we could speed up that process by using the provided snapshots from hiro.

jcnelson commented 1 year ago

That missing field pre_comments is only available for nodes built with the developer_mode feature, which I'm pretty sure is not the case for the Hiro nodes that generate these snapshots. Can you build your node with developer_mode disabled and try again?

wileyj commented 1 year ago

That missing field pre_comments is only available for nodes built with the developer_mode feature, which I'm pretty sure is not the case for the Hiro nodes that generate these snapshots. Can you build your node with developer_mode disabled and try again?

something like this? cargo build --no-default-features --features monitoring_prom,slog_json --release

I don't see an option to disable that single feature outside of manually editing files.

other option would be to sync from genesis and share that chainstate, correct?

EmbeddedAndroid commented 1 year ago

That missing field pre_comments is only available for nodes built with the developer_mode feature, which I'm pretty sure is not the case for the Hiro nodes that generate these snapshots. Can you build your node with developer_mode disabled and try again?

This fixed the issue, thank you! I'm happy to document this, just point me in the right direction.

That missing field pre_comments is only available for nodes built with the developer_mode feature, which I'm pretty sure is not the case for the Hiro nodes that generate these snapshots. Can you build your node with developer_mode disabled and try again?

something like this? cargo build --no-default-features --features monitoring_prom,slog_json --release

This is the route I took, and it is working.

I don't see an option to disable that single feature outside of manually editing files.

I don't either.

EmbeddedAndroid commented 1 year ago

I spoke too spoon, after all the btc blocks were processed, it panic'd with the same error. Going to look deeper into how to disable developer-mode

wileyj commented 1 year ago

update: the diff/patch idea did not work. using a diff like this:

diff --git a/clarity/Cargo.toml b/clarity/Cargo.toml
index 523b95cba..86089991d 100644
--- a/clarity/Cargo.toml
+++ b/clarity/Cargo.toml
@@ -50,7 +50,7 @@ assert-json-diff = "1.0.0"
 # criterion = "0.3"

 [features]
-default = ["developer-mode"]
+default = []
 developer-mode = []
 slog_json = ["stacks_common/slog_json"]
 testing = []
diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml
index 19cd58172..28c7c9e2d 100644
--- a/stacks-common/Cargo.toml
+++ b/stacks-common/Cargo.toml
@@ -62,7 +62,7 @@ rstest_reuse = "0.1.3"
 assert-json-diff = "1.0.0"

 [features]
-default = ["developer-mode"]
+default = []
 developer-mode = []
 slog_json = ["slog-json"]
 testing = []
diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml
index 129ce3e8c..fcd917fd6 100644
--- a/stackslib/Cargo.toml
+++ b/stackslib/Cargo.toml
@@ -100,7 +100,7 @@ rstest = "0.17.0"
 rstest_reuse = "0.5.0"

 [features]
-default = ["developer-mode"]
+default = []
 profile-sqlite = []
 disable-costs = []
 developer-mode = []

produces errors like this:

    Compiling clarity v0.0.1 (/home/admin/stacks-blockchain/clarity)
error[E0609]: no field `span` on type `PreSymbolicExpression`
   --> clarity/./src/vm/ast/parser/v2/mod.rs:201:29
    |
201 |                     comment.span = token.span.clone();
    |                             ^^^^ unknown field
    |
    = note: available fields are: `pre_expr`, `id`

error[E0609]: no field `span` on type `PreSymbolicExpression`
   --> clarity/./src/vm/ast/parser/v2/mod.rs:228:83
    |
228 |                         self.add_diagnostic(ParseErrors::ExpectedWhitespace, node.span.clone())?;
    |                                                                                   ^^^^ unknown field
    |
    = note: available fields are: `pre_expr`, `id`

however, removing .clarity/Cargo.toml from the patchfile compiles, but produces the same error reported by @EmbeddedAndroid @obycode - any ideas here?

EmbeddedAndroid commented 1 year ago

I'm seeing the same as @wileyj

wileyj commented 1 year ago

note for others: syncing from genesis works but it's less than ideal vs using an existing chainstate. i'm running a genesis sync, but it will take a few days to reach chain tip before i can share an archive

wileyj commented 1 year ago

cc @jferrant since they hit the same error the other day

obycode commented 1 year ago

The intention is that developer-mode should not be enabled when building a node, only when pulling the clarity crate into other tools, like clarinet. I'm looking into the issues you've mentioned now.

EmbeddedAndroid commented 1 year ago

The intention is that developer-mode should not be enabled when building a node, only when pulling the clarity crate into other tools, like clarinet. I'm looking into the issues you've mentioned now.

What's the right way to disable developer-mode during a build? We've tried --no-default-features and hand edit the Cargo.toml to remove the defaults.

obycode commented 1 year ago

It used to be the case that the default build does have developer-mode disabled. I usually build like this:

cd stacks-blockchain/testnet/stacks-node
cargo build --features monitoring_prom,slog_json --release

Maybe something went wrong with the refactoring into stackslib. I'm digging into it now.

obycode commented 1 year ago

I think I see the problem. For some reason, the developer-mode is included in the default features for the clarity crate. Every other place in stacks-blockchain that includes a dependency on clarity includes a slog_json feature, which in turn, enables the slog_json feature in clarity (disabling the default features, including developer-mode). The new crate, libstackerdb does not include this slog_json feature, so it never overrides the default features of clarity, and that's what causes this issue. I think we can remove developer-mode from the default features for clarity and update dependencies (such as Clarinet) that want to enable that feature to do so explicitly.

obycode commented 1 year ago

I can open a PR for this change.

obycode commented 1 year ago

Can you verify if #3955 resolves the issue?

EmbeddedAndroid commented 1 year ago

Can you verify if #3955 resolves the issue?

Trying this now. I'll report back. Thanks @obycode

EmbeddedAndroid commented 1 year ago

Can you verify if #3955 resolves the issue?

Trying this now. I'll report back. Thanks @obycode

I tried a similar patches last night:

However it fails to compile with:

88.39    Compiling clarity v0.0.1 (/src/clarity)
90.31 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.31    --> clarity/./src/vm/ast/parser/v2/mod.rs:201:29
90.31     |
90.31 201 |                     comment.span = token.span.clone();
90.31     |                             ^^^^ unknown field
90.31     |
90.31     = note: available fields are: `pre_expr`, `id`
90.31
90.31 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.31    --> clarity/./src/vm/ast/parser/v2/mod.rs:228:83
90.31     |
90.31 228 |                         self.add_diagnostic(ParseErrors::ExpectedWhitespace, node.span.clone())?;
90.31     |                                                                                   ^^^^ unknown field
90.31     |
90.31     = note: available fields are: `pre_expr`, `id`
90.31
90.31 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.31    --> clarity/./src/vm/ast/parser/v2/mod.rs:241:31
90.31     |
90.31 241 | ...                   e.span = span.clone();
90.31     |                         ^^^^ unknown field
90.31     |
90.31     = note: available fields are: `pre_expr`, `id`
90.31
90.31 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.31    --> clarity/./src/vm/ast/parser/v2/mod.rs:258:31
90.31     |
90.31 258 | ...                   e.span = span.clone();
90.31     |                         ^^^^ unknown field
90.31     |
90.31     = note: available fields are: `pre_expr`, `id`
90.31
90.32 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.32    --> clarity/./src/vm/ast/parser/v2/mod.rs:310:35
90.32     |
90.32 310 | ...                   e.span = open_tuple.span.clone();
90.32     |                         ^^^^ unknown field
90.32     |
90.32     = note: available fields are: `pre_expr`, `id`
90.32
90.32 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.32    --> clarity/./src/vm/ast/parser/v2/mod.rs:342:37
90.32     |
90.32 342 |                         placeholder.span = token.span.clone();
90.32     |                                     ^^^^ unknown field
90.32     |
90.32     = note: available fields are: `pre_expr`, `id`
90.32
90.32 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.32    --> clarity/./src/vm/ast/parser/v2/mod.rs:349:27
90.32     |
90.32 349 |                         e.span = open_tuple.span.clone();
90.32     |                           ^^^^ unknown field
90.32     |
90.32     = note: available fields are: `pre_expr`, `id`
90.32
90.32 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.32    --> clarity/./src/vm/ast/parser/v2/mod.rs:387:45
90.32     |
90.32 387 | ...                   placeholder.span = eof_span;
90.32     |                                   ^^^^ unknown field
90.32     |
90.32     = note: available fields are: `pre_expr`, `id`
90.32
90.32 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.32    --> clarity/./src/vm/ast/parser/v2/mod.rs:396:35
90.32     |
90.32 396 | ...                   e.span = open_tuple.span.clone();
90.32     |                         ^^^^ unknown field
90.32     |
90.32     = note: available fields are: `pre_expr`, `id`
90.32
90.33 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.33    --> clarity/./src/vm/ast/parser/v2/mod.rs:427:27
90.33     |
90.33 427 |                         e.span = open_tuple.span.clone();
90.33     |                           ^^^^ unknown field
90.33     |
90.33     = note: available fields are: `pre_expr`, `id`
90.33
90.33 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.33    --> clarity/./src/vm/ast/parser/v2/mod.rs:448:27
90.33     |
90.33 448 |                         e.span = open_tuple.span.clone();
90.33     |                           ^^^^ unknown field
90.33     |
90.33     = note: available fields are: `pre_expr`, `id`
90.33
90.33 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.33    --> clarity/./src/vm/ast/parser/v2/mod.rs:492:19
90.33     |
90.33 492 |                 e.span = open_tuple.span.clone();
90.33     |                   ^^^^ unknown field
90.33     |
90.33     = note: available fields are: `pre_expr`, `id`
90.33
90.33 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.33    --> clarity/./src/vm/ast/parser/v2/mod.rs:510:19
90.33     |
90.33 510 |                 e.span = open_tuple.span.clone();
90.33     |                   ^^^^ unknown field
90.33     |
90.33     = note: available fields are: `pre_expr`, `id`
90.33
90.34 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.34    --> clarity/./src/vm/ast/parser/v2/mod.rs:533:29
90.34     |
90.34 533 |                 placeholder.span = span;
90.34     |                             ^^^^ unknown field
90.34     |
90.34     = note: available fields are: `pre_expr`, `id`
90.34
90.34 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.34    --> clarity/./src/vm/ast/parser/v2/mod.rs:565:33
90.34     |
90.34 565 |                     placeholder.span = span;
90.34     |                                 ^^^^ unknown field
90.34     |
90.34     = note: available fields are: `pre_expr`, `id`
90.34
90.34 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.34    --> clarity/./src/vm/ast/parser/v2/mod.rs:572:33
90.34     |
90.34 572 |                     placeholder.span = span;
90.34     |                                 ^^^^ unknown field
90.34     |
90.34     = note: available fields are: `pre_expr`, `id`
90.34
90.34 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.34    --> clarity/./src/vm/ast/parser/v2/mod.rs:584:29
90.34     |
90.34 584 |                 placeholder.span = span;
90.34     |                             ^^^^ unknown field
90.34     |
90.34     = note: available fields are: `pre_expr`, `id`
90.34
90.34 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.34    --> clarity/./src/vm/ast/parser/v2/mod.rs:596:33
90.34     |
90.34 596 |                     placeholder.span = span;
90.34     |                                 ^^^^ unknown field
90.34     |
90.34     = note: available fields are: `pre_expr`, `id`
90.34
90.34 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.34    --> clarity/./src/vm/ast/parser/v2/mod.rs:629:37
90.34     |
90.34 629 |                         placeholder.span = span;
90.34     |                                     ^^^^ unknown field
90.34     |
90.34     = note: available fields are: `pre_expr`, `id`
90.34
90.34 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.34    --> clarity/./src/vm/ast/parser/v2/mod.rs:641:37
90.34     |
90.34 641 |                         placeholder.span = span;
90.34     |                                     ^^^^ unknown field
90.34     |
90.34     = note: available fields are: `pre_expr`, `id`
90.34
90.35 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.35    --> clarity/./src/vm/ast/parser/v2/mod.rs:652:33
90.35     |
90.35 652 |                     placeholder.span = span;
90.35     |                                 ^^^^ unknown field
90.35     |
90.35     = note: available fields are: `pre_expr`, `id`
90.35
90.35 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.35    --> clarity/./src/vm/ast/parser/v2/mod.rs:666:37
90.35     |
90.35 666 |                         placeholder.span = span;
90.35     |                                     ^^^^ unknown field
90.35     |
90.35     = note: available fields are: `pre_expr`, `id`
90.35
90.35 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.35    --> clarity/./src/vm/ast/parser/v2/mod.rs:675:22
90.35     |
90.35 675 |                 expr.span = span;
90.35     |                      ^^^^ unknown field
90.35     |
90.35     = note: available fields are: `pre_expr`, `id`
90.35
90.35 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.35    --> clarity/./src/vm/ast/parser/v2/mod.rs:681:22
90.35     |
90.35 681 |                 expr.span = span;
90.35     |                      ^^^^ unknown field
90.35     |
90.35     = note: available fields are: `pre_expr`, `id`
90.35
90.35 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.35    --> clarity/./src/vm/ast/parser/v2/mod.rs:688:18
90.35     |
90.35 688 |             expr.span = span;
90.35     |                  ^^^^ unknown field
90.35     |
90.35     = note: available fields are: `pre_expr`, `id`
90.35
90.35 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.35    --> clarity/./src/vm/ast/parser/v2/mod.rs:712:29
90.35     |
90.35 712 |                 placeholder.span = span;
90.35     |                             ^^^^ unknown field
90.35     |
90.35     = note: available fields are: `pre_expr`, `id`
90.35
90.35 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.35    --> clarity/./src/vm/ast/parser/v2/mod.rs:718:29
90.35     |
90.35 718 |                 placeholder.span = span;
90.35     |                             ^^^^ unknown field
90.35     |
90.35     = note: available fields are: `pre_expr`, `id`
90.35
90.35 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.35    --> clarity/./src/vm/ast/parser/v2/mod.rs:726:25
90.35     |
90.35 726 |             placeholder.span = span;
90.35     |                         ^^^^ unknown field
90.35     |
90.35     = note: available fields are: `pre_expr`, `id`
90.35
90.36 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.36    --> clarity/./src/vm/ast/parser/v2/mod.rs:738:29
90.36     |
90.36 738 |                 placeholder.span = span;
90.36     |                             ^^^^ unknown field
90.36     |
90.36     = note: available fields are: `pre_expr`, `id`
90.36
90.36 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.36    --> clarity/./src/vm/ast/parser/v2/mod.rs:767:33
90.36     |
90.36 767 |                     placeholder.span = span;
90.36     |                                 ^^^^ unknown field
90.36     |
90.36     = note: available fields are: `pre_expr`, `id`
90.36
90.36 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.36    --> clarity/./src/vm/ast/parser/v2/mod.rs:776:33
90.36     |
90.36 776 |                     placeholder.span = span;
90.36     |                                 ^^^^ unknown field
90.36     |
90.36     = note: available fields are: `pre_expr`, `id`
90.36
90.36 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.36    --> clarity/./src/vm/ast/parser/v2/mod.rs:784:29
90.36     |
90.36 784 |                 placeholder.span = span;
90.36     |                             ^^^^ unknown field
90.36     |
90.36     = note: available fields are: `pre_expr`, `id`
90.36
90.36 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.36    --> clarity/./src/vm/ast/parser/v2/mod.rs:796:33
90.36     |
90.36 796 |                     placeholder.span = span;
90.36     |                                 ^^^^ unknown field
90.36     |
90.36     = note: available fields are: `pre_expr`, `id`
90.36
90.36 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.36    --> clarity/./src/vm/ast/parser/v2/mod.rs:802:18
90.36     |
90.36 802 |             expr.span = span;
90.36     |                  ^^^^ unknown field
90.36     |
90.36     = note: available fields are: `pre_expr`, `id`
90.36
90.36 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.36    --> clarity/./src/vm/ast/parser/v2/mod.rs:806:18
90.36     |
90.36 806 |             expr.span = span;
90.36     |                  ^^^^ unknown field
90.36     |
90.36     = note: available fields are: `pre_expr`, `id`
90.36
90.37 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.37    --> clarity/./src/vm/ast/parser/v2/mod.rs:881:34
90.37     |
90.37 881 | ...                   expr.span = token.span;
90.37     |                            ^^^^ unknown field
90.37     |
90.37     = note: available fields are: `pre_expr`, `id`
90.37
90.37 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.37    --> clarity/./src/vm/ast/parser/v2/mod.rs:895:34
90.37     |
90.37 895 | ...                   expr.span = token.span;
90.37     |                            ^^^^ unknown field
90.37     |
90.37     = note: available fields are: `pre_expr`, `id`
90.37
90.37 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.37    --> clarity/./src/vm/ast/parser/v2/mod.rs:910:34
90.37     |
90.37 910 | ...                   expr.span = token.span;
90.37     |                            ^^^^ unknown field
90.37     |
90.37     = note: available fields are: `pre_expr`, `id`
90.37
90.37 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.37    --> clarity/./src/vm/ast/parser/v2/mod.rs:925:34
90.37     |
90.37 925 | ...                   expr.span = token.span;
90.37     |                            ^^^^ unknown field
90.37     |
90.37     = note: available fields are: `pre_expr`, `id`
90.37
90.37 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.37    --> clarity/./src/vm/ast/parser/v2/mod.rs:947:34
90.37     |
90.37 947 | ...                   expr.span = token.span;
90.37     |                            ^^^^ unknown field
90.37     |
90.37     = note: available fields are: `pre_expr`, `id`
90.37
90.37 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.37    --> clarity/./src/vm/ast/parser/v2/mod.rs:969:34
90.37     |
90.37 969 | ...                   expr.span = token.span;
90.37     |                            ^^^^ unknown field
90.37     |
90.37     = note: available fields are: `pre_expr`, `id`
90.37
90.38 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.38    --> clarity/./src/vm/ast/parser/v2/mod.rs:992:34
90.38     |
90.38 992 | ...                   expr.span = token.span;
90.38     |                            ^^^^ unknown field
90.38     |
90.38     = note: available fields are: `pre_expr`, `id`
90.38
90.38 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.38     --> clarity/./src/vm/ast/parser/v2/mod.rs:1013:31
90.38      |
90.38 1013 | ...                   e.span = token.span;
90.38      |                         ^^^^ unknown field
90.38      |
90.38      = note: available fields are: `pre_expr`, `id`
90.38
90.38 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.38     --> clarity/./src/vm/ast/parser/v2/mod.rs:1018:31
90.38      |
90.38 1018 | ...                   e.span = token.span;
90.38      |                         ^^^^ unknown field
90.38      |
90.38      = note: available fields are: `pre_expr`, `id`
90.38
90.38 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.38     --> clarity/./src/vm/ast/parser/v2/mod.rs:1023:31
90.38      |
90.38 1023 | ...                   e.span = token.span;
90.38      |                         ^^^^ unknown field
90.38      |
90.38      = note: available fields are: `pre_expr`, `id`
90.38
90.40 error[E0609]: no field `span` on type `&PreSymbolicExpression`
90.40    --> clarity/./src/vm/ast/errors.rs:118:43
90.40     |
90.40 118 |         self.diagnostic.spans = vec![expr.span.clone()];
90.40     |                                           ^^^^ unknown field
90.40     |
90.40     = note: available fields are: `pre_expr`, `id`
90.40
90.40 error[E0609]: no field `span` on type `&PreSymbolicExpression`
90.40    --> clarity/./src/vm/ast/errors.rs:123:56
90.40     |
90.40 123 |         self.diagnostic.spans = exprs.iter().map(|e| e.span.clone()).collect();
90.40     |                                                        ^^^^ unknown field
90.40     |
90.40     = note: available fields are: `pre_expr`, `id`
90.40
90.41 error[E0609]: no field `span` on type `SymbolicExpression`
90.41    --> clarity/./src/vm/ast/sugar_expander/mod.rs:140:18
90.41     |
90.41 140 |             expr.span = pre_expr.span.clone();
90.41     |                  ^^^^ unknown field
90.41     |
90.41     = note: available fields are: `expr`, `id`
90.41
90.42 error[E0609]: no field `span` on type `PreSymbolicExpression`
90.42    --> clarity/./src/vm/ast/sugar_expander/mod.rs:140:34
90.42     |
90.42 140 |             expr.span = pre_expr.span.clone();
90.42     |                                  ^^^^ unknown field
90.42     |
90.42     = note: available fields are: `pre_expr`, `id`
90.42
91.20 error[E0609]: no field `span` on type `&SymbolicExpression`
91.20    --> clarity/./src/vm/analysis/errors.rs:213:43
91.20     |
91.20 213 |         self.diagnostic.spans = vec![expr.span.clone()];
91.20     |                                           ^^^^ unknown field
91.20     |
91.20     = note: available fields are: `expr`, `id`
91.20
91.20 error[E0609]: no field `span` on type `&SymbolicExpression`
91.20    --> clarity/./src/vm/analysis/errors.rs:218:56
91.20     |
91.20 218 |         self.diagnostic.spans = exprs.iter().map(|e| e.span.clone()).collect();
91.20     |                                                        ^^^^ unknown field
91.20     |
91.20     = note: available fields are: `expr`, `id`
91.20
91.65 error[E0609]: no field `span` on type `&SymbolicExpression`
91.65    --> clarity/./src/vm/coverage.rs:147:41
91.65     |
91.65 147 |                     let line = cur_expr.span.start_line;
91.65     |                                         ^^^^ unknown field
91.65     |
91.65     = note: available fields are: `expr`, `id`
91.65
91.78 For more information about this error, try `rustc --explain E0609`.
91.78 error: could not compile `clarity` (lib) due to 52 previous errors
91.79 warning: build failed, waiting for other jobs to finish...
93.30 warning: `stacks-common` (lib) generated 1 warning (run `cargo fix --lib -p stacks-common` to apply 1 suggestion)
obycode commented 1 year ago

Yes, @wileyj pointed that out to me. Sorry, I should've tried that. We'll need to fix that so that developer-mode is not required to build that crate. For a quicker workaround, I recommended this change, which @wileyj is trying now:

diff --git a/libstackerdb/Cargo.toml b/libstackerdb/Cargo.toml
index 53cf128ed..17c563770 100644
--- a/libstackerdb/Cargo.toml
+++ b/libstackerdb/Cargo.toml
@@ -31,3 +31,6 @@ sha2 = { version = "0.10", features = ["asm"] }

 [target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), target_env = "msvc"))'.dependencies]
 sha2 = { version = "0.10" }
+
+[features]
+slog_json = ["clarity/slog_json"]
\ No newline at end of file
diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml
index 129ce3e8c..e931e08ad 100644
--- a/stackslib/Cargo.toml
+++ b/stackslib/Cargo.toml
@@ -105,7 +105,7 @@ profile-sqlite = []
 disable-costs = []
 developer-mode = []
 monitoring_prom = ["prometheus"]
-slog_json = ["slog-json", "stacks-common/slog_json", "clarity/slog_json", "pox-locking/slog_json"]
+slog_json = ["slog-json", "stacks-common/slog_json", "clarity/slog_json", "pox-locking/slog_json", "libstackerdb/slog_json"]
 testing = []

 [target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(target_env = "msvc")))'.dependencies]
wileyj commented 1 year ago

compiling now! i'll report back if it is successful or not

wileyj commented 1 year ago

Yes, @wileyj pointed that out to me. Sorry, I should've tried that. We'll need to fix that so that developer-mode is not required to build that crate. For a quicker workaround, I recommended this change, which @wileyj is trying now:

diff --git a/libstackerdb/Cargo.toml b/libstackerdb/Cargo.toml
index 53cf128ed..17c563770 100644
--- a/libstackerdb/Cargo.toml
+++ b/libstackerdb/Cargo.toml
@@ -31,3 +31,6 @@ sha2 = { version = "0.10", features = ["asm"] }

 [target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), target_env = "msvc"))'.dependencies]
 sha2 = { version = "0.10" }
+
+[features]
+slog_json = ["clarity/slog_json"]
\ No newline at end of file
diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml
index 129ce3e8c..e931e08ad 100644
--- a/stackslib/Cargo.toml
+++ b/stackslib/Cargo.toml
@@ -105,7 +105,7 @@ profile-sqlite = []
 disable-costs = []
 developer-mode = []
 monitoring_prom = ["prometheus"]
-slog_json = ["slog-json", "stacks-common/slog_json", "clarity/slog_json", "pox-locking/slog_json"]
+slog_json = ["slog-json", "stacks-common/slog_json", "clarity/slog_json", "pox-locking/slog_json", "libstackerdb/slog_json"]
 testing = []

 [target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(target_env = "msvc")))'.dependencies]

no dice:

ERRO [1695234201.157389] [testnet/stacks-node/src/main.rs:58] [chains-coordinator-0.0.0.0:20443] Process abort due to thread panic: panicked at 'Failed to deserialize vm.Value: Error("missing field `pre_comments`", line: 1, column: 471)', clarity/./src/vm/database/structures.rs:124:1
EmbeddedAndroid commented 1 year ago

Confirmed that the fix is: https://github.com/stacks-network/stacks-blockchain/pull/3955

obycode commented 1 year ago

3955 has merged to develop!

wileyj commented 1 year ago

seems to be some regression when the branch was merged to develop. working on narrowing down which one; re-opening this issue to track

obycode commented 1 year ago

I missed that developer-mode was turned on by default in stackslib as well. I just opened #3978 to disable that. I think that should resolve the issue.

wileyj commented 1 year ago

I missed that developer-mode was turned on by default in stackslib as well. I just opened #3978 to disable that. I think that should resolve the issue.

confirmed the PR works as expected, thanks!