Skip to content

Commit

Permalink
Merge pull request #280 from qubic/develop (Release v1.232.1)
Browse files Browse the repository at this point in the history
Release v1.232.1
  • Loading branch information
Franziska-Mueller authored Jan 22, 2025
2 parents cb93786 + 3f6c9b5 commit d536c18
Show file tree
Hide file tree
Showing 19 changed files with 236 additions and 1,945 deletions.
2 changes: 1 addition & 1 deletion src/Qubic.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<ClInclude Include="assets\net_msg_impl.h" />
<ClInclude Include="common_buffers.h" />
<ClInclude Include="contracts\ComputorControlledFund.h" />
<ClInclude Include="contracts\Qearn_old.h" />
<ClInclude Include="contracts\SupplyWatcher.h" />
<ClInclude Include="contracts\EmptyTemplate.h" />
<ClInclude Include="contracts\GeneralQuorumProposal.h" />
Expand Down Expand Up @@ -86,6 +85,7 @@
<ClInclude Include="score.h" />
<ClInclude Include="platform\m256.h" />
<ClInclude Include="platform\memory.h" />
<ClInclude Include="platform\memory-util.h" />
<ClInclude Include="score_cache.h" />
<ClInclude Include="spectrum.h" />
<ClInclude Include="system.h" />
Expand Down
4 changes: 1 addition & 3 deletions src/Qubic.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@
<ClInclude Include="platform\global_var.h">
<Filter>platform</Filter>
</ClInclude>
<ClInclude Include="contracts\Qearn_old.h">
<Filter>contracts</Filter>
</ClInclude>
<ClInclude Include="platform\memory-util.h" />
</ItemGroup>
<ItemGroup>
<Filter Include="platform">
Expand Down
6 changes: 3 additions & 3 deletions src/addons/tx_status_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "../platform/m256.h"
#include "../platform/debugging.h"
#include "../platform/memory.h"
#include "../platform/memory_util.h"

#include "../network_messages/header.h"

Expand Down Expand Up @@ -74,10 +74,10 @@ static RespondTxStatus* tickTxStatusStorage = NULL;
static bool initTxStatusRequestAddOn()
{
// Allocate pool to store confirmed TX's
if (!allocatePool(confirmedTxLength * sizeof(ConfirmedTx), (void**)&confirmedTx))
if (!allocPoolWithErrorLog(L"confirmedTx", confirmedTxLength * sizeof(ConfirmedTx), (void**)&confirmedTx, __LINE__))
return false;
// allocate tickTxStatus responses storage
if (!allocatePool(MAX_NUMBER_OF_PROCESSORS * sizeof(RespondTxStatus), (void**)&tickTxStatusStorage))
if (!allocPoolWithErrorLog(L"tickTxStatusStorage", MAX_NUMBER_OF_PROCESSORS * sizeof(RespondTxStatus), (void**)&tickTxStatusStorage, __LINE__))
return false;
txStatusData.confirmedTxPreviousEpochBeginTick = 0;
txStatusData.confirmedTxCurrentEpochBeginTick = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/assets/assets.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "platform/uefi.h"
#include "platform/file_io.h"
#include "platform/time_stamp_counter.h"
#include "platform/memory_util.h"

#include "network_messages/assets.h"

Expand Down Expand Up @@ -159,11 +160,10 @@ static unsigned int issuanceIndex(const m256i& issuer, unsigned long long assetN

static bool initAssets()
{
if (!allocatePool(ASSETS_CAPACITY * sizeof(AssetRecord), (void**)&assets)
|| !allocatePool(assetDigestsSizeInBytes, (void**)&assetDigests)
|| !allocatePool(ASSETS_CAPACITY / 8, (void**)&assetChangeFlags))
if (!allocPoolWithErrorLog(L"assets", ASSETS_CAPACITY * sizeof(AssetRecord), (void**)&assets, __LINE__)
|| !allocPoolWithErrorLog(L"assetDigets", assetDigestsSizeInBytes, (void**)&assetDigests, __LINE__)
|| !allocPoolWithErrorLog(L"assetChangeFlags", ASSETS_CAPACITY / 8, (void**)&assetChangeFlags, __LINE__))
{
logToConsole(L"Failed to allocate asset buffers!");
return false;
}
setMem(assetChangeFlags, ASSETS_CAPACITY / 8, 0xFF);
Expand Down
5 changes: 2 additions & 3 deletions src/common_buffers.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "platform/global_var.h"
#include "platform/memory.h"
#include "platform/memory_util.h"

#include "network_messages/entity.h"
#include "network_messages/assets.h"
Expand All @@ -18,9 +18,8 @@ static bool initCommonBuffers()
{
// TODO: check that max contract state size does not exceed size of spectrum or universe
constexpr unsigned long long reorgBufferSize = (spectrumSizeInBytes >= universeSizeInBytes) ? spectrumSizeInBytes : universeSizeInBytes;
if (!allocatePool(reorgBufferSize, (void**)&reorgBuffer))
if (!allocPoolWithErrorLog(L"reorgBuffer", reorgBufferSize, (void**)&reorgBuffer, __LINE__))
{
logToConsole(L"Failed to allocate common buffers!");
return false;
}

Expand Down
4 changes: 0 additions & 4 deletions src/contract_core/contract_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ struct __FunctionOrProcedureBeginEndGuard
#define CONTRACT_INDEX QEARN_CONTRACT_INDEX
#define CONTRACT_STATE_TYPE QEARN
#define CONTRACT_STATE2_TYPE QEARN2
#ifdef QEARN_UPDATE
#include "contracts/Qearn.h"
#else
#include "contracts/Qearn_old.h"
#endif

#undef CONTRACT_INDEX
#undef CONTRACT_STATE_TYPE
Expand Down
3 changes: 1 addition & 2 deletions src/contract_core/contract_exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ static bool initContractExec()
contractStateLock[i].reset();
}

if (!allocatePool(MAX_NUMBER_OF_CONTRACTS / 8, (void**)&contractStateChangeFlags))
if (!allocPoolWithErrorLog(L"contractStateChangeFlags", MAX_NUMBER_OF_CONTRACTS / 8, (void**)&contractStateChangeFlags, __LINE__))
{
logToConsole(L"Failed to allocate contractStateChangeFlags!");
return false;
}
setMem(contractStateChangeFlags, MAX_NUMBER_OF_CONTRACTS / 8, 0xFF);
Expand Down
Loading

0 comments on commit d536c18

Please sign in to comment.