Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
eb3a8e2
Update protocol to not send the whole blockchain in a propose - Solve…
AgentF-OL Nov 6, 2025
83a1bb7
Add global protocol start time in config and add epoch synchronizatio…
AgentF-OL Nov 7, 2025
0c50685
Change config comment for the start time to show the right expected f…
AgentF-OL Nov 7, 2025
78a8e19
Add node recovery by asking for the missing blocks from its blockchai…
AgentF-OL Nov 9, 2025
466598d
Reimplement blockchain data structure to be a tree of blocks with a f…
AgentF-OL Nov 13, 2025
7ee2875
Change recovery so that it no longer blocks until receiving the first…
AgentF-OL Nov 13, 2025
e42e60a
folders by standard convention shouldn't use PascalCase
SousaTrashBin Dec 3, 2025
348af01
reformat
SousaTrashBin Dec 3, 2025
39a4aea
changed static class (config data) to be a record, also simplified a …
SousaTrashBin Dec 3, 2025
83ee8ed
reviewed and done some minor changes on fixed code
SousaTrashBin Dec 3, 2025
91c4117
add persistence-related functions (need to be changed from "persistan…
SousaTrashBin Dec 3, 2025
ce40045
Fix persistence functions spelling
AgentF-OL Dec 3, 2025
5aeae23
Fix blockchain persistence and abstract persistence file related logi…
AgentF-OL Dec 4, 2025
5082275
update makefile's clean to clear output folder
SousaTrashBin Dec 4, 2025
b983b0e
fix some minor issues on the implementation according to persistence …
SousaTrashBin Dec 4, 2025
c425de5
add logging of operations such that sequential persistence only needs…
SousaTrashBin Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ bin/

###
.idea
StreamLet.iml
StreamLet.iml
output
5 changes: 4 additions & 1 deletion config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ P2P=127.0.0.1:54582
P2P=127.0.0.1:54583
P2P=127.0.0.1:54584

# Agreed time for every server to start protocol dd-MM-yyyy HH:mm:ss
start=04-12-2025 08:36:00

# NORMAL and DEBUG mode for logs
logLevel=NORMAL
logLevel=DEBUG

# SIMULATION: transactions are generated randomly by the servers
# CLIENT: waits for client to send transactions
Expand Down
1 change: 1 addition & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ compile: $(OUT_DIR)

clean:
rm -rf out
rm -rf output
11 changes: 6 additions & 5 deletions src/Streamlet.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import StreamletApp.StreamletNode;
import app.StreamletNode;
import utils.ConfigParser;
import utils.communication.PeerInfo;
import utils.logs.AppLogger;
Expand All @@ -14,14 +14,15 @@ void main(String[] args) throws IOException, InterruptedException {

ConfigParser.ConfigData configData = ConfigParser.parseConfig();

List<PeerInfo> peerInfos = configData.peers;
AppLogger.updateLoggerLevel(configData.logLevel);
LocalDateTime start = configData.start();

List<PeerInfo> peerInfos = configData.peers();
AppLogger.updateLoggerLevel(configData.logLevel());
PeerInfo localPeer = peerInfos.get(nodeId);

List<PeerInfo> remotePeers = peerInfos.stream().filter(p -> p.id() != nodeId).toList();
AppLogger.logDebug(remotePeers.toString());

AppLogger.logInfo("Waiting all peers to connect...");
StreamletNode node = new StreamletNode(localPeer, remotePeers, 1, configData.isClientGeneratingTransactions, configData.servers.get(nodeId));
StreamletNode node = new StreamletNode(localPeer, remotePeers, 1, start, configData.isClientGeneratingTransactions(), configData.servers().get(nodeId));
node.startProtocol();
}
111 changes: 0 additions & 111 deletions src/StreamletApp/BlockchainManager.java

This file was deleted.

25 changes: 0 additions & 25 deletions src/StreamletApp/ChainView.java

This file was deleted.

Loading