Judecoin Lab update #20260720
The upgrade of the Windows GUI wallet is nearing completion and is about to enter the final testing phase; it is expected to launch in August.
JUDECOIN
Judecoin updates and development notes.
The upgrade of the Windows GUI wallet is nearing completion and is about to enter the final testing phase; it is expected to launch in August.
If we are re-deriving states we still also need the historical quorums such that we can process incoming blocks with state changes. Without it, state changes will be ignored and skipped causing inconsistent state in the service node list.
This mandates a rescan and stores the most recent in state_ts, and only just quorums for states preceeding 10k intervals. We can no longer store the 1st most recent state in the DB as that will be missing quorums as well for similar reason when rederiving on start-up.
Greetings,
IANA has published a new Certificate Authority (CA) certificate used to validate the authenticity of the DNS root zone trust anchors file (root-anchors.xml).
The updated certificate bundle is available at:
https://data.iana.org/root-anchors/icannbundle.pem
This bundle currently contains both the existing certificate and its replacement certificate. Signatures chaining to the new certificate are expected to be published in 2028, at which point relying parties will need to validate using the new certificate.
Affected file(s):
src/common/dns_utils.cppPlease review whether the trust anchor validation material in this repository should be updated to include the current contents of icannbundle.pem.
Considerations for updating the trust anchor are described inDNSSEC Trust Anchor Publication for the Root Zone (RFC 9718).
Thank you.
Thank you for the report.
I reviewed the DNSSEC trust anchor handling. The old ICANN CA certificate block was commented out and was not used by the current resolver path.
DNSSEC validation is initialized directly from the built-in DS trust anchors via get_builtin_ds(), which already includes the current root DS trust anchors.
I removed the stale commented-out certificate block and updated the comment to keep the trust anchor handling clear without changing resolver behavior.
Cleanup on block adding failure.
If a block adding operation fails and triggers the following error message:
Block added hook signalled failure
the service node list does not get reset correctly. This can immediately lead to an incorrect service node winner, because the winner has already been incremented but not removed from the list.
This update fixes the issue by calling the blockchain detached hooks to perform the required cleanup.
The old version of the website will no longer be available. The new version will be gradually added to the information repository for community reference.
More APIs will be opened in the future, and more versions of blockchain explorers will be included.
Currently, some code repositories on GitHub and the website content are lagging behind the on-chain development progress.
In the future, the website will be restructured and integrated with GitHub. The website will be built around the theme of Proof of Stake, and its content can be directly updated and optimized on GitHub.
Kusama (KSM) uses a tripartite system:
Node incentives and voting are related to Service Nodes updating the community's latest CLI.
Rewards for community governance organizers are distributed from the total amount contributed to the Judecoin community since its launch.
100,000 Judecoins.Update your CLI wallet to version V3.1.1.
If you have already registered and started a Service Node, re-register and start it with the new wallet version to prevent block rewards from not being distributed.
In the future, the core nodes, iOS wallet, and GUI wallet versions will be upgraded to prepare for the next major upgrade.
The next wallet upgrade will add more nodes.
Please follow the official website's instructions to start the registration service.
quorum_cop: Fix Bug in Missing Node Detection and Add LoggingFixed a bug in missing node detection and added logging.
Added quorum states to database storage for Service Nodes.
This converts the transaction type and version to scoped enums, giving type safety and making transaction type assignment less error-prone.
There is no implicit conversion or comparison with raw integers that needs to be considered.
This converts uses of:
cryptonote::transaction::type_xyzto:
cryptonote::transaction::txtype::xyzFor versions, names such as:
transaction::version_v3become:
cryptonote::txversion::v3_tx_typesThis also allows and includes various other simplifications related to, or enabled by, this change:
is_standard_tx dynamically in serialization code, setting type::standard or type::state_change rather than using a version-determined union.get_type() is no longer needed with the above change. It is now much simpler to directly access type, which will always have the correct value, even for v2 or v3 transaction types.get_type() was only used sporadically, and many places accessed .type directly.uint16_t, which technically meant there was potential undefined behavior when deserializing any type values greater than or equal to 8.get_type() was not used everywhere, and many places simply accessed .type directly, these issues might not have been caught before.set_type() is not needed. It was only being used in a single place, wallet2.cpp, and only for v3 transactions, so the version protection code was never doing anything.std::ostream << operator for the enum types so that they can be output with: << tx_type <<rather than needing to wrap it everywhere in:
type_to_string(tx_type)v3_tx_types, rather than just the number.quorum_cop: added quorum cop and Service Node keys to judecoind.quorum_cop: changed uptime proof prune timeout to 2 hours 10 minutes.judecoin-sn-keys SN key management tool.This allows inspecting, generating, and restoring Ed25519 secret key files as needed by judecoind.
$ ./judecoin-sn-keys generate key_ed25519Generated SN Ed25519 secret key in key_ed25519
Public key: 08791467164b3f41681cb650385ffedeab96345f509e87a9852e4389643c5611
X25519 pubkey: ea7b652f1d215674441775e5e42ceaef31cf3ffad6cc3f0321031abf0935b86c$ ./judecoin-sn-keys show key_ed25519key_ed25519 (Ed25519 SN keypair)
==========
Secret key: 08016220970441955b29b1797f2c4bee0d3237e50bfafdb7999264caea163ecc
Public key: 08791467164b3f41681cb650385ffedeab96345f509e87a9852e4389643c5611
X25519 pubkey: ea7b652f1d215674441775e5e42ceaef31cf3ffad6cc3f0321031abf0935b86c$ ./judecoin-sn-keys restore key_ed25519-2Enter the Ed25519 secret key:
08016220970441955b29b1797f2c4bee0d3237e50bfafdb7999264caea163ecc
Public key: 08791467164b3f41681cb650385ffedeab96345f509e87a9852e4389643c5611
X25519 pubkey: ea7b652f1d215674441775e5e42ceaef31cf3ffad6cc3f0321031abf0935b86c
Is this correct? Press Enter to continue, Ctrl-C to cancel.
Saved secret key to key_ed25519-23.0.1 of the CLI wallet will be re-released once the upgrade is complete.Palm Wallet is an integrated wallet based on Judecoin mainnet version 3.0.0.
Future updates and upgrades to the wallet will primarily be based on version 3.0.0.
This update provides cleaner validation that is faster and more reasonable.
There is no need to call check_key for every output public key in check_tx_outputs again.
The redundant call to check_key inside check_tx_outputs can be safely removed.
This change saves one unnecessary point decompression for every output public key since hard fork v14.
This provides a useful performance gain, in addition to the key image sanity check done for clarity and to prevent future mistakes.
If the daemon is not completely synced at startup, it can connect to peers that relay P2P votes from the tip of the chain before the daemon realizes it has blocks to sync.
This can cause the missing quorum state error to print erroneously.
This update rejects new votes that can slip through the syncing phase at startup.
This update changes the way votes are relayed to fix superfluous P2P disconnections.
The update includes:
VOTE_LIFETIME before relaying.5-block buffer to incoming vote tolerance handling.Votes that are too new or too old should not be accepted.
However, a disconnection should not be triggered if the vote is within 5 blocks of the acceptable range, so that relays from slightly out-of-sync peers do not trigger P2P disconnections.
shared_ptr Storage for service_node_infoThis converts the stored service_node_info value into a shared_ptr rather than a plain service_node_info.
This yields a huge performance benefit by significantly eliminating the vast majority of service_node_info construction, destruction, and copying.
Most of the time when a service_node_info is copied, nothing in it has changed, which means the same thing is being stored again.
This previously caused extra construction for every Service Node info on every block, and extra destruction when old stored history was culled.
By using a shared_ptr, the vast majority of those constructions and destructions are eliminated.
With the shared_ptr approach, a copy is only made when a change is actually needed, such as infrequent per-Service Node events including state_change, received reward, contribution, and similar changes.
The contained reference is deliberately const so that values are not changeable.
A new function performs an explicit copying duplication, returning the new non-const value and storing the const reference in the shared pointer.
Related to this is a small change and fix to how proof info and public_ip are stored.
Rather than storing the values in the service_node_info struct itself, they are now stored in a shared_ptr inside service_node_info, which is intentionally shared among all copies of the service_node_info.
In other words, a Service Node info copy deliberately copies the pointer rather than the values.
This also moves the IP values into the proof struct, since that is easier than maintaining a separate shared_ptr for each value.
Previously, because these values were stored directly in service_node_info, they would get rolled back in the event of a reorg.
That behavior is undesirable, because it could roll back to old values of the uptime proof and IP address.
Those values are not dependent on the blockchain and should not be affected by a reorg or rollback.
With this change, they are not affected, since there is only one actual proof stored.
Note that the shared storage here only applies to in-memory states.
States loaded from the database will still be duplicated.
Wallet API is really messy with threads.
The refresh thread can run at any time and change internal wallet state, which breaks almost everything.
This puts all non-trivial wallet access from wallet_api behind a lock of the refresh thread to lock it out from refresh while other operations are underway.
When trying to sync the chain, nodes are constantly bombarded with voting information and uptime proofs.
Service Node votes and uptime proofs are not relayed during synchronization to reduce the bombardment of P2P data.
Otherwise, a ping-pong situation can occur as follows:
Node1 sends uptime ->
Node2 receives uptime and relays it back to Node1 for acknowledgement ->
Node1 receives it, handle_uptime_proof returns true to acknowledge ->
Node1 tries to resend to the same peers againInstead, if we receive our own uptime proof, then acknowledge it but do not send it on.
If we are missing an uptime proof, it will have been submitted automatically by the daemon itself instead of using our own proof relayed by other nodes.
--service-node Option to DaemonBy using this option, Judecoin can run in Service Node mode.
prepare_registrationA new interactive daemon command, prepare_registration, has been added to generate a registration command.
This also allows users to use:
judecoind prepare_registrationto generate a registration command via RPC commands to judecoind.
This is particularly useful when judecoind is running in non-interactive mode.
judecoind prepare_registration
2025-07-09 11:49:17.879 I Judecoin 'Chamaeleo dilepis' (v3.0.0-391e7e6a8)
Judecoin Service Node Registration
------------------------------
Service Node Pubkey: 8dc0d93a5f9ce759448e38bf9bbbd1f439a09d0c853e0b91626e50f6f07390f3
Staking requirement: 23600.000000000 jude from up to 9 contributors
Enter the JUDE address of the Service Node operator (C/Cancel):
J6jRMfcZBUNCoc3iacrJgh79UiuoQgW4KDe4aLh5Dww2N6B8iWhuzB1StgCEWjpt4YNVzfrQLRB82XfgjcYgcnHWSf1LKxo
The operator must stake between 5900.000000000 jude and 23600.000000000 jude.
How much JUDE does the operator want to stake? (B/Back/C/Cancel/max/min) [max]: 8000
This Service Node requires an additional stake of 15600.000000000 jude.
To add a reserved contribution spot enter the contributor's JUDE address now.
Leave this blank to leave the remaining stake open to public contributors. (B/Back/C/Cancel):
JBAo6emU36qSJU12Mdp6Pc1ioAFyRUiHbDDqbuoPRgSn6z6tnnsUzEHgRZ4axJb73Neb7DJjnfEHrQdjgUTvD7ZhF8hZnDj
The next contributor must stake between 1950.000000000 jude and 15600.000000000 jude.
How much JUDE does contributor 1 want to stake? (B/Back/C/Cancel/max/min) [max]: 5000
This Service Node requires an additional stake of 10600.000000000 jude.
To add a reserved contribution spot enter the contributor's JUDE address now.
Leave this blank to leave the remaining stake open to public contributors. (B/Back/C/Cancel):
This Service Node has multiple contributors and thus requires an operator fee percentage. This percentage is removed from the block reward and assigned to the operator, then the remaining reward is split among contributors, including the operator, proportionally to their contribution.
Enter the operator fee as a percentage [0.00-100.00] (B/Back/C/Cancel): 5.67
Total reserved contributions: 13000.000000000 jude.
The total reserved amount (13000.000000000 jude) is less than the required full stake (23600.000000000 jude).
The remaining stake (10600.000000000 jude) will be open to contribution from 1-7 public contributors.
The Service Node will not activate until the entire stake has been contributed.
Is this acceptable? (Y/Yes/N/No/B/Back/C/Cancel): Y
Registration Summary:
Service Node Pubkey: 8dc0d93a5f9ce759448e38bf9bbbd1f439a09d0c853e0b91626e50f6f07390f3
Operator fee (as % of Service Node rewards): 5.67%
Contributor Address Contribution Contr. %
_____________ _____________ _________________ ________
Operator J6jRMfcZB..xo 8000.000000000 33.90%
Contributor 1 JBAo6emU3..Dj 5000.000000000 21.19%
(open) (any) >=1514.285714286 >=6.42%
(open) (any)
(open) (any)
(open) (any)
(open) (any)
(open) (any)
(open) (any)
Is the staking information above correct? (Y/Yes/N/No/B/Back/C/Cancel): YThis replaces the callback wrapper that had to be called from each command callback to reset the inactivity timer.
The previous wrapper was randomly missing from some commands.
It is replaced with a generic one in the console_handler, allowing pre-callback and post-callback commands to be specified.
When the CLI wallet sweeps, it processes the transaction to show output and ring information.
Previously, this was done by making a separate get_outputs.bin RPC request for each input being spent.
For a large sweep, this added a large amount of latency, making the entire request take much longer than necessary.
This update optimizes the process by batching output requests into 5000 outputs per request, which will typically mean just one request.
Judecoin Team
console_handler: Log Errors Properly and Gracefully Shut Down Walletsimplewallet, invalid or missing commands were not reported to the CLI because errors were thrown and caught silently.invalid_command exception to distinguish between an error thrown by the console_handler, such as a missing or empty command, and an actual std::out_of_range thrown by wallet code.Unknown command ... even when it was a known command.console_handler, cmd_handler failure is no longer treated as an invalid command. Previously, if a command failed, it would assume an invalid command and log or try the next branch, which was detecting application exit.Dropped support for the mine-to-use RPC system.
grace_blocks to is_synced()Add a grace_blocks parameter, defaulting to 0, to is_synced().
This replaces the previous check for being fully in sync with a check for being close to synced.
The wallet can occasionally become out of sync when a new block is added, making it one block behind the chain height.
This can result in unnecessary wallet errors, because if the user immediately calls the function again after it fails, it will succeed.
node_rpc_proxyThere was a problem caused by combining two states, earliest_height and enabled, into a single cached value.
While earliest_height does not change on the fork, enabled does.
If the call is made when enabled = false, meaning before the fork, the wallet will never apply the rules for that fork until the wallet is restarted and the cache is cleared.
The mobile wallet will optimize the desktop image, wallet full name, and shared node staking function.
generate_ring_signature and check_ring_signature were used somewhat inappropriately to sign and check a signature of a single key image.
While this works, the full ring signature algorithm adds quite a bit of complexity that is not needed, and does not run, for the key image proof included in stake transactions and exported key images from the wallet.
This update splits it up, makes the key image interface considerably simpler, and adds annotation comments throughout it.
It also adds comments into the main signature code.
This is a necessary step toward getting stake transactions and key image exports working with Ledger, without implementing the full ring signature, because that is quite involved and not needed for most of these cases.
goto Code in wallet2::import_outputsThis replaces a confusing code section and replaces an odd macro / goto combination with a more reasonable if statement.