[EN/PT-BR] Hive Grove: On-chain security and network updates

image.pngChatGPT

divisor.jpeg

You know I love updating and implementing new features in everything I do. Naturally, this time is no exception; I’ve made significant security improvements to the game to prevent "smart alecks" from exploiting bugs to farm resources and grow without following the rules—new layers of protection have been added!

And chances are, many more will be implemented to ensure the game remains as secure and fair as possible. This is especially important given the game's social focus—which includes optional purchases for more land and trees that others can help maintain—so I need to do my utmost to keep improving everything.

A special thank you today goes to @gwajnberg and @forykw, who helped me greatly with improvements and the implementation of new features for Hive Grove.



🔐 Hive Signature Authentication (Keychain)

Until now, saving player state and recording "help between friends" relied solely on a shared secret known as a "bearer token." Starting today, the server requires cryptographic proof that the party calling the API is indeed the owner of the Hive account:

  • Upon login, the client signs a challenge (HiveGrove:login:<timestamp>) using the Posting key via Hive Keychain.
  • This challenge and signature are stored in the session and re-sent with every sensitive call (POST /api/state, POST /api/help).
  • The server recovers the public key from the signature and verifies it against the account's posting.key_auths on the blockchain—only those who actually control the account can proceed.
  • Sessions expire after 24 hours, limiting the replay window for a leaked signature.
  • A global secret bypass remains available solely for administrative or bot use, requiring no signature.


🛡️ The server no longer trusts anything coming from the client

Several avenues where the client could "lie" to the server have been closed, thereby enhancing Hive Grove's security against malicious attempts to gain an unfair advantage.

  • Reward cooldown is now calculated and validated entirely on the server based on the last_claim value stored in the database; consequently, the client can no longer force a claim prematurely.
  • Reward mode (liquid vs. stake) is now read from the database rather than the request body.
  • Initial synchronization: tree data (type, claims, last_claim) can only be created during the initial synchronization (migration from localStorage). Thereafter, the client cannot overwrite these fields; they change only through the server's game routes. ____

🌐 Network: Explore and Chat

The social network page has gained new tabs and features:

image.png

  • My Network and Explore: You can now scan the network of any Hive user, not just your own. This allows you to see people outside your immediate network and social circle, helping you discover new individuals and assist with their groves.
  • "Surprise Me": Randomly visit the grove of someone in your already-scanned network, or—if you haven't scanned anything yet—find an active player directly from the game's account history. This feature will be improved in the future to make the search for a random user to visit truly random.
  • Grove assistance enters the social graph: Help given and received (grove_help) now carries 8x the weight in the connection score. It is the game's "strongest" interaction and now truly counts within the network, shifting some of the emphasis away from social interactions that occur outside of Hive Grove.

image.png

  • A new "Grove Conversations" block displays the message history exchanged with each connection, including any stickers sent.
  • Minor UX adjustments: the tab and scroll position of the network screen are restored upon returning, and the "Friend Messages" modal reopens automatically when you return from visiting a friend's garden.


🧹 Other adjustments

  • Fixed a false positive regarding the "already helped this friend today" block on the Friends screen; the calculation is now based solely on actually visible stickers, eliminating a scenario where the block appeared even when no emoji was on the screen.
  • Added dotenv configuration to both the server and the client to organize environment variables.
  • Updated the project's internal knowledge graph (graphify) to reflect the new code structure.


This entire batch of changes was merged today via the feat/network-improvement PR, wrapping up the security work developed over the past few days and delivering the first version of Hive Grove's explorable social network. Of course, I will continue to look for vulnerabilities and patch them as they arise. New features—such as new mechanics and the like—are planned for the future.

A big thank you to everyone using Hive Grove and sharing feedback or ideas for implementation; I’ll keep working to bring you new updates!

sun_divisor.webp

image.pngChatGPT

divisor.jpeg

Vocês sabem que eu amo atualizar e aplicar novas coisas em tudo o que faço. Então não poderia ser diferente por agora, já que fiz muitas melhorias de segurança no jogo para evitar que espertinhos se aproveitem de bugs para farmar e crescer sem seguir as regras, novas camadas de proteção foram adicionadas!

E se brincar muitas outras irão ser aplicadas também para que o jogo se torne sempre o mais seguro e justo possível, ainda mais que está voltado mais para a questão social com algumas compras caso você queira mais terras e mais arvores para as pessoas poderem te ajudar com a manutenção delas, então, eu preciso sempre fazer o possível para melhorar tudo.

O meu agradecimento especial hoje vai para o @gwajnberg e @forykw que me ajudaram em muitas coisas para a melhoria e implementação de novidades para o Hive Grove.



🔐 Autenticação por assinatura Hive (Keychain)

Até agora, salvar o estado do jogador e registrar a "ajuda entre amigos" dependia só de um segredo compartilhado, que chamamos de "bearer token". A partir de hoje, o servidor exige uma prova de criptográfica de que quem está chamando a API é realmente o dono da conta Hive:

  • No login, o cliente assina um desafio (HiveGrove:login:<timestamp>) com a Posting key via Hive Keychain.
  • Esse desafio + assinatura ficam guardados na sessão e são reenviados em toda chamada sensível (POST /api/state, POST /api/help).
  • O servidor recupera a chave pública da assinatura e confere contra o posting.key_auths da conta na blockchain — só passa quem realmente controla a conta.
  • Sessões expiram em 24h, limitando a janela de replay de uma assinatura vazada.
  • Um bypass por segredo global continua existindo apenas para uso administrativo/bot, sem precisar de assinatura.


🛡️ Servidor não confia mais em nada vindo do cliente

Vários pontos onde o cliente podia "mentir" para o servidor foram fechados, aumentando assim a segurança do Hive Grove contra quem quisesse fazer algo malicioso para obter vantagens.

  • Cooldown de recompensa agora é calculado e validado inteiramente no servidor, a partir do last_claim salvo no banco, sendo assim o cliente não consegue mais forçar um claim antes da hora.
  • Modo de recompensa (líquido vs. stake) passou a ser lido do banco de dados, não mais do corpo da requisição.
  • Sincronização inicial: dados de árvore (tipo, claims, last_claim) só podem ser criados na primeira sincronização (migração do localStorage). Depois disso, o cliente não consegue mais sobrescrever esses campos e eles só mudam através das rotas de jogo no servidor.


🌐 Network: explorar e conversar

A página de rede social ganhou abas e novos recursos:

image.png

  • Minha Rede e Explorar: agora dá para escanear a rede de qualquer usuário Hive, não só a sua própria. Com isso você pode ver mais pessoas fora da sua rede e circulo social, podendo encontrar novas pessoas que nunca viu na vida e ajuda-las com seu bosque.
  • "Surpreenda-me": visita aleatória a um bosque de alguém da sua rede já escaneada ou busca um jogador ativo direto do histórico da conta do jogo, se você ainda não escaneou nada. Essa função será melhorada no futuro deixando bem mais aleatório essa busca por alguém aleatório para que você possa visitá-lo.
  • Ajudas do Grove entram no grafo social: ajudas dadas e recebidas (grove_help) agora pesam ×8 no score de conexão, é a interação mais "forte" do jogo e passou a contar de verdade na rede, tirando um pouco peso apenas de interações sociais fora do Hive Grove.

image.png

  • Um novo bloco de "Conversas do Grove" mostra o histórico de mensagens trocadas com cada conexão, junto com os stickers enviados.
  • Pequenos ajustes de UX: a aba e a posição de rolagem da tela de rede são restauradas ao voltar, e o modal de "Mensagens de Amigos" reabre automaticamente quando você volta de uma visita à horta de um amigo.


🧹 Outros ajustes

  • Correção de um falso positivo no bloqueio de "já ajudei esse amigo hoje" na tela de Amigos, o cálculo agora se baseia só nos stickers realmente visíveis, eliminando um caso onde o bloqueio aparecia sem nenhum emoji na tela.
  • Configuração via dotenv adicionada ao servidor e ao client, organizando variáveis de ambiente.
  • Atualização do grafo de conhecimento interno do projeto (graphify) para refletir a nova estrutura de código.


Esse pacote de mudanças foi todo mesclado hoje através da PR feat/network-improvement, fechando a parte de segurança que vinha sendo construída nos últimos dias e entregando a primeira versão da rede social explorável do Hive Grove. Claro que ainda vou continuar procurando por brechas e assim aplicando correção em todas elas. Novas implementações devem vim futuramente, novas mecânicas e coisas do tipo.

Sendo assim, muito obrigado a todos que vem utilizando o Hive Grove e já deram algum feedback ou ideia para implementar, vou continuar trabalhando para trazer novidades!

divisor.jpeg

banner_hiver_br_01.png


Hive Grove | Horizon Forge | Discord | Xwitter

🔥Please, consider helping by using my reference links🔥

Post To EarnDePINWin SATSWin SATSHave Fun To Earn
Publish0xHoneygainSliceZBDRumble Arcade
1.42791730 BEE
4 comments

This post was curated by @hive-br team!

banner_hiver_br_01.png

Delegate your HP to the hive-br.voter account and earn Hive daily!

🔹 Follow our Curation Trail and don't miss voting! 🔹

0.00000000 BEE

Seems like nothing works on Hive Grove right now buddy xD

0.00000000 BEE

This post has been manually curated by @bhattg from Indiaunited community. Join us on our Discord Server.

Do you know that you can earn a passive income by delegating to @indiaunited. We share more than 100 % of the curation rewards with the delegators in the form of IUC tokens.

Here are some handy links for delegations: 100HP, 250HP, 500HP, 1000HP.

image.png

100% of the rewards from this comment goes to the curator for their manual curation efforts. Please encourage the curator @bhattg by upvoting this comment and support the community by voting the posts made by @indiaunited.

0.00000000 BEE

Curious about HivePakistan? Join us on Discord!

Delegate your HP to the Hivepakistan account and earn 90% of curation rewards in liquid hive!


Follow our Curation Trail and don't miss voting!


Additional Perks: Delegate To @ pakx For Earning $PAKX Investment Token


Curated by bhattg

0.00000000 BEE